Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing static transforms via Robot State Publisher #27

Open
ruffsl opened this issue Sep 19, 2020 · 8 comments
Open

Publishing static transforms via Robot State Publisher #27

ruffsl opened this issue Sep 19, 2020 · 8 comments
Labels
ignition Ignition

Comments

@ruffsl
Copy link

ruffsl commented Sep 19, 2020

It would be nice if this demo also published the TF tree for the dolly robot so the sensor feedback from for things like odomity and laser scans from different reference frames could be jointly visualized together in rviz.

Visualizing the mesh geometry of the platform in rviz would also be helpful, as well a provide a good reference for how to juggle and integrate urdf/sdf for making a simulation package for a ros2 robot.

I really like how this demo is sort of like a rosetta stone between classic gazebo and ignition, and would like to reference it to students on how to write their own. So it'd be great if this had the same polish as say the old TB3 demos, but while still being a minimal yet complete reference example to fork from.

@chapulina chapulina added the ignition Ignition label Sep 19, 2020
@ruffsl
Copy link
Author

ruffsl commented Sep 22, 2020

FYI, some relevant discussion on integrating SDFormat with ros2: ros/robot_state_publisher#144

@chapulina
Copy link
Owner

I played a bit with the sdformat_urdf package to see if I could use robot_state_publisher without changing the robot description from SDF to URDF. That package isn't released for Foxy though (ros/sdformat_urdf#3), so I tried compiling the galactic branch from source, as well as urdf_parser_plugin, but didn't get it to work 😕 It will be a bummer not to be able to do this on Foxy...

I'll try this on Galactic later. I'm still working on Dolly's Galactic migration on branch galactic_dev.

@hardesh
Copy link

hardesh commented Apr 5, 2022

Hi @chapulina,
Is there any update on this?

I've been trying to find a way to publish TFs with SDF, but have not found any way so far

@chapulina
Copy link
Owner

chapulina commented Apr 5, 2022

a way to publish TFs with SDF

You could add the PosePublisher plugin and start a ros_ign_bridge from /model/model_name/pose@geometry_msgs/TransformStamped[ignition.msgs.Pose.

It would be nice to add an example like this to ros_ign_gazebo_demos

@hardesh
Copy link

hardesh commented Apr 5, 2022

Interesting! Thanks for sharing. Will try this out and will raise a PR after that

@hardesh
Copy link

hardesh commented Apr 7, 2022

Hi @chapulina,
I tried this today. But it's not working. I added the plugin in the SDF of robot

<plugin filename="libignition-gazebo-pose-publisher-system.so" name="ignition::gazebo::systems::PosePublisher">
      <publish_link_pose>true</publish_link_pose>
      <publish_collision_pose>false</publish_collision_pose>
      <publish_visual_pose>false</publish_visual_pose>
      <publish_sensor_pose>false</publish_sensor_pose>
      <publish_nested_model_pose>true</publish_nested_model_pose>
      <update_frequency>20</update_frequency>
    </plugin>

When I echo the ign topic using ign topic -e --topic /robot/pose it's showing the data. But after adding the topic in parameter_bridge i'm not able to see the data on ROS2 topic

@hardesh
Copy link

hardesh commented Apr 7, 2022

Here's the parameter bridge node:

bridge = Node(
        package='ros_ign_bridge',
        executable='parameter_bridge',
        arguments=['/cmd_vel@geometry_msgs/msg/[email protected]',
                   '/scan@sensor_msgs/msg/[email protected]',
                   '/odometry@nav_msgs/msg/[email protected]',
                   '/model/movus/pose@tf2_msgs/msg/TFMessage[ignition.msgs.Pose_V',
                   '/world/station/model/movus/link/camera_front/sensor/color/camera_info@sensor_msgs/msg/CameraInfo[ignition.msgs.CameraInfo',
                   '/world/station/model/movus/link/camera_front/sensor/depth/camera_info@sensor_msgs/msg/CameraInfo[ignition.msgs.CameraInfo',
                   '/world/station/model/movus/link/camera_front/sensor/color/image@sensor_msgs/msg/Image[ignition.msgs.Image',
                   '/world/station/model/movus/link/camera_front/sensor/depth/depth_image/points@sensor_msgs/msg/PointCloud2[ignition.msgs.PointCloudPacked'],
        output='screen',
        remappings=[
            ('/world/station/model/movus/link/camera_front/sensor/color/camera_info', '/camera/color/camera_info'),
            ('/world/station/model/movus/link/camera_front/sensor/color/image', '/camera/color/image'),
            ('/world/station/model/movus/link/camera_front/sensor/depth/camera_info', '/camera/depth/camera_info'),
            ('/world/station/model/movus/link/camera_front/sensor/depth/depth_image/points', '/camera/depth/points')
        ]
    )

@hardesh
Copy link

hardesh commented Apr 7, 2022

Also I think I should create an issue in ros_ign 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignition Ignition
Projects
None yet
Development

No branches or pull requests

3 participants