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

Based on suggestion above following code works. and I also set parameter at command line _my_number:=5

ros::NodeHandle nh_param("~");
int my_number;
nh_param.param("my_number", my_number ,int(0));

Thanks, Hemant