Gazebo | Ignition | Community
Ask Your Question

How to provide a Fixed Frame to Rviz Ignition?

asked 2022-05-06 08:14:56 -0500

raefsel gravatar image

updated 2022-05-06 10:01:46 -0500

I am trying to get started with RViz and Gazebo Ignition and have a simple two-wheeled robot with a lidar in Gazebo. I now would like to at least see the lidar in RViz but would prefer to see the lidar and have its center move around as my robot is moving in Gazebo. At this point I have tried everything that I can think of and have Google searched for everything that seems likely. I haven't found any demos that I could get to run that could help.

In RViz, I am seeing "Fixed Frame [Warn] No tf data. Frame [world] does not exist."

What can I do to provide a frame of reference so that Rviz will not have this error and will presumably let me see the lidar? I'm assuming that it would be something that I would put in my .sdf file.

Update: I just tried replacing RViz ignition with the older/alternate Rviz and am having the same issue there as well about not finding the fixed frame.

edit retag flag offensive close merge delete


If I were doing this with the older Gazebo, I would add the following within the libgazebo_ros_diff_drive plugin section of my .world file: <odometry_frame>world_frame</odometry_frame> In Rviz, I would select "world_frame" as my fixed frame in Global Options. That would make the lidar's location in RViz track around with the location of my robot.

raefsel gravatar imageraefsel ( 2022-05-06 09:29:33 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2022-05-09 12:33:11 -0500

raefsel gravatar image

For the future reference of anyone else searching for the same thing: Based on Azeey's response, I now have a fixed frame that Ignition RViz likes but I still can't see my lidar. The code that Azeey posted is giving the following two topics that are seen when I enter ign topic -l


I named my model 'jack_robot' in the .sdf file.

I stuck the code that Azeey posted within this tag:

<model name='jack_robot' canonical_link='chassis'>

That didn't solve the issue of Ignition RViz not finding a fixed frame. It was the bit at the end of his message that did the trick. I created a static transform publisher based off of the Python turtlebot tf2 example code. I have the following in that code:

static_transformStamped.header.frame_id = 'world'
static_transformStamped.child_frame_id = 'jackFrameId'

Both of those are showing up in Ignition Rviz and it is happy with respect to the fixed frame issue that I was seeing before.

To get those fixed frames over to Ignition I need to have the following in my launch file:


If I am understanding what Azeey is saying with his links, I would take the poses generated by Ignition Gazebo and would use a bridge to get that over to ROS2 where my node would republish it as a /tf and use another bridge to get it back to Ignition whre Rviz will now be happy AND will track the position of the robot. I plan on trying that in a bit but first I want to see my lidar in Rviz. Provided that I get that to happen and succeed in what I just described, then I'll update this post with full details of how I got it to work.

edit flag offensive delete link more

answered 2022-05-06 15:37:49 -0500

azeey gravatar image

I think you can do this by using the PosePublisher system. Here's an example from SubT:

   <plugin filename=""
        <publish_nested_model_pose>true</publish_nested_model_pose> <!-- this bit is important -->

You'll also need a ros_ign bridge and a TF broadcaster

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2022-05-06 08:14:56 -0500

Seen: 24 times

Last updated: May 09