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

Opening A .URDF in Gazebo

asked 2016-01-12 21:37:24 -0600

Shoiab gravatar image

I created a .URDF from SolidWorks using SW2URDF plug in, but the model doesn't appear in the insert model list in GAZEBO, even after i paste relevant files in .Gazebo folder. I know its basic stuff but please help. How do I open my model in GAZEBO after creating a URDF from SOLIDWORKS.

Thankyou.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-13 01:46:56 -0600

F.Brosseau gravatar image

There is a tutorial here to open an urdf in Gazebo. (I don't know if you can have the urdf model in the gazebo list model)

You have two ways to do that : 1) Command line rosrun gazebo_ros gazebo

rosrun gazebo_ros spawn_model -file `rospack find MYROBOT_description`/urdf/MYROBOT.urdf -urdf -x 0 -y 0 -z 1 -model MYROBOT (you must create a ros package)

2) Launch file

This node to start gazebo :

<launch>
    <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
      <arg name="paused" value="false"/>
      <arg name="use_sim_time" value="true"/>
      <arg name="gui" value="true"/>
      <arg name="headless" value="false"/>
      <arg name="debug" value="false"/>
    </include>
</launch>

This node to spawn a model :

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find baxter_description)/urdf/baxter.urdf -urdf -z 1 -model baxter" />
edit flag offensive delete link more

Comments

1

I went to all the trouble creating an account just to ask this: Is it so fuc@@@@ hard to add a File->Open fuc&*&$ Menu?

John999990 gravatar image John999990  ( 2018-11-30 12:58:02 -0600 )edit

Question Tools

Stats

Asked: 2016-01-12 21:37:24 -0600

Seen: 4,733 times

Last updated: Jan 13 '16