I have a robot in .sdf, that I'm simulating in Gazebo Ignition. For further development I need TF of that robot. How can I get it?
I found information, that TF is published to /world/<world_name>/model/<model_name>/state (source), in my case /world/roomba_world/state, with message of type
enter image description here How can i bridge it to ROS Humble? What is ROS substitute of SerializedStepMap?

ros2 run ros_gz_bridge parameter_bridge /world/roomba_world/state@???[ignition.msgs.SerializedStepMap

My second question: I found other tutorials using ros_gazebo_pkgs, but current documentation of Gazebo for ROS users tells to install Ignition, what is current way to do simulations? URDF of robot in ROS + ros_gazebo_pkgs? Currently I have SDF for Ignition/Gazebo and simplified URDF for RViz2, it is convinient, because I can simulate lidar without <gazebo></gazebo> tags etc, but on the other hand it is not that easy to get TF.


2 Answers 2


The JointStatePublisher plugin publishes a gz.msgs.Model (might be the SerializedStepMap on older Ignition versions - which version do you use?) to a joint_state topic by default and the equivalent for that in the ROS domain is a sensor_msgs/msg/JointState, see here. But this isn't a TF2 yet.
You also need a robot_state_publisher that subscribes to the joint states and generates a TF2 based on the input robot description.

Yes, for new projects one should use the new Gazebo (Ignition). You can convert a SDF to URDF via sdformat_urdf and this is also available in RViz as it is published to the robot_description topic as usual.

  • $\begingroup$ Gonna try that tomorrow, I have got another question. In older gazebo you could build a little room like in the Sims, is there sth similar in Ignition? TBH Ignition looks weak compared to older gazebo. By referring to old gazebo I mean youtu.be/laWn7_cj434?si=bjbu8d3HprOz8Zmi&t=20m23s am I wrong and ignition is better? $\endgroup$
    – DR4NKR1D3R
    Commented Sep 1, 2023 at 22:05
  • $\begingroup$ Not that I'm aware of. For this aspect the old Gazebo seems more suitable at the moment. However, complex worlds are likely to be built with CAD tools and then exported to SDF, see e.g. here. $\endgroup$
    – Bi0T1N
    Commented Sep 1, 2023 at 22:18

Looks like I managed to solve the issue with @Bi0T1N help. To anyone interested in my setup:

  1. I have .sdf file with my world (walls and robot)
  2. I'm running Gazebo simulation
  3. Gazebo publishes some topics (there is /tf topic but it is just tf of robot in the world), I'm using joint_state, lidar, IMU, cmd_vel
  4. To get more TF I'm running robot_state_publisher
  5. robot_state_publisher needs .urdf, using parsers is not worth it in my case, so I'm repeating .sdf robot in .urdf with some changes
  6. Gazebo lidar publishes static frame, that I'm using in RViz2, I have to TF frrm that frame to chassis and then to wheels etc.
  7. At the end I have got 2 robot description files, full TF tree, working Gazebo and RViz (TF, RobotModel, LidarFrame) without any errors.



Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.