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

set robot_description in program?

asked 2015-11-01 18:36:34 -0500

DamnItROS gravatar image

Can I read in command argument and set robot_description in c++ program?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-02 01:52:26 -0500

gvdhoorn gravatar image

Sure. It's just 'another parameter'.

Note: you will have to make sure that any other nodes that require that parameter will be started after your 'c++ program', or they'll most likely fail (most nodes (such as the robot_state_publisher) try to access parameters only once, at init). This can be tricky, as there is no guaranteed order in which nodes are launched.

Letting roslaunch set robot_description as a parameter takes care of this automatically, as "parameters will be stored on the Parameter Server before any nodes are launched" (from here).

edit flag offensive delete link more

Comments

I agree with you. But the problem is that roslaunch is not friendly to IDE. My plan is that I can setup a standalone c++ program for debug in IDE such as qtcreator/eclipse. For the end user, I have other executable integrated into roslaunch.

DamnItROS gravatar image DamnItROS  ( 2015-11-02 10:15:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-11-01 18:36:34 -0500

Seen: 266 times

Last updated: Nov 02 '15