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

Modify my model robot in Gazebo

asked 2015-07-09 10:47:54 -0500

Alvaro Salcedo gravatar image

Hi Ros Users:

I have this P3DX model in gazebo https://github.com/RafBerkvens/ua_ros...

I would like to add a simple grey box on it. How can I do that? modifying file .xml? or I must do the box in autocad before?

Thanks you so much.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-09 22:04:21 -0500

lucasw gravatar image

You could modify pioneer3dx.xml, add a new link like

  <link name="simple_grey_box">
    <inertial>
      <mass value="0.01"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
    </inertial>
    <visual name="base_visual">
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry name="top_geom">
        <mesh filename="package://p3dx_description/meshes/top.stl"/>
      </geometry>
      <material name="TopBlack">
        <color rgba="0.038 0.038 0.038 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0.0 0 0"/>
      <geometry name="pioneer_geom">
        <box size="0.45 0.38 0.01"/>
      </geometry>
    </collision>
  </link>

There also needs to be a joint that makes this link the child of an already existing one.

You could replace top.stl with a mesh of your own. Or make a box generated by urdf instead of loading a mesh. The gazebo urdf tutorials are the best place to start for understanding the urdf files: http://gazebosim.org/tutorials/?tut=r...

edit flag offensive delete link more

Comments

Thank you so much. That's the way!

Alvaro Salcedo gravatar image Alvaro Salcedo  ( 2015-07-13 04:22:30 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-09 10:47:54 -0500

Seen: 1,061 times

Last updated: Jul 09 '15