# Curiosity Lection 2 Mastering Gazebo

Hello, I was wondering if the meassures in the first exercise are correct.
In particular, about the front caster wheel. In the picture it says that the diameter is 0.25, but it feels to me that I think 0.25 should be refering to the radius, not the diameter. So in order to create the front_wheel should be something like this:

``````<link name= "link_front_wheel">
<inertial>
<mass value="1" />
<origin xyz="0 0 0" rpy="0 0 0" />
<inertia ixx="0.002526666666667" ixy="0" ixz="0" iyy="0.002526666666667" iyz="0" izz="0.005"/>
</inertial>

<collision>
<geometry>
</geometry>
</collision>
<visual>
<geometry>
</geometry>
<material name="Blue">
<color rgba="0 0 1 1" />
</material>
</visual>
``````

Also, I have some questions:

• When setting collision and visual tags: the material tag is only interesting in the visual tag right? Since the collision is used mostly for Gazebo Collision Interactio, right?

• Fixed frame in RVIZ: from last experiences is a chaos for me to understand the typical structure of the model of a robot. As for now, if you see the example in RVIZ, the grid according to the (0,0,0) isn’t the “real floor” from Gazebo (I know that RVIZ is not a simulation) so my question is. I have seen a lot of times another frame called _base_footprint which in that case, that would be the father link and then when you set this frame as the fixed frame of RVIZ the grid is at the down side of the wheels (which should be the nearest version of reality). Here it goes the question: is there any good to have this base_footprint? I’m talking mostly about improving the ease of setting all the correct coordinates to each link. I would like to standarize my way of creating URDF since it is the most tedious task I have seen while working on ROS.

Ángel López

Hi @ACTISA ,

A quick logical solution would be to check which size is too big for the robot. If 0.25 m for radius makes the wheel too big, then 0.25 m has to be diameter of the wheel.
Also, since this is the castor wheel, which is a sphere, the inertia values are equal in 3 axis, that is, `Ixx = Iyy = Izz = (2/5) x mass x radius^3`.

Yes. And `material` belongs under `visual`.

`base_footprint` is like the root of all links of your robot. It is to this link all other links are connected to. Therefore, if you set `Fixed Frame` in Rviz as `base_footprint` then all of the robot structure would be seen on the rviz screen (without white colors for the robot parts).

I am not sure if I understood this line correctly. I think you are trying to come up with your own convention or something for URDF? If that is the case, then I would suggest you to not do that. URDF has its own convention since it is a Unified Format. If you deviate from actual convention by making up your own, then you will have problems in the future.

I hope my answer helped you. Let me know if you still have questions.

Regards,
Girish

`base_footprint` is like the root of all links of your robot. It is to this link all other links are connected to. Therefore, if you set `Fixed Frame` in Rviz as `base_footprint` then all of the robot structure would be seen on the rviz screen (without white colors for the robot parts).

I understand, but sometimes I also see a base_link, doing this job. I think I’m worrying too much about it, more than I should. I’m thinking about this because when we import packages such as Nav2 and others, sometimes they need a base_link in order to work, and sometimes I didn’t know which link should I use, if it was the link in the center of the robot, the one on the ground, or didn’t really matter.

Thanks a lot again for all the answers!

Have a great day,
Ángel

Hi @ACTISA .

Sometimes `base_link` is used instead of `base_footprint`. It depends on how the URDF file for the robot is written. Usually the value for `Fixed Frame` is the root link of the robot that is specified in the robot’s URDF. The root link is the very first link in the file - to which all other links branch out as child nodes.

If you have both `base_link` and `base_footprint`, then choose `base_footprint`.
If you do not have `base_footprint`, but if you have `base_link`, then choose `base_link`.
If you have neither, scroll through the available links in the `Fixed Frame` dropdown and choose that one that provides the full visual of the robot. The robot must not be white in RViz.

I hope this helps.

Regards,
Girish

Thank you @girishkumar.kannan , I see it more clear now.

Regards,
Ángel

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.