Unit 2 : URDF course : Getting an error No transform from [roll_M1_link] to [base_link]

Hi !

Due to some reason , I am getting an error in RVIZ. Also When I added TF in rviz , I cannot see the status option with it aswell (screenshot attached) :

can anyone help me over here :slight_smile:

Best regards,
Muhammad

Is your robot_state_publisher node running? This node is responsible for publishing transforms

Hi munn!
Thanks for your response , Yes it is running , here is the 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"/> -->

    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
      <param name="use_gui" value="TRUE"/>
  </node>

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

and here is the screenshot of the terminal :
Screenshot from 2023-12-08 16-50-01

and here is the screen shot of gazebo :

I also have added the URDF below :

<?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>

As a work around, you may try runnning

 <arg name="use_tf_static" default="false"/> 
 <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" >
          <param name="use_tf_static" value="$(arg use_tf_static)"/>
 </node>

I have tried this :

But still the same issue. It says on RVIZ : no TF data

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

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="TRUE"/>
  </node>

  <!-- Combine joint values -->
  <arg name="use_tf_static" default="false"/> 
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" >
    <param name="use_tf_static" value="$(arg use_tf_static)"/>
  </node>
  <!-- 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>

Hi,

Can you pots here the TF Tree? or at least echo the tf topic? Because if the robot state publisher is running it should at least generate the tf tree

Hi @muhammadjunaid
Can you try to un-comment :

  <!--<node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/> -->

The robot_state_publisher node is running and that what is responsible for publishing transforms.

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