Hello,
I am hoping to use RTABmap to provide odometry for my lidar-equipped robot. Since the robot is not starting aligned with the world frame, I wanted to use ground_truth_frame_id and ground_truth_base_frame_id to set the initial value of the odometry. I am using an optitrack system, which provides a ground truth frame and its parent frame which I call world (my tf tree is shown below). When I try to set the ground truth frame parameters, the odometry immediately fails (code output is below). If I do not set these values, the odometry values seem correct except they are not expressed in the correct frame.
It seems like the correct ground truth frame offset is captured by the program, but when it tries to find the initial correspondences it applies this transform which results in no correspondences with the scan.
rosrun tf view_frames output:
my launchfile code:
<node name="rtabmap1" pkg="rtabmap_ros" type="icp_odometry" output="screen" args="--delete_db_on_start --udebug"> <param name="frame_id" type="string" value="ouijabot1_odom"/> <param name="odom_frame_id" value="ouijabot1_odom_parent"/> <param name="ground_truth_frame_id" type="string" value="world"/> <param name="ground_truth_base_frame_id" type="string" value="ouijabot1"/> <remap from="/scan" to="/ouijabot1/scan" />
</node>console output: