Exercise U1-2 : Understanding Origins

The hardest part of exercise 2.1 is the origins. I was able to do other parts correctly. I have read and checked the ROS documentation. What I got there was that origin for links should be located at the center of gravity or shapes of the links and that the one for joints should be located at the origin of the child link. However, the solution for exercise 2.1 does not follow the convention on the ROS documentation

For example, the base link origin was placed at xyz = 0 0 0 while I expect to have (0 0 0.045) Same for all other parts of the links and joints. An attempt to change the origins for the links on my own changed the configuration of the mica robot.

<!-- * * * Link Definitions * * * -->
 <link name="base_link">

    <visual>
        <origin rpy="0.0 0 0" xyz="0 0 0"/>
        <geometry>
            <cylinder radius="0.06" length="0.09"/>
        </geometry>
        <material name="grey"/>
    </visual>
</link>

example 2: How the figures for the origin of the joints was arrived at is totally unclear. Same for all others. I believe if I am able to understand one for each link and a joint , I would understand the rest.

     <joint name="roll_joint" type="revolute">
    	<parent link="base_link"/>
    	<child link="roll_M1_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
        <limit lower="-0.2" upper="0.2" effort="0.1" velocity="0.005"/>
        <axis xyz="1 0 0"/>
	</joint>

Is there a guide you can recommend or can I get a detailed explanation on how to correctly identify and put correct origins on my own for any robot I want to work on? My aim is that by the end of the course I am able to correctly place origins on links and joints. I do not seem to understand the placement of the reading content of the exercise. The origins seem to be the most important task in urdf scripting.

1 Like

Hi @jimohafeezco,
Give this a read: https://answers.ros.org/question/269318/the-many-origins-of-urdf/

The tldr is tihs:

  1. The <origin> tag in<joint> defines where the origin of the child frame is in respect to its parent. This is the main thing where you define how parts are connected. If your links are defined properly, this is all you have to do
  2. In the case that the origin of a link is not at the right spot, we can use the <origin> tag in <visual>, <inertial> and<collision> to fix this.

Imagine this example: We have a arm piece of a gripper robot, but the origin of the link is in its center, instead of where it should connect to the joint. In this case we have to move the <origin> of the link, to represent the actual robot.

Hope that made sense

1 Like

Thanks. Does this mean that we we can both have different origins for a perfectly simulated robot model.?

Not sure what you mean by that. But a common different origin is in the ineartial tag, as it needs to be in line with the center of mass. So origin often differs between visual and collision

Values are set based on the geometries that you will use and how you want the robot to behave. Normally you want the visual and collision elements to be exactly the same .
Also normally you design the robots in SolidWorks, and there you can use the SW-to-URDF plugin that will make all the conversion necessary.