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
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" />