|
This post was updated on .
Hi everyone
Has anyone been able to run RTAB-MAP simulation on the new Gazebo? I can carry out mapping successfully, but I have issues with: 1. Localization: When the map loads in RVIZ, turtlebot is placed in its last known position during the mapping stage; meanwhile, in Gazebo, the robot spawns in its start position. This causes the current laser scan to not match the map (see attached image; the incomplete scan shows the scan coming from the robots actual position I Gazebo) 2. Autonomous navigation: turtlebot does not move when I give it a goal pose I am using ros2 Jazzy and the new Gazebo with the codes on the RTAB-MAP demo repo here. The only changes I made are the remappings of the following topics remappings=[ ('scan', '/scan'), ('rgb/image','/camera/image_raw'), ('rgb/camera_info','/camera/camera_info') ![]() ![]() |
|
Administrator
|
There is a comment on top of the demo launch file about increasing min range of the lidar to avoid hitting itself, which may block nav2 to move.
I re-tested the demo on Humble: ros2 launch rtabmap_demos turtlebot3_sim_scan_demo.launch.pyThe 2D Goal button should work: ![]() End of mapping: ![]() After restarting the simulator in localization mode: ros2 launch rtabmap_demos turtlebot3_sim_scan_demo.launch.py localization:=true ![]() In lidar-only setup, the robot cannot globally localize (it needs a camera to do so), it can only locally re-localize. With rviz, you can send a 2d Pose estimate around where you expect the robot to be in the map: ![]() Once the robot will be moving, it should refine its localization against the map so that the laser scan perfectly align with the occupancy grid: ![]() Note that if you want the robot to always restart at the initial position in the simulator, you could add parameter RGBD/StartAtOrigin to false for rtabmap node. cheers, Mathieu |
|
In reply to this post by usman
Hi Mathieu,
Thank you for your response. Here’s an update on my progress with ROS 2 Jazzy and the new Gazebo simulator: 1. 2D Pose Estimate: Works correctly for setting the robot’s initial pose. 2. RGBD/StartAtOrigin: Setting this to True works perfectly; the robot now spawns at the origin in RViz. 3. Autonomous Navigation Issue with TurtleBot3: I’ve adjusted the minimum LiDAR scan value to 0.2, but autonomous navigation still fails when a goal pose is given. Interestingly, navigation works correctly when I use the MOBO_BOT package (which includes a complete robot description and navigation scripts). I’ve identified two key differences so far: ## MOBO_BOT includes a gz_bridge parameter file, which appears necessary for compatibility with the new Gazebo simulator. ## The default Nav2 configuration, when used with Turtlebot_3, publishes only to the cmd_vel_nav instead (nothing is published on the cmd_vel topic), and the messages are not timestamped. The new Gazebo simulator requires the twist messages to be timestamped and on the cmd_vel topic. I hope to share more updates when I get it working with turtlebot_3 on the new Gazebo simulator and ROS2 Jazzy. 4. Finally, when working with 2D LiDAR SLAM, I experimented with setting the 'use_rgb' parameter to 'true', and it eliminated/reduced drift significantly after loop closures. |
| Free forum by Nabble | Edit this page |
