ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rviz use last tf (transform) message for creating visualization

asked 2019-06-30 01:37:36 -0500

Junskter gravatar image

I have a map frame, a camera frame and a robot frame. The transform between map frame and the camera frame is fixed and gets published occasionally, ~10 seconds irregular intervals. The transform between the camera and the robot gets published at ~30Hz. The Rviz visualization of the robot's pose is with reference to the map frame and it gets updated only after it receives a new /tf message for transform between map and camera. I want Rviz to use whatever previous transform is available from the tf tree to create the visualization. Thank you in advance :)

edit retag flag offensive close merge delete

Comments

How are you punishing the tf between map and camera? Have you considered using a static transform publisher node?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-30 12:35:20 -0500 )edit

All transforms are being published based on the detection of Aruco markers using the aruco_ros package (https://github.com/pal-robotics/aruco...) - one marker on the robot and one marker on the floor (map frame).

The issue was that sometimes one marker got covered or the lighting condition inhibited tracking. I managed to put the marker on the floor to an alternate position and improved the lighting, which solved the problem for me.

Thanks for your suggestion as well, I can create a node that reads up the transform at the start and then publishes it at a constant rate later on (I hope I understood it right). Might come handy later on.

Junskter gravatar image Junskter  ( 2019-06-30 13:55:22 -0500 )edit

This sounds similar to a setup we had once, where the transform between the camera and the marker is fixed. We made a node which averaged 5 seconds of poses and then published that fixed transform for the rest of the experiment.

Hope this fixes your problem

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-01 08:19:47 -0500 )edit

Thank you! :D If you like you may post that as an answer

Junskter gravatar image Junskter  ( 2019-07-01 11:44:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-02 04:59:49 -0500

To summarise the discussion in the form of an answer. The OP is using aruco markers to determine the transformation between the camera frame and the world frame, however the markers were occasionally being occluded which meant the transformations were not being publishing and the TF tree would be occasionally broken. Importantly in this case the camera is fixed so the TF can be assumed to be static.

A potential solution would be making a simple custom node which averaged a few seconds of the world to camera TF at the start of the experiment and stored it. The node can then publish this stored TF at a fixed rate and it will not be effected by any occlusions of the marker.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-06-30 01:37:36 -0500

Seen: 777 times

Last updated: Jul 02 '19