0
$\begingroup$

Rosanswers logo

Is it possible to spawn a different URDF to the param server depending on the different configurations of my robot from a single launchfile. I will also launch controllers specific to that robot configuration etc. I would like to only write one controller launch script, rather than for all the different configurations of my robot.

I think this may best be achieved with an argument passed to the launch file. Is this possible?? Something like:

roslaunch my_robot.launch 5_dof

Thanks!


Originally posted by kmaroney on ROS Answers with karma: 204 on 2012-03-09

Post score: 7

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes, see the roslaunch arg reference.

In a nutshell, you would launch it like this:

roslaunch my_robot.launch dof:=5

Inside the launch file, add

<arg name="dof"/>

And to evaluate it,

$(arg dof)

Originally posted by Ivan Dryanovski with karma: 4954 on 2012-03-09

This answer was ACCEPTED on the original site

Post score: 17

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.