Ask Your Question
0

Adding a robot to RVIS, getting error: No transform from [] to []

asked 2019-07-07 20:26:37 -0500

horseatinweeds gravatar image

updated 2019-07-08 20:06:01 -0500

jayess gravatar image

Kinetic, ROS1

I've been through a variety of tutorials on adding a robot to RVIS. I made a simple differential control robot with a camera working nicely in Gazebo. According to the tutorials, which ROS and Gazebo running, you only need to add the robot model and specify the base link for Fixed Frame. I've done this, but under the robot model only the base_link has a Transform. The right wheel has the error "No transform from [right_wheel] to [base_link], and likewise for the left wheel, chassis, camera, and third wheel.

Also, the robot in RVIS isn't correct.

Is there a step I'm missing? Do I need anything more than the urdf model below? Thanks.

image description

simpleton.xacro

<?xml version="1.0"?>

<robot name="simpleton" xmlns:xacro="http://www.ros.org/wiki/xacro">

    <xacro:include filename="$(find simpleton_description)/urdf/simpleton.gazebo" />
    <xacro:include filename="$(find simpleton_description)/urdf/macros.xacro" />

    <xacro:property name="wheelThickness" value="0.1"/>
    <xacro:property name="wheelRadius" value="0.1"/>

    <xacro:property name="chassisWidth" value="0.3"/>
    <xacro:property name="chassisHeight" value="0.1"/>
    <xacro:property name="chassisLength" value="0.5"/>
    <xacro:property name="casterRadius" value="0.05"/>
    <xacro:property name="cameraSize" value="0.05"/>

    <!-- Base link --> 
    <link name="base_link" />

    <!-- Chassis --> 
  <joint name="base_joint" type="fixed">
    <parent link="base_link"/>
    <child link="chassis"/>
  </joint>

  <link name="chassis">
    <collision>
      <origin xyz="0 0 ${wheelRadius+(chassisHeight/2)}" rpy="0 0 0"/>
      <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 ${wheelRadius+(chassisHeight/2)}" rpy="0 0 0"/>
      <geometry>
            <box size="${chassisLength} ${chassisWidth} ${chassisHeight}"/>
      </geometry>
      <material name="white"/>
    </visual>

        <inertial>
          <mass value="1"/>
            <origin xyz="0 0 0" rpy="0 0 0"/>
          <box_inertia m="0.5" x="${chassisLength}" y="${chassisWidth}" z="${chassisHeight}"/>
        </inertial>
  </link>

    <wheel lr="left" y="-1"/>
    <wheel lr="right" y="1"/>

    <!-- Caster Wheel --> 
  <joint name="fixed" type="fixed">
    <parent link="chassis"/>
    <child link="caster_wheel"/>
  </joint>

  <link name="caster_wheel">

    <collision>
      <origin xyz="${casterRadius-chassisLength/2} 0 ${casterRadius-chassisHeight+wheelRadius}" rpy="0 0 0"/>
      <geometry>
    <sphere radius="${casterRadius}"/>
      </geometry>
    </collision>

    <visual> 
      <origin xyz="${casterRadius-chassisLength/2} 0 ${casterRadius-chassisHeight+wheelRadius}" rpy="0 0 0"/>
      <geometry>
    <sphere radius="${casterRadius}"/>
      </geometry>
      <material name="red"/>
    </visual>

    <inertial>
      <origin xyz="${casterRadius-chassisLength/2} 0 ${casterRadius-chassisHeight+wheelRadius}" rpy="0 0 0"/>
      <mass value="0.5"/>
      <sphere_inertia m="0.5" r="${casterRadius}"/>
    </inertial>
  </link>

    <!-- Camera -->
    <!-- You can adjust the camera angle with the p in rpy, measured in radians. -->
    <!-- You can also increate the height of the camera by adding a number, in meters, -->
    <!-- to the z in xyz. For example, to simulate a camera mounted on a 1/2 meter post, -->
    <!-- we can replace the ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-07-07 23:36:38 -0500

sachinkum0009 gravatar image

updated 2019-07-08 02:09:03 -0500

gvdhoorn gravatar image

The errors are showing because you did not add the robot_state_publisher node to your launch file

code :

<node pkg="robot_state_publisher" name="robot_state_publisher" type="robot_state_publisher" />

to your launch file

That would resolve the issue. By the way, keep up with your ROS journey.

edit flag offensive delete link more

Comments

1

Hi hunter,

Thanks for the reply. Adding the robot_state_publisher helped. Now the chassis, third wheel, and camera all show up correctly, but the two main wheels are still in the wrong place and have the No transform from error. I'm adding my launch file and another image to my original post.

horseatinweeds gravatar image horseatinweeds  ( 2019-07-08 18:46:05 -0500 )edit
1

I think that you need to add gazebo plugin for joint_state_publisher as:

<gazebo>
        <plugin name="joint_state_publisher" filename="libgazebo_ros_joint_state_publisher.so">
            <jointName>left_wheel_hinge,right_wheel_hinge</jointName>
        </plugin>
    </gazebo>

Try this out and tell the results. This should probably solve your problem. Let me know if you face any other issues.

BTW, keep buddy :)

sachinkum0009 gravatar image sachinkum0009  ( 2019-07-10 02:39:14 -0500 )edit
0

answered 2019-12-30 15:48:37 -0500

RobertKeszeg gravatar image

The same happens if you try to load a second robot_state_publisher, and the previous one dies. I did the same errors, thank you for your kind solutions, I really appreciate them.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-07-07 20:26:37 -0500

Seen: 801 times

Last updated: Jul 08 '19