rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller
Hi guys!

I have a stereo camera (stereolabs ZED) broadcasting on the following:

[ INFO] [1446766235.485123283]: Advertized on topic rgb/image_raw
[ INFO] [1446766235.494671404]: Advertized on topic depth/image_raw
[ INFO] [1446766235.495143958]: Advertized on topic /camera/rgb/camera_info
[ INFO] [1446766235.495611184]: Advertized on topic /camera/depth/camera_info


and I have modified the rgbd_mapping.launch file to reflect these facts.

I am running through the handheld mapping tutorial, and i get the error:

[ WARN] [1446768388.774197693]: Could not get transform from camera_link to /zed_rgb_optical_frame after 1 second!

any idea what I could do? I understand its an issue with tf ? any help is super appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

matlabbe
Administrator
Hi,

rgbd_mapping.launch set the "frame_id" argument to "camera_link" by default. You could do:
$ roslaunch rtabmap_ros rgbd_mapping.launch frame_id:=zed_rgb_optical_frame
however, the resulting point cloud will not be in the RTAB-Map or ROS referential. The best is to publish an optical rotation for the camera:
$ rosrun tf static_transform_publisher 0 0.00 0 -1.571 0.0 -1.571 camera_link zed_rgb_optical_frame 100
$ roslaunch rtabmap_ros rgbd_mapping.launch frame_id:=camera_link

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller
matlabbe! thanks so much for the tip. I tried this and got the following:

[ INFO] [1446770010.924092177]: Odom: quality=226, std dev=0.011439m, update time=0.010160s
[ INFO] [1446770011.002209450]: Odom: quality=218, std dev=0.009536m, update time=0.010545s
[ INFO] [1446770011.078715424]: Odom: quality=197, std dev=0.010245m, update time=0.010436s
[ WARN] [1446770011.080395005]: Could not get transform from camera_link to /zed_depth_optical_frame after 1 second!
[ INFO] [1446770011.157439585]: Odom: quality=208, std dev=0.010208m, update time=0.011291s
[ WARN] [1446770011.164453291]: Could not get transform from camera_link to /zed_depth_optical_frame after 1 second!
[ INFO] [1446770011.234740255]: Odom: quality=215, std dev=0.012053m, update time=0.010585s
[ INFO] [1446770011.312692029]: Odom: quality=222, std dev=0.011304m, update time=0.010765s
[ INFO] [1446770011.390573252]: Odom: quality=207, std dev=0.010353m, update time=0.011173s
[ INFO] [1446770011.467857806]: Odom: quality=209, std dev=0.010383m, update time=0.011216s


with still no optical construction in rtabmap :\
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

matlabbe
Administrator
Odometry seems ok, is the gui showing anything? at least a referential moving? How did you modify rgbd_mapping.launch?
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller
I did the same for the other link:
rosrun tf static_transform_publisher 0 0.00 0 -1.571 0.0 -1.571 zed_rgb_optical_frame zed_depth_optical_frame 100


and its working to some extent now. thanks so much for that. I know tomorrow i'll need to set the right transforms, it seems off.



Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller
Hey I think it works! Thanks

However now that I have the program running I think the x,y,z axes are mixed up. Specifically when I rotate about my z axis(towards the ceiling) in the pram it rotates about the red axis (into the screen). What might cause this?

Let me know if that makes any sense.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller

I have these as my transformations and the image is as I would expect (in the upright position in front of me). I figure the error is in something I have done here.

<node pkg="tf" type="static_transform_publisher" name="camera_link_to_rgb_broadcaster"   args="0 0 0 3.14159265359 -1.5707963267948966 -1.5707963267948966 camera_link zed_rgb_optical_frame 100" />
    <node pkg="tf" type="static_transform_publisher" name="camera_link_to_depth_broadcaster" args="0 0 0 3.14159265359 -1.5707963267948966 -1.5707963267948966 zed_rgb_optical_frame zed_depth_optical_frame 100" />
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

matlabbe
Administrator
If you have the depth image registered with the RGB image, you can set a null transform between rgb and depth:
<node pkg="tf" type="static_transform_publisher" name="camera_link_to_rgb_broadcaster"   args="0 0 0 -1.5707963267948966 0 -1.5707963267948966 camera_link zed_rgb_optical_frame 100" />
<node pkg="tf" type="static_transform_publisher" name="rgb_to_depth_broadcaster" args="0 0 0 0 0 0 zed_rgb_optical_frame zed_depth_optical_frame 100" />

Generally (as for freenect/openni/openni2 nodes), the node sending the registered images set the frame_id to RGB for the depth messages too.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap_ros: Could not get transform from camera_link to /zed_rgb_optical_frame

dgmiller


incredible! thanks so much! we have other sensors to integrate but this is a big first step. thanks for your help