ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

RVIZ No transform from [/links to [odom]

asked 2020-02-18 08:26:29 -0600

q8wwe gravatar image

updated 2020-02-18 08:38:13 -0600

ubuntu : 16.04 os: kinetic robot : evarobot

I'm trying to work on real robot , i have a simple urdf file that is wheels connected with base_link with diff drive. I launched a real state file that contain robot_state publisher , joint_state publisher and odom_to_base tf broadcaster, my urdf file look good odom ->base_link.however, in rviz my model has no wheels and i have warning (No transform from [/links to [odom] )

my URDF file :

<?xml version="1.0" encoding="UTF-8"?>
<robot name="evarobotmodel">


<!--BASE -->
    <link name="base_link"> 
            <collision>
                <origin xyz="0 0 0" rpy="0 0 0"/>
                <geometry>
                    <box size="0.4 0.3 0.3"/> 
                </geometry>
            </collision>
            <visual>
                <origin xyz="0.065 -0.11 -0.15" rpy="0 0 0" />  
                <geometry>
                    <mesh filename="package://evarobotmodel_description/meshes/base.dae"/> 
                </geometry>
                <material name="Gazebo/Black" />
            </visual>
            <inertial>
                <origin xyz="0 0 0" rpy="0 0 0"/>
                <mass value="10.0"/>
                <inertia
                    ixx="1.0" ixy="0" ixz="0"
                    iyy="1.0" iyz="0"
                    izz="1.0"/>
            </inertial>
        </link>
        <gazebo reference="base_link">
            <material>Gazebo/Black</material> 
        </gazebo>
        <link name="basecolor_link">        
            <collision>
                <origin xyz="0 0 0" rpy="0 0 0"/>
                <geometry>
                    <box size="0.0001 0.0001 0.0001"/> 
                </geometry>
            </collision>            
            <visual>
                <origin xyz="0.065 -0.11 -0.15" rpy="0 0 0" /> 
                <geometry>
                    <mesh filename="package://evarobotmodel_description/meshes/base_orange.dae"/>  
                </geometry>
                <material name="Orange" />
            </visual>
            <inertial>
                <origin xyz="0 0 0" rpy="0 0 0"/>
                <mass value="0.0001"/>
                <inertia
                    ixx="1e-6" ixy="0.0" ixz="0.0"
                    iyy="1e-6" iyz="0.0"
                    izz="1e-6"/>
            </inertial>         
        </link>
        <gazebo reference="basecolor_link">
            <material>Gazebo/Orange</material> 
        </gazebo>               
        <joint name="basecolor_joint" type="fixed">
            <axis xyz="0 1 0" />
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <parent link="base_link"/>
            <child link="basecolor_link"/>
        </joint>    
    <!-- LEFT WHEEL -->
        <link name="left_wheel_link">
            <collision>
                <origin rpy="1.57075 0 0" xyz="0 0 0"/>
                <geometry>
                    <cylinder length="0.035" radius="0.085"/>
                </geometry>
            </collision>
            <visual>
                <origin rpy="0 0 1.57079632679" xyz="0 0 0"/> 
                <geometry>
                     <mesh filename="package://evarobotmodel_description/meshes/rim.dae" scale="1 1 1"/> 
                </geometry>
                <material name="Grey"/>
            </visual>
            <inertial>
                <origin rpy="1.57075 0 0" xyz="0 0 0"/>
                <mass value="0.85"/>
                <inertia
                    ixx="0.001" ixy="0" ixz="0"
                    iyy="0.001" iyz="0"
                    izz="0.001"/>
            </inertial>
        </link>
        <gazebo reference="left_wheel_link">
            <material>Gazebo/Grey</material>
            <mu1>1.0</mu1>
            <mu2>1.0</mu2>
            <kp>1000000.0</kp>
            <kd>100.0</kd>
            <minDepth>0.001</minDepth>
            <maxVel>1.0</maxVel>        
        </gazebo>
        <joint name="left_wheel_joint" type="continuous">
            <axis xyz="0 1 0"/>
            <parent link="base_link"/>
            <child link="left_wheel_link"/>
            <origin rpy="0 0 0" xyz="0 0.16 -0.119"/>
        </joint>
        <link ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-02-18 10:53:12 -0600

DidemÖzüpekTas gravatar image

It looks like joint_state_publisher plugin joints' links in your urdf not connected to odom while working with real robot. Can you try the add robot_description param again "< param name="robot_description" command="cat $(find evarobotmodel_description)/urdf/evarobotmodel.urdf" /> " inside the joint_state_publisher node in launch file.

edit flag offensive delete link more

Comments

I tried to add the robot description tag to joint_state_publisher but didn't work, it gave same errors .

q8wwe gravatar image q8wwe  ( 2020-02-18 12:14:51 -0600 )edit

Maybe there is a time conflict between odom -> base_link and base_link-> other_links. Can you listen /tf topic and analyse the ros time odom->base_link and base_link-> not transform links. If it is the problem you can change the header.stamp in odom_to_base tf broadcaster like this: odom_trans.header.stamp = ros::Time::now();

DidemÖzüpekTas gravatar image DidemÖzüpekTas  ( 2020-02-19 02:14:37 -0600 )edit

I tried to add : odom_trans.header.stamp = ros::Time::now(); , but it didn't work it gave same error . is there any other solution or idea i can try to solve this problem .

q8wwe gravatar image q8wwe  ( 2020-02-19 10:35:49 -0600 )edit

I have reproduce your problem with your code and launch file with Indigo Evarobot and Kinetic ROS Slave PC. ros::Time::now() solved the issue. I have no better idea.

DidemÖzüpekTas gravatar image DidemÖzüpekTas  ( 2020-02-20 00:14:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-18 08:26:29 -0600

Seen: 1,640 times

Last updated: Feb 18 '20