Unit 2 : build a robot : No transform from [link_left_wheel] to [link_chassis]

Hi !

I am on unit 2. I have followed the instruction provided by construct to create the following URDF file. But when i open in RVIZ , it gives an error “No transform from [link_left_wheel] to [link_chassis]” (screenshot attached). Can anyone please guide me , what could be the reason ?

<?xml version="1.0" ?>

<robot name="robot">

    <!-- Link - chassis -->
    <link name="link_chassis">
        <inertial>
            <mass value="10" />
            <origin xyz="0 0 0.3" rpy="0 0 0" />
            <inertia ixx="1.5417" ixy="0" ixz="0" iyy="3.467" iyz="0" izz="4.742" />
        </inertial>

        <collision>
            <geometry>
                <box size="2 1.3 0.4" />
            </geometry>
        </collision>

        <visual>
            <geometry>
                <box size="2 1.3 0.4" />
            </geometry>
            <material name="Red">
                <color rgba="1 0 0 1" />
            </material>
        </visual>
    </link>

    <!-- Joint - chassis / left wheel -->
    <joint name="joint_chassis_left_wheel" type="continuous">
        <origin rpy="0 0 0" xyz="-0.5 0.65 0" />
        <child link="link_left_wheel" />
        <parent link="link_chassis" />
        <axis rpy="0 0 0" xyz="0 1 0" />
        <limit effort="10000" velocity="1000" />
        <joint_properties damping="1.0" friction="1.0" />
    </joint>

    <!-- Link - left wheel -->
    <link name="link_left_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>
            <origin rpy="1.5707 0 0" xyz="0 0.18 0" />
            <geometry>
                <cylinder length="0.12" radius="0.4"/>
            </geometry>
        </collision>
        <visual>
            <origin rpy="1.5707 0 0" xyz="0 0.18 0" />
            <geometry>
                <cylinder length="0.12" radius="0.4"/>
            </geometry>
        </visual>

        <collision>
            <origin rpy="1.5707 0 0" xyz="0 0.06 0" />
            <geometry>
                <cylinder length="0.12" radius="0.08"/>
            </geometry>
        </collision>
        <visual>
            <origin rpy="1.5707 0 0" xyz="0 0.06 0" />
            <geometry>
                <cylinder length="0.12" radius="0.08"/>
            </geometry>
        </visual>
    </link>

</robot>

Best regards,
Muhammad

Hi @muhammadjunaid
What is your fixed frame set to ? make sure it is set to link_chassis . Also i would like to ask if you have your joint state publisher, joint state publisher gui and also robot state publisher node installed. Is this added to your launch file

  • < node name=“robot_state_publisher” pkg=“robot_state_publisher” type=“robot_state_publisher” />
  • < node name=“joint_state_publisher” pkg=“joint_state_publisher” type=“joint_state_publisher” />

Are these added to the launch file ? Reason why is because of the link_left_wheel is connected to publish their position using joint_state_publisher , robot_state_publisher only publishes the static transforms. Adding the joint_state_publisher node to the launch file should solve/fix the issue.

Kind regards,

Davies.O

Hi !
I added joint_state_publisher but the error still stays (screenshot attached ).

here is my launch file :

<?xml version="1.0"?>
<launch>

  <param name="robot_description" command="cat '$(find robot_description)/urdf/robot.urdf'"/>

  <!-- 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"/>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>

  <!-- Show in Rviz   -->
  <node name="rviz" pkg="rviz" type="rviz" />

</launch>

Rviz : ,

terminal :

Hi,

Your problem is that the transform between wheel and chassis is not available. This is how to identify and pinpoint your problem.

  1. Check /tf topic
    Echo /tf topic with the following command
rostopic echo /tf

Check if the /tf topic contain the transform between wheel and chassis.

  1. Check /joint_states topic
    Again, echo the /joint_states topic
rostopic echo /joint_states

If the /joint_states topic is not being published, joint_state_publisher node has not started properly.

  1. Check node list
    Check if you can see all the nodes you need, for example, robot_state_publisher, and joint_state_publisher.
rosnode list

If you discover anything unusual, you can start debugging from there.
If you have any additional questions, please let me know.

Regards,
Sangtaek

Hi @muhammadjunaid

If this issue keeps occurring can you try and re-install the robot_state_publisher and also the joint_state_publisher package ? Then launch the file again.

Regards,

Davies.O

@muhammadjunaid From the images you shared, it looks like you are running this on your local computer. If that is the case, it’s very hard for us to help you as we don’t have any control over your local setup.

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