ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The rosrun docs seems to suggest a _ must be prepended to the variable name. Maybe try that? That is, rosrun package_name node_name _parameter:=0.1

click to hide/show revision 2
No.2 Revision

The rosrun docs seems to suggest a _ must be prepended to the variable name. Maybe try that? That is, rosrun package_name node_name _parameter:=0.1

Edit: In order to receive the parameter properly, the node handle must also be initalized to access private parameters, e.g.

ros::NodeHandle nh("~");

This also works with multiple "double" parameters