Create models which shows also in rviz and tf

asked 2021-02-12 05:48:58 -0600

Hi community, I'm creating a world simulation for a Yumi robot for pick and place applications. I have the moveit package with the URDF of the robot and its table together in order to avoid collisions. Now I want create a gazebo world in order to put the robot with the table and the objects to pick and place. I have already the launch file using the URDF/Xacro of the robot and table and it is moving in Gazebo and also in Rviz. I have created a cylinder in the world file and called the world file from the launch file.

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find YumiProjectThesis)/launch/lab_world.world"/>

And the World file:

    <?xml version="1.0" ?>
<sdf version=1.5>
  <world name="lab">
    <!-- Includo piano e sole come luce -->
    <include>
      <uri>model://sun</uri>
    </include>
    <include>
      <uri>model://ground_plane</uri>
    </include>

    <!-- Nome del modello -->
    <model name="tube">
      <link name="tube_link">
        <inertial>
          <mass>0.050</mass>
          <!--Inertia: I=1/12 mL^2 -->
          <inertia>
            <ixx>0.000044204</ixx>
            <iyy>0.000044204</iyy>
            <izz>0</izz>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyz>0</iyz>
          </inertia>
        </inertial>
        <pose> 0.3 0 1.1030 0 0 0 </pose>
        <visual name="tube_visual">
          <geometry>
            <cylinder>
              <radius>0.0180</radius>
              <length>0.1030</length>
            </cylinder>
          </geometry>
        </visual>
        <collision name="tube_collision">
          <geometry>
            <cylinder>
              <radius>0.0180</radius>
              <length>0.1030</length>
            </cylinder>
          </geometry>
        </collision>
      </link>
    </model>
  </world>
</sdf>

How can I show the model in Rviz and particularly to access to its reference frame in order to pick the objects with moveit?

edit retag flag offensive close merge delete