Ask Your Question
7

Roslaunch with Arguments

asked 2012-03-09 09:36:17 -0600

kmaroney gravatar image

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
16

answered 2012-03-09 10:46:31 -0600

updated 2012-03-09 10:49:28 -0600

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)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-03-09 09:36:17 -0600

Seen: 13,407 times

Last updated: Mar 09 '12