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

URDF tutorial Got Error

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

ZQ.SHI gravatar image

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

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.

Thanks.

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

Here is the LAUNCH file:

<launch>
  <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)" />
  </include>
  <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"
    args="r2d2_joint_state_controller
          --shutdown-timeout 3"/>
</launch>

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>

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

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

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

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

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

    <link name="${prefix}_${suffix}_wheel">
      <visual>
        <origin xyz="0 0 0" rpy="${pi/2} 0 0" />
        <geometry>
          <cylinder radius="${wheeldiam/2}" length="0.1"/>
        </geometry>
        <material name="black"/>
      </visual>
      <collision>
        <origin xyz="0 0 0" rpy="${pi/2} 0 0" />
        <geometry>
          <cylinder radius="${wheeldiam/2}" length="0.1"/>
        </geometry>
      </collision>
      <xacro:default_inertial mass="1"/>
    </link>
    <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"/>
    </joint>

  </xacro:macro>

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

Comments

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 -0600 )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 -0600 )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 -0600 )edit

How about posting a copy of your tf tree?

jayess gravatar image jayess  ( 2017-08-13 14:45:34 -0600 )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 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-02-14 20:29:04 -0600

fegonzalez gravatar image

That is intended.

It just happens because transmissions have not been defined. In the tutorial first transmission the head and base link joint is corrected.

https://github.com/ros/urdf_sim_tutor...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-08-09 03:50:21 -0600

Seen: 1,148 times

Last updated: Aug 13 '17