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

RViz keep saying "No transform from [front_left] to [base_link]" [closed]

asked 2015-01-20 09:49:46 -0500

Dragon Qu gravatar image

I have a package named sp1s, I added a URDF, as simple as below:

    <?xml version="1.0"?>
<robot name="sp1s">
  <link name="base_link">
    <visual>
      <geometry>
        <box size="0.27 .15 .003"/>
      </geometry>
      <material name="white">
         <color rgba="1 1 1 .5"/>
    </material>
    </visual>
  </link>

  <link name="front_left">
    <visual>
      <geometry>
       <cylinder length=".025" radius="0.034"></cylinder>
      </geometry>
      <material name="yellow">
          <color rgba="1 1 0 1"/>
      </material>  
    </visual>
  </link>

  <joint name="base_to_front_left" type="continuous">
    <origin rpy="1.57075  0  0" xyz="0.06  0.064  -0.011"/>
    <parent link="base_link"/>
    <child link="front_left"/>    
    <axis xyz="0 0 1"/>
  </joint>

</robot>

Here is the launch file I edited:

<launch>
    <arg name="model" />
    <arg name="gui" default="False" />
    <param name="robot_description" textfile="$(arg model)" />
    <param name="use_gui" value="$(arg gui)"/>
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
    <node name="rviz" pkg="rviz" type="rviz"  args="-d  $(find sp1s)/urdf.rviz" required="true"/>
</launch>

When I launch it by "roslaunch sp1s display.launch model:=urdf/sp1s.urdf", the Rviz keep saying "No transform from [front_left] to [base_link]". I double checked my urdf content, I believe it caused by using joint type "continuous".

I strongly believe its a bug. When I follow the urdf_tutorial by 'roslaunch urdf_tutorial display.launch model:=urdf/06-flexible.urdf gui:=True', it was showing fine. But I changed the 06-flexible.urdf simply by add one space at the last empty line, launch it again it would say same thing on RViz

Why its happening, how to work around it?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Dragon Qu
close date 2015-01-21 06:15:05.226115

2 Answers

Sort by » oldest newest most voted
0

answered 2015-01-21 06:13:53 -0500

Dragon Qu gravatar image

I got it! It took me a whole day to figure out why. joint_state_publisher failed to parse the urdf xml file. It dumped error message:

UnicodeEncodeError: 'ascii' codec can't encode character

I used XML copy editor to compile the file. It was wrong. I should use Text Editor to do it. joint_state_publisher doesn't support Unicode xml file. But check_urdf is fine with that.

edit flag offensive delete link more

Comments

Glad you could figure it out. In the future, when something breaks like this, add the output="screen" attribute to nodes that might be giving you trouble so that you can see these error messages easier.

David Lu gravatar image David Lu  ( 2015-01-21 13:01:08 -0500 )edit
0

answered 2015-01-20 10:56:41 -0500

David Lu gravatar image

Your example works fine for me, except it doesn't like extra spaces before the

<?xml version="1.0"?>

line, but I assume that's just formatting for this page.

edit flag offensive delete link more

Comments

What could be possible reason on the error message? Did I miss any Ros tool? I searched all process, there is only a 'state-punlisher', could it caused by 'joint-state-publisher' tool? But I can see the joint control UI when follow up urdf totorial

Dragon Qu gravatar image Dragon Qu  ( 2015-01-20 18:00:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-20 09:47:23 -0500

Seen: 7,452 times

Last updated: Jan 21 '15