rtab-map with airsim ROS foxy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

rtab-map with airsim ROS foxy

slexsos
Hello

im trying to get rtab-map working with airsim on ROS foxy
ubuntu 20.04.6
unreal 4.27.2

nexsos@nexsos-OptiPlex-7071:~/git_stuff/AirSim/ros2$ rtabmap --version
RTAB-Map:               0.21.1
PCL:                    1.10.0
With VTK:                7.1.1
OpenCV:                  4.2.0
With OpenCV xfeatures2d: false
With OpenCV nonfree:     false
With ORB OcTree:          true
With SuperPoint Torch:   false
With Python3:            false
With FastCV:             false
With OpenGV:             false
With Madgwick:            true
With PDAL:               false
With TORO:                true
With g2o:                 true
With GTSAM:              false
With Vertigo:             true
With CVSBA:              false
With Ceres:              false
With OpenNI2:             true
With Freenect:            true
With Freenect2:          false
With K4W2:               false
With K4A:                false
With DC1394:              true
With FlyCapture2:        false
With ZED:                false
With ZED Open Capture:   false
With RealSense:          false
With RealSense SLAM:     false
With RealSense2:         false
With MYNT EYE S:         false
With DepthAI:            false
With libpointmatcher:     true
With CCCoreLib:          false
With octomap:             true
With cpu-tsdf:           false
With open chisel:        false
With Alice Vision:       false
With LOAM:               false
With FLOAM:              false
With FOVIS:              false
With Viso2:              false
With DVO:                false
With ORB_SLAM:           false
With OKVIS:              false
With MSCKF_VIO:          false
With VINS-Fusion:        false
With OpenVINS:           false

im using rviz2 to primarily show the data


launches the airsim ros wrapper:
ros2 run airsim_ros_pkgs airsim_node --ros-args   -p host_ip:=localhost   -p world_frame_id:=world_enu   -p odom_frame_id:=odom_local_enu

launch for rtabmap:
ros2 launch rtabmap_launch rtabmap.launch.py   frame_id:=Drone1/odom_local_enu   odom_frame_id:=Drone1   map_frame_id:=map   rgb_topic:=/airsim_node/Drone1/rgbd_front/Scene   depth_topic:=/airsim_node/Drone1/rgbd_front/DepthPlanar   camera_info_topic:=/airsim_node/Drone1/rgbd_front/Scene/camera_info   subscribe_rgbd:=true   subscribe_depth:=false   rgbd_sync:=true   approx_sync:=true   approx_rgbd_sync:=true   visual_odometry:=false   icp_odometry:=false   use_sim_time:=true   rtabmapviz:=false   rviz:=true   wait_for_transform:=0.5   depth_max:=100.0

static transform for a camera:
ros2 run tf2_ros static_transform_publisher --ros-args -p use_sim_time:=true -- 0 0.4 0.05 0 0 -1.5708 Drone1/odom_local_enu Drone1/rgbd_front_optical


im trying to use a drone in airsim, and want to get sensor data over to rtabmap for real time mapping (simulation).
the TF tree looks correct: map -> Drone1 -> Drone1/odom_local_enu -> Drone1/rtbd_front_optical

the issue is that rtabmap refuses to actually map anything? The camera cloud works, i can see that rtabmap has access to both drone odometry and sensors (seen as pointcloud in rviz2, /voxel_cloud), but again, no mapping is being done?

Im unsure of the issues, im also new to rtabmap and ROS, so please bear with me
Reply | Threaded
Open this post in threaded view
|

Re: rtab-map with airsim ROS foxy

matlabbe
Administrator
Do you have warnings in the terminal that say "Did not receive data for the past 5 seconds...". Based on your launch command, rgbd_sync is waiting for these topics:
[rgbd_sync-1] rgbd_sync subscribed to (approx sync):
[rgbd_sync-1]    /airsim_node/Drone1/rgbd_front/Scene,
[rgbd_sync-1]    /airsim_node/Drone1/rgbd_front/DepthPlanar,
[rgbd_sync-1]    /airsim_node/Drone1/rgbd_front/Scene/camera_info

Make sure they are actually published:
rostopic hz /airsim_node/Drone1/rgbd_front/Scene
rostopic hz /airsim_node/Drone1/rgbd_front/DepthPlanar
rostopic hz /airsim_node/Drone1/rgbd_front/Scene/camera_info

At this point, rtabmap node should record some data if the rgbd_image topic is generated by rgbd_sync. If you see nothing and no warnings, is the database growing?
ls -lh ~/ros/rtabmap.db
If so, can you share it?
Reply | Threaded
Open this post in threaded view
|

Re: rtab-map with airsim ROS foxy

slexsos
Hi!

Sorry for the late reply, I fixed it, i just needed to increase the max distance that the mapping and occupancy grid mapping worked at (launch parameter)