This is my startup procedure for Gazebo and RTAB-Map, along with the TF tree structure. When using a real camera, I don't have IMU flipping issues, but the simulation in Gazebo is quite unstable. Can you help me? What other information do I need to provide? Lastly, this is my experiment video. I really appreciate your help!
"video in 2:50"
https://drive.google.com/file/d/1gGsxwR8mYgQWnOgwpqMoz52RDQK63-Hl/view?usp=drive_linkgazebo startup :
roslaunch iq_sim obstacles_d435i.launch
<launch >
<arg name="gui" default="true"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find iq_sim)/worlds/obstacles_d435i.world"/>
<arg name="gui" value="$(arg gui)"/>
</include>
</launch>
imu filter startup :
rosrun imu_filter_madgwick imu_filter_node \
_use_mag:=false \
_publish_tf:=false \
_world_frame:="enu" \
/imu/data_raw:=/camera/imu \
/imu/data:=/rtabmap/imu
rtabmap startup :
#!/bin/bash
# rosparam set rtabmap/SaveDatabase false &
# rosparam set use_sim_time true &
echo "Starting static transforms..."
rosrun tf static_transform_publisher 0 0 0 0 0 0 odom base_link 1 &
rosrun tf static_transform_publisher 0 0 -0.13 -1.57 0 -1.57 base_link camera_link 1 &
rosrun tf static_transform_publisher -0.0325 0 -0.13 0 0 0 camera_link drone_with_camera::camera_color_frame 1 &
rosrun tf static_transform_publisher -0.0325 0 -0.13 0 0 0 camera_link drone_with_camera::camera_depth_frame 1 &
rosrun tf static_transform_publisher 0 0 -0.13 -3.14 -1.57 1.57 base_link /rtabmap/imu 100 &
echo "Starting RTAB-Map..."
roslaunch rtabmap_ros rtabmap.launch depth_topic:=/camera/depth/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info imu_topic:=/rtabmap/imu frame_id:=base_link &
wait