0

I'm trying to setup simulated pepper in gazebo for navigation but I can't visualize any topic in map or odom frame because rviz can't find any transformation between links but my tf tree looks normal. my rviz errors my tf tree. I think the problem might be with the names of the frames because in tf tree they all have prefix pepper_robot and in rviz they are missing that prefix. Thanks

bornaZbodulja
  • 37
  • 4
  • 9

1 Answers1

0

Yes, the problem is that the tf frames being published (by robot_state_publisher) don't match the frame ids being published by the sensors.

I assume you're using the pepper-ros-stack repo (if not, it serves as a good example of what changes to make).

Somewhere, a launch file you're using probably has something that looks like below:

<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="tf_prefix" value="pepper_robot"/>
</node>

This is where the tf_prefix is being set and added to all your tf frames. Remove it and it should match with the frames being published by the sensors.

<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" />
Dominic D
  • 1,778
  • 2
  • 5
  • 12
  • Thanks for reply. I'm indeed using that repo. I will remove the prefix in launch file. Thanks! – bornaZbodulja Apr 29 '20 at 10:04
  • Just one more question: Why is the initial z coordinate in [repo_launch_file](https://github.com/larics/pepper-ros-stack/blob/master/pepper_virtual/pepper_gazebo_plugin/launch/pepper_gazebo_plugin_Y20.launch) set to 0.88 and when I try to change it robot falls right at the start of simulation? – bornaZbodulja Apr 29 '20 at 10:11
  • I'm not 100% sure without digging into it more, but it seems like the origin of the Pepper URDF file is not Pepper's base, but higher up (perhaps 0.88 m above the base). So that offset just accounts for it. – Dominic D Apr 29 '20 at 22:17