odometry: Could not get transform from camera_link to camera_rgb_optical_frame

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

odometry: Could not get transform from camera_link to camera_rgb_optical_frame

namjoshiniks
Hi Mathieu,

I am trying to implement indoor navigation with iRobot Create2, PrimeSense Camera,Jetson TX2  using Rtabmap. I am able to run Rtabmap ros successfully with camera but when I launch turtlebot minimal bring up I get the warning as follows:



The camera co-ordinate frame starts moving in the rtabmapviz even when the camera is stationary. This happens only after launching turtlebot, otherwise it works fine.

I checked the tf and before running turtlebot minimal bringup launch file I  get frames as below:
frames.wo.turtlebot.pdf

and the frames generated after turtlebpt bringup is as below:
frames.with.turtlebot.pdf

Turtlebot launch file creates an odometry topic named as /odom. The topic name is same as the name /odom which is created by rtabmap. Not sure if same topic names in different nodes is causing the issue or not, but seems like the issue is revolving around odometry data. Please assist me in this issue.

Thanks,
Nikhil Namjoshi
Reply | Threaded
Open this post in threaded view
|

Re: odometry: Could not get transform from camera_link to camera_rgb_optical_frame

matlabbe
Administrator
Hi,

Launch rtabmap without visual odometry. Are you using rtabmap.launch? The argument visual_odometry can be set to false. If you launch turtlebot bringup alone, what TF do you have? The camera would be linked to /base_link and there should be a TF /odom -> /base_link published by turtlebot odometry. You will have to set frame_id of rtabmap to base_link.
$ roslaunch rtabmap_ros rtabmap.launch args:="--delete_db_on_start" visual_odometry:=false frame_id:=base_link

To use visual odometry, you would have to modify turtlebot bringup to not publish /odom -> /base_link transform and remap /odom topic.

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

Re: odometry: Could not get transform from camera_link to camera_rgb_optical_frame

namjoshiniks
Hi Mathieu,

Thanks a lot for all your help!!

We did get the frames correct and have attached the pdf for the frames in the attachments. However when we run RTAB map_ros the camera frame exhibits weird behaviour. It keep moving in circular manner even though I have held it still. Here
 is the video that demonstrates its behaviour.

The frames.pdf is attached.frames.pdf.

I am turning on turtle bot minimal bringup. Then I run below two commands.

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start"
roslaunch rtabmap_ros demo_turtlebot_mapping.launch

I am also getting the error while executing "roslaunch rtabmap_ros demo_turtlebot_mapping.launch"
"[ERROR] [1519082023.502461535]: Extrapolation Error looking up robot pose: Lookup would require extrapolation into the past.  Requested time 1519082013.378745465 but the earliest data is at time 1519082013.419419050, when looking up transform from frame [base_footprint] to frame [map]"



Thanks,
Nikhil
Reply | Threaded
Open this post in threaded view
|

Re: odometry: Could not get transform from camera_link to camera_rgb_optical_frame

matlabbe
Administrator
Hi,

If you use demo_turtlebot_mapping.launch, you should not start rtabmap.launch, like shown in this tutorial: http://wiki.ros.org/rtabmap_ros/Tutorials/MappingAndNavigationOnTurtlebot

demo_turtlebot_mapping.launch already starts rtabmap node.

Is the warning appearing often? If not, you can ignore it. It may be just that move_base is trying to get the pose in map frame while the mapping node is not yet initialized.

For the turning behavior, it may be more a move_base related issue, or that your node publishing odometry is publishing wrong values when standing still.

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

Re: odometry: Could not get transform from camera_link to camera_rgb_optical_frame

namjoshiniks
Thanks a lot Mathieu. The error was because I was launching rtabmap.launch and demo_turtlebot.launch together. Its all good now.