Hi.
I have a Kinect on my robot from which I create a map. I then switch to localization mode and use the rgbd_odometry node to help track position. This all works great.
I am now trying to take the map created by the robot and localize a Kinect 2 (in handheld mode) within that map, whilst the robot is still running, so that their relative positions are correct. In order to do this I am running separate instances of rtabmap and rgbd_odometry for the Kinect 2. I have set the odom_frame_id in rtabmap and rgbd_odometry to kinect2_odom so that it is different to odom which is the frame for the robot. I am not sure if this is the correct approach? I am also running the Kinect 2 nodes under a different namespace so that they don't clash.
When I visualize the Kinect 2 and the robot
within the map generated by the Kinect 2 nodes, the Kinect 2 is in the correct position but the robot is not:
When I visualize the Kinect 2 and the robot
within the map generated by the robot nodes, the robot is in the correct position but the Kinect 2 is not:
Here is my tf tree:
Where am I going wrong here? Is there a way to configure it so that the maps generated by the two instances of rtabmap are aligned and the relative positions of the Kinect 2 and the robot are correct?
Many thanks for your help,
Jon.