Open yuan-0816 opened 5 months ago
For the missing loop closures, it is difficult to see, maybe they were rejected for some reason (look at the terminal for possible warnings about loop closures rejected). You can share the database if you want, it will be easier to see it.
On odometry automatic reset, if guess_frame_id
doesn't exist, it is reset to last pose. If last pose has not Identity rotation (which is likely the case), the imu orientation initialization will be skipped. To force reset with latest IMU orientation, you may change
https://github.com/introlab/rtabmap_ros/blob/74d611c46553f19ea0dc553abb67e7eaadab0e15/rtabmap_odom/src/OdometryROS.cpp#L872-L873
to
Transform newPose(odometry_->getPose().x(), odometry_->getPose().y(), odometry_->getPose().z(), 0,0,0);
this->reset(newPose);
Note that we need to also change odometry_->reset
to this->reset
.
Another approach without modifying code is to provide another "odometry" frame that could be simply be the IMU orientation and use guess_frame_id
. For convenience, we provide a node to publish that kind of TF, see rtabmap_util/imu_to_tf node.
For all odometry approaches that are not VIO, if IMU is provided, the first pose will be initialized with gravity. Other specifications:
For third party approaches, I suggest to try their official repo first (if they provide a ros2 node already). It is possible to use their visual odometry node directly as input to rtabmap
node, however, to correctly get TF odometry estimation of the base frame of the robot and not the camera, using the integration inside rtabmap can be more convenient. If you are using ROS2, if they didn't provide a non-ros library, it may be difficult to compile them inside rtabmap though.
I am using the Realsense D435i to build a map (utilizing the infrared and depth cameras, RGBD odometry).
my ENV: ubuntu 22.04 ros2 humble
To prevent odometry lost, I have configured some parameters.
rtabmap_odom
package, I usergbd_odometry
, I setrtabmap_slam
package, I setThis is my rtabmap launch file
I am encountering an issue during the map creation where the same location is being built twice, and loop closure detection is not being triggered.
https://github.com/introlab/rtabmap_ros/assets/83689217/4008bb3d-0ca5-436c-bc44-2f2f7faca9aa
The areas circled in red and blue represent the same space.
How should I configure the parameters for loop closure detection?
I have set
wait_imu_to_init
to true, but when the odometry is lost and reset, it seems that IMU and gravity alignment are not utilized. Is there a way to configureOdom/ResetCountdown
to trigger the use of IMU data for gravity alignment during the reset?Additionally, I would like to ask about the RTABMAP_PARAM
Is there any difference between them? OpenVINS seems to use the VIO method (I understand that RTAB-Map only aligns gravity at the beginning).