Gazebo | Ignition | Community
Ask Your Question

how to create launch file for my .urdf file and open it in gazebo

asked 2018-07-08 02:39:48 -0600

rukn gravatar image

i have created a .urdf file of simple robo model inside src/my_robo/urdf but i don't knw how to open it in gazebo , i need it to open using roslaunch

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-09 01:50:05 -0600

Raskkii gravatar image

updated 2018-07-11 06:49:37 -0600

For this you can use the spawn_model script from the gazebo_ros package. Assuming you have Gazebo already opened and "my_robo" is a package in your catkin workspace, you can use a script similar to this:

<?xml version="1.0"?>

    <param name="robot_description" command="cat '$(find my_robo)/urdf/robot.urdf'" />

    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param /robot_description -urdf -model robot" />
edit flag offensive delete link more


doesn't work for me

Robot_Enthusiast gravatar imageRobot_Enthusiast ( 2021-09-26 19:24:37 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-07-08 02:26:26 -0600

Seen: 2,315 times

Last updated: Jul 11 '18