0
$\begingroup$

Rosanswers logo

I've been following the tutorial from: http://wiki.ros.org/urdf/Tutorials/Building%20a%20Visual%20Robot%20Model%20with%20URDF%20from%20Scratch

I am currently attempting to run the 4th example 'Origins' using the command:

roslaunch urdf_tutorial display.launch model:=urdf/03-origins.urdf

However, every time I get an error in Rviz, essentially the leg is sticking straight through the middle of the base rather than being traslated to the side. I'm in the urdf_tutorial directory and have installed the joint_state_publisher package, so these are not the issues.

I'm encountering the error 'No transform from [right_leg] to [base_link]' and 'No tf data. Actual error: Fixed Frame [base_link] does not exist'. Any ideas on how to fix this? (If I was able to, I would upload a screenshot as well)

The urdf file I'm using is the same as from the tutorial, but posted below as well.

<?xml version="1.0"?>
<robot name="origins">
  <link name="base_link">
    <visual>
      <geometry>
        <cylinder length="0.6" radius="0.2"/>
      </geometry>
    </visual>
  </link>

  <link name="right_leg">
    <visual>
      <geometry>
        <box size="0.6 .2 .1"/>
      </geometry>
      <origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
    </visual>
  </link>

  <joint name="base_to_right_leg" type="fixed">
    <parent link="base_link"/>
    <child link="right_leg"/>
    <origin xyz="0.22 0 .25"/>
  </joint>

</robot>

Originally posted by Blumouse on ROS Answers with karma: 21 on 2015-05-22

Post score: 0


Original comments

Comment by manipulator on 2015-05-22:
i think you need to show your urdf file

Comment by Blumouse on 2015-05-22:
It's an urdf file in the urdf_tutorial package, but I posted for you as well.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Make sure that the fixed frame in rviz is set to base_link. This should be the default when using the launch file, but I'm guessing it got changed somehow.


Originally posted by David Lu with karma: 10932 on 2015-05-22

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

Figured it out. Just needing to restart roscore in the end, although It seems like too simple of a fix.


Originally posted by Blumouse with karma: 21 on 2015-05-22

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.