As there is no C++ code mentioned in the question, I wonder if I understood your requirements correctly. However, I never faced issues with integers or double datatypes with the ROS launch file. Below is a code snippet:
ROS launch file:
<!-- your integer arguments -->
<arg name="k_neighbors" default="10"/>
<arg name="max_itr" default="1000"/>
<!-- your double arguments -->
<arg name="weight" default="0.05"/>
<arg name="d_thresh" default="0.005"/>
<arg name="prob" default="0.99999"/>
<!-- your float arguments -->
<arg name="radius" default="0.05"/>
<!-- your string arguments -->
<arg name="limb" default="right"/>
C++ node:
int main(int argc, char **argv)
{
ros::init(argc, argv, "my_node");
ros::NodeHandle nh("~");
// define integer parameter and then fetch their values from parameter server
int k_neighbors, max_itr;
nh.getParam("k_neighbors", k_neighbors);
nh.getParam("max_itr", max_itr);
// define double parameter and then fetch their values from parameter server
double weight, d_thresh, prob;
nh.getParam("weight", weight);
nh.getParam("d_thresh", d_thresh);
nh.getParam("prob", prob);
// define float parameter and then fetch their values from parameter server
float sphere_radius;
nh.getParam("radius", sphere_radius);
// define string parameter and then fetch their values from parameter server
std::string limb;
nh.getParam("limb", limb);
// rest of your logic goes here
return 0;
}
You may look for launch file and C++ node.