Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

/model/jack_robot/pose
/model/jack_robot/pose_static

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:

    Node(
        package='ros_ign_bridge',
        executable='parameter_bridge',
        arguments=['/tf@tf2_msgs/msg/TFMessage@ignition::msgs::Pose_V']
    ),

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.