tf issue while sending xtion data over network

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

tf issue while sending xtion data over network

Parnia
I have written a node to send xtion data over wifi (without ros network) . I don't use rtabmap_remote for some reasons.
These topics are sent over wifi:
/camera/depth_registered/image_raw
/camera/rgb/camera_info
/camera/rgb/image_rect_color


and all of the frame_ids of these topics are camera_rgb_optical_frame. when I set rtabmap's frame_id to camera_rgb_optical_frame, the map is rotated and it seems like the coordinates are messed up.
so I write a static tf from /myframe to /camera_rgb_optical_frame and i set rtabmap's frame_id to myframe:
rosrun tf static_transform_publisher 0 0 0 0 0 0 myframe camera_rgb_optical_frame 10
(numbers are set to zero for testing. the numbers should be set according to the tf from /camera_rgb_optical_frame to /camera_link that openni2 publishes)

and run rtabmap:
roslaunch rtabmap_ros rgbd_mapping.launch frame_id:=myframe

but it gives the following tf warning and the rviz screen is black:
[ WARN] [1471767621.890455557]: odometry: Could not get transform from myframe to camera_rgb_optical_frame (stamp=1471681180.148135) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)!

here's the tf tree:



why doesn't rtabmap recognize the tf while it exists on the tf tree?

Reply | Threaded
Open this post in threaded view
|

Re: tf issue while sending xtion data over network

matlabbe
Administrator
Is the static_transform_publisher running on the remote or local computer? The timestamps in the topics should be synchronized with TF time. Make sure your computers are synchronized.

The transform would be (-PI/2 rotations):
$ rosrun tf static_transform_publisher 0 0 0 -1.5707963267948966 0 -1.5707963267948966 myframe camera_rgb_optical_frame 10

cheers
Reply | Threaded
Open this post in threaded view
|

Re: tf issue while sending xtion data over network

hosh0425
In reply to this post by Parnia
Hello
If you checked all off the TFs and you are sure about them , I suggest you use rtabmap_args:="--delete_db_on_start"
when you will run the RTAB