URDF course content clarification

Hi @staff my queries are as follows:

Questions 1:
In unit 1, inorder to create a package for creating URDF models, we use the below-mentioned code. My question is why we are adding all these as dependencies when in previous cases we were able to access these dependent packages through launch files (even when the only dependency was rospy)?

cd /home/user/catkin_ws/src
catkin_create_pkg my_mira_description rospy rviz controller_manager gazebo_ros joint_state_publisher robot_state_publisher

Launch file:

<launch>

  <!-- USE: roslaunch my_mira_description urdf_visualize.launch model:='$(find myrobot_package)/urdf/myrobot.urdf' -->
  <arg name="model" default=""/>

  <param name="robot_description" command="cat $(arg model)" />

  <!-- send fake joint values -->
  <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/>

  <!-- Combine joint values -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>

  <!-- Show in Rviz   -->
  <!--<node name="rviz" pkg="rviz" type="rviz" args="-d $(find my_mira_description)/rviz_config/urdf.rviz"/>-->
  <node name="rviz" pkg="rviz" type="rviz" args=""/>

</launch>

Question 2:

We use RGBA to define the color of the material in Rviz using a scale of 0 to 1 for each value. Now, can i know why we are using a scale of 0 to 1 when the standard representation for RGBA is 0 to 255. Is it special for ROS?

Question 3:

In unit 2, 1.5 Learn how to import your 3D CAD models to Gazebo

  • In blender, after setting the origin to the center of mass, why are we aligning the center of mass (now origin) with axis of plain?

  • In blender after importing the dae file into ros, we also assign to it the files model.sdf and model.config. In model.config file, the tag <sdf version =”1.5”>model.sdf</sdf> shows the sdf file we are using but no path mentioned, only its name. Is it assumed that they will always be in the same folder?

  • What is SDF tag for? its not used in any of the URDF we worked on the course.

  • Is it right to say that the content of any .dae file we import into ROS will store the mesh of the model, its color, units and its origin(at center of mass).

  • Why is the origin we set using blender always at the center of mass? What if its a model of a robot arm, whose center of mass might be at its center, but we want it to move along one of its edges to mimic shoulder movement. Will the origin still be at the center?

Feedback:

Please update the above video. Here we are taught how to import a 3d model into Gazebo, but this video talks of a bug in blender which offset the result.Due to this the tutorial was made containing the bug. Please upload a bug free version so that i can see the end result should really look like.

I found a youtube video that i think you would like that solves this. this uses fusion 360 and seems kind of straightforward, at least solving the center of mass offset issue faced in blender.

Question 4:

In unit 3 - Using URDF for Gazebo, under Inertia

<origin xyz="0 0 0" rpy="0 0 0"/>

Is it safe to say that origin tag used in inertial tag, visual tag and collision tag are all in reference to the origin (assigned to the center of mass) of the model we assigned in blender?

Question 5:

image

For the Gurdy robot, under for root link called base_link, we are giving it a visual tag of a box of sides 0.01 and we are giving a hemispherical mesh for the head. I am able to see the mesh of the head, but where is the box mentioned in base_link in the simulation under visual tag?

    <link name="base_link">
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="0.01 0.01 0.01"/>
            </geometry>
        </collision>
		<visual>
		    <origin xyz="0 0 0.01" rpy="0 0 0"/>
			<geometry>
				<box size="0.01 0.01 0.01"/>
			</geometry>
		</visual>
	</link>

    <link name="head_link">
 	    <inertial>
            <origin xyz="0 0 0.02" rpy="0 0 0"/>
            <mass value="0.01" />
            <inertia ixx="7.58333333333e-07" ixy="0.0" ixz="0.0" iyy="7.58333333333e-07" iyz="0.0" izz="1.25e-06"/>
        </inertial>
        <collision>
            <origin xyz="0 0 0.02" rpy="0 0 0"/>
            <geometry>
                <cylinder radius="0.05" length="0.04"/>
            </geometry>
        </collision>
        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://my_gurdy_description/models/gurdy/meshes/gurdy_head_v2.dae"/>
            </geometry>
        </visual>
	</link>

While answering, i would really appreciate it if the question was quoted(image), then reply given for better readability.

The interest with which the construct team and members of the community have taken to answer my queries has given me encouragement to post new ones. Thanks in advance.

Answer to Question 1:

Its not explicitly needed. Its just a good practice. The reason that sometimes is there sometimes is not, is because normally the places that we set the dependencies are revised parts, and the others are older that haven t been revised yet.

Answer Question 2:

Its juts an alternative method. Why is like this, someone in Willow Garage original ROS creation team though it was better.

Answer to Question 3:

  • Aligning the center of mas to the origin is always better bexcuase that way afterwards when you port it to the URDF you wont have to displace it.
  • Yes its asumed it will be in the same folder
  • SDF is the URDF version for Gazeboi simulator. Gazbeo doesn’t use natively URDF, they are converted to SDFs
  • Its more complex than that but yes, daes should store those values, unless you export it in a special or different way, or another program that is not blender.
  • We have to adapt the origin pose to the robot model. SOme robot links have their center of mas decemtered or even we artificially decemter it to have a certain behaviour like cars that we want the center of mass to be very low.
  • Noted the video ;). Yes that video is really old, we nee dto update it, there are many things now that could be done.

Answer to Quetsion 4:

Yes, its referenced to the origin of the model we assigned in blender or the program we exported the dae or stl from.

Anwer to Question 5:

  • That box is inside the mesh, you cant see it because its inside. And we placed a box because that way while you build it you can see each link that you add.
1 Like

Just a reminder on updating the video on " importing custom 3D models into ROS"

1 Like

Thanks for teh reminder. I’ll list it and create a video for it next week if its possible and fits in the schedule :wink:

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.