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

Display CameraInfo/Image message with frame_id != fixed frame

asked 2016-02-15 09:48:01 -0500

sascha gravatar image

updated 2016-02-15 12:31:02 -0500

Hi guys,

I've tried to display multiple CameraInfo/Image messages within rviz. I have tf_broadcasters, publishing the camera transformations with about 50 Hz.

My CameraInfo/Image messages have different frame_id's and I want to visualize them with rviz' default plugin. However, a camera image only shows up if the global fixed frame is equal to the image frame_id. Specifically, the warning within the plugin is :

  1. No CameraInfo received on [/sensor/camera/st_front_right_rect/camera_info]. Topic may not exist.
  2. No Image received

At first, I thought this could happen because of tf, but this seems to be fine.

My tf tree, visualized via view_frames looks fine (one root, with several leaves). In particular, doing a rosrun tf tf_monitor camera_rig_calibration st_front_left_rect gives me

RESULTS: for camera_rig_calibration to st_front_left_rect
Chain is: camera_rig_calibration -> st_front_left_rect
Net delay     avg = 0.0161706: max = 0.223564

Frames:
Frame: st_front_left_rect published by unknown_publisher Average Delay: 0.00131894 Max Delay: 0.030248

Doing a rostopic echo /sensor/camera/st_front_left_rect/image_rect/header gives me for the Image/header:

seq: 1077
stamp: 
  secs: 18980
  nsecs: 802162648
frame_id: st_front_left_rect

and rostopic echo /sensor/camera/st_front_left_rect/cameraInfo/header for the CameraInfo/Header:

seq: 1077
stamp: 
  secs: 18980
  nsecs: 802162456
frame_id: st_front_left_rect

However, I cannot visualize the image for fixed frame camera_rig_calibration.

Any ideas, how I could further debug? Thanks in advance for any help provided!

What could be other reasons for the CameraInfo/Image not showing up? I can provide further code if desired.

Regards, Sascha

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-02-20 05:55:43 -0500

sascha gravatar image

I solved my problem using the tf2_ros::StaticTransformPublisher for publishing the transformation graph.

I guess my problem was that transfomations and cameras were published in two different processes and thus had slightly different stamps.

edit flag offensive delete link more
1

answered 2016-02-15 11:25:49 -0500

If you have a fully connected tf tree, the images should show up. If displaying only works when setting the fixed frame to the camera frame, the most likely causes are either the tf tree being not fully connected or timestamps of images and tf data not matching up.

edit flag offensive delete link more

Comments

Hi Stefan,

thanks for your quick reply. A wrong TF configuration was also my guess. I edited my original post and included some info on it. Do you have any recommendations on how to further inspect it?

sascha gravatar image sascha  ( 2016-02-15 12:32:52 -0500 )edit

Try roswtf

lucasw gravatar image lucasw  ( 2016-02-15 14:07:28 -0500 )edit

The timestamp for your image and camera info message are not equal, this might also be problematic.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2016-02-15 16:07:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-15 09:48:01 -0500

Seen: 1,562 times

Last updated: Feb 20 '16