URDF tutorial Got Error

asked 2017-08-09 03:54:14 -0500

ZQ.SHI gravatar image

updated 2017-08-13 10:47:16 -0500

System: Ubuntu 16.04.02

ROS Version: Kinetic

The screenshot for the problem: image description

I will try my best to describe it.

I just download the tutorial package from the Github: https://github.com/ros/urdf_tutorial/

Last time I tried, it was OK.

However, I reinstalled my system due to my PC error. Then if I tried to use

roslaunch urdf_sim_tutorial 09-joints.launch

It will launch gazebo normally. But there are many errors in the rivz RobotModel part.

Many errors such as :

No transform from [box] to [base_link]

However, I am pretty sure that there is such link in the file

So does any one encounter the same problem?

PS: I tried other files, they all give similar problem ( with the respect to the RobotModel in rivz)

I really appreciated if any one can help me.


I am sorry to make this question so long...

Here is the LAUNCH file:

  <arg name="model" default="$(find urdf_sim_tutorial)/urdf/09-publishjoints.urdf.xacro"/>
  <arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz" />
  <include file="$(find urdf_sim_tutorial)/launch/gazebo.launch">
    <arg name="model" value="$(arg model)" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" />
  <rosparam command="load"
            file="$(find urdf_sim_tutorial)/config/joints.yaml"
            ns="r2d2_joint_state_controller" />
  <node name="r2d2_controller_spawner" pkg="controller_manager" type="spawner"
          --shutdown-timeout 3"/>

Here is the 09-publishjoints.urdf.xacro:

<?xml version="1.0"?>
<robot name="gazebo1" xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:property name="width" value="0.2" />
  <xacro:property name="leglen" value="0.6" />
  <xacro:property name="polelen" value="0.2" />
  <xacro:property name="bodylen" value="0.6" />
  <xacro:property name="baselen" value="0.4" />
  <xacro:property name="wheeldiam" value="0.07" />
  <xacro:property name="pi" value="3.1415" />

  <material name="blue">
    <color rgba="0 0 0.8 1"/>

  <material name="black">
    <color rgba="0 0 0 1"/>

  <material name="white">
    <color rgba="1 1 1 1"/>

  <xacro:macro name="default_inertial" params="mass">
      <mass value="${mass}" />
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" />

  <link name="base_link">
        <cylinder radius="${width}" length="${bodylen}"/>
      <material name="blue"/>
        <cylinder radius="${width}" length="${bodylen}"/>
    <xacro:default_inertial mass="10"/>

  <xacro:macro name="wheel" params="prefix suffix reflect">

    <link name="${prefix}_${suffix}_wheel">
        <origin xyz="0 0 0" rpy="${pi/2} 0 0" />
          <cylinder radius="${wheeldiam/2}" length="0.1"/>
        <material name="black"/>
        <origin xyz="0 0 0" rpy="${pi/2} 0 0" />
          <cylinder radius="${wheeldiam/2}" length="0.1"/>
      <xacro:default_inertial mass="1"/>
    <joint name="${prefix}_${suffix}_wheel_joint" type="continuous">
      <axis xyz="0 1 0" rpy="0 0 0" />
      <parent link="${prefix}_base"/>
      <child link="${prefix}_${suffix}_wheel"/>
      <origin xyz="${baselen*reflect/3} 0 -${wheeldiam/2+.05}" rpy="0 0 0"/>


  <xacro:macro name="leg" params="prefix reflect">
    <link name="${prefix}_leg">
          <box ...
edit retag flag offensive close merge delete


I'm not familiar with gazebo. But since you work with URDF, I guess you can visualize the tf tree using view_frames ? If that's the case could you show us the result of such a command line please :-)

Blupon gravatar image Blupon  ( 2017-08-09 09:15:32 -0500 )edit

Actually it is not related to Gazebo. Coz I use the 09-joints.launch file download from the ROS Wiki Tutorial. It is too long to copy the code here. So, here is the link to the launch file code: https://github.com/ros/urdf_tutorial/... Thx ! : )

ZQ.SHI gravatar image ZQ.SHI  ( 2017-08-09 12:49:30 -0500 )edit

oh.. may be I try to copy the code to the question and edit it. THx

ZQ.SHI gravatar image ZQ.SHI  ( 2017-08-09 12:51:52 -0500 )edit

How about posting a copy of your tf tree?

jayess gravatar image jayess  ( 2017-08-13 14:45:34 -0500 )edit

I am having the same issue. Could anyone help out? This is the output of view_frames

gkbot gravatar image gkbot  ( 2018-02-20 10:21:07 -0500 )edit