Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 197

Why can't I 'get' my rosrun parameters?

$
0
0
I have a node that should be able to run other nodes. It has a basic method of doing so using system("rosrun myproject Robot robotname:='Botty'"); This should set the parameter robotname to 'Botty'. In my Robot node file, I have this code that should retrieve that parameter: std::string robotname; n.getParam("robotname", robotname); ROS_INFO(robotname.c_str()); However, nothing is printed. When I execute `rosparam list`, the corresponding parameter is `/RobotNode1/robotname`. What am I doing wrong? I think that `rosparam list` output might be a good hint - is there a way to set that parameter when executing rosrun without referencing `RobotNode1`? [edit] n is a NodeHandle.

Viewing all articles
Browse latest Browse all 197

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>