Home | Tutorials | Wiki | Issues
Ask Your Question

How to use for loop in launch file in gazebo?

asked 2015-12-25 03:13:05 -0500

rahul gravatar image

updated 2015-12-25 03:14:05 -0500

How can implement for loop concept in gazebo to spawn multiple robot model? For example:

<include file="$(find manycar)/launch/azcar.launch"> <arg name="robot_num" value="1"/> <arg name="init_pose" value="-x 1 -y 1 -z 0 -Y 1.57 "/> </include>

I want to iterate above code n times, variable being robot_num's value. How should I do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-25 10:52:42 -0500

Maybe you could use embedded ruby the same way it can be used for SDF.

See this SDF example where wheels are generated in a for loop for a cart.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-12-25 03:13:05 -0500

Seen: 838 times

Last updated: Dec 25 '15