Hi,
after some tests I have found what it seems a pretty stable version of the system. The key is to use the two IR of the d435i separately and hence, use rtabmap with IR configuration instead of depth one.
Overall the opensource_tracking.launch file looks like this:
<launch>
<arg name="offline" default="false"/>
<include unless="$(arg offline)"
file="$(find realsense2_camera)/launch/rs_camera.launch">
<arg name="align_depth" value="true"/>
<arg name="linear_accel_cov" value="1.0"/>
<arg name="enable_gyro" value="true"/>
<arg name="enable_accel" value="true"/>
<arg name="unite_imu_method" value="linear_interpolation"/>
<arg name="enable_infra1" value="true"/>
<arg name="enable_infra2" value="true"/>
</include>
<node pkg="imu_filter_madgwick" type="imu_filter_node" name="ImuFilter">
<param name="use_mag" type="bool" value="false" />
<param name="_publish_tf" type="bool" value="false" />
<param name="_world_frame" type="string" value="enu" />
<remap from="/imu/data_raw" to="/camera/imu"/>
</node>
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
<arg name="args" value="--delete_db_on_start"/>
<!--arg name="rgb_topic" value="/camera/color/image_raw"/-->
<!--arg name="depth_topic" value="/camera/aligned_depth_to_color/image_raw"/-->
<!--arg name="camera_info_topic" value="/camera/color/camera_info"/-->
<!--arg name="depth_camera_info_topic" value="/camera/depth/camera_info"/-->
<arg name="rtabmapviz" value="false"/>
<arg name="rviz" value="true"/>
<arg name="left_image_topic" value="/camera/infra1/image_rect_raw"/>
<arg name="right_image_topic" value="/camera/infra2/image_rect_raw"/>
<arg name="left_camera_info_topic" value="/camera/infra1/camera_info"/>
<arg name="right_camera_info_topic" value="/camera/infra2/camera_info"/>
<arg name="stereo" value="true"/>
</include>
<include file="$(find robot_localization)/launch/ukf_template.launch"/>
<param name="/ukf_se/frequency" value="300"/>
<param name="/ukf_se/base_link_frame" value="camera_link"/>
<param name="/ukf_se/odom0" value="rtabmap/odom"/>
<rosparam param="/ukf_se/odom0_config">[true,true,true,
true,true,true,
true,true,true,
true,true,true,
true,true,true]
</rosparam>
<param name="/ukf_se/odom0_relative" value="true"/>
<param name="/ukf_se/odom0_pose_rejection_threshold" value="10000000"/>
<param name="/ukf_se/odom0_twist_rejection_threshold" value="10000000"/>
<param name="/ukf_se/imu0" value="/imu/data"/>
<rosparam param="/ukf_se/imu0_config">[false, false, false,
true, true, true,
true, true, true,
true, true, true,
true, true, true]
</rosparam>
<param name="/ukf_se/imu0_differential" value="true"/>
<param name="/ukf_se/imu0_relative" value="false"/>
<param name="/ukf_se/use_control" value="false"/>
<!-- <param name="/ukf_se/odom0_config" value="{true,true,true,}"/> -->
</launch>
Hi, The same happens to me. I am guessing it is a divergence problem of the ufk filter. When visual odometry is lost, the input to UFK is only the IMU of the D435i. My guess is that this Kalman filter does not converge. It seems it is somehow a "normal" behavior. I am doing more research in case I am able to solve it, or at least improve the performance