Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
src/perception/perception/slam/slam_sim_mj/, a simulated RealSense D455 thatwalks a corridor loop in MuJoCo and feeds RTAB-Map, producing a 2D floor plan.
This is a simulation testbed for the real-camera procedure in
slam-quickstart.md,so the SLAM side can be developed and regression-tested without hardware: the room is
known exactly, the trajectory is repeatable, and a full run takes ~3 minutes on a
laptop with no GPU.
Design
Two halves that share no code and talk only over ROS topics:
mj_slam_publisher.pyrenders the camera and publishes what a real driverwould —
/camera/camera/color/image_raw,.../depth/image_rect_raw,.../color/camera_info,.../imu.launch/slam_sim_mj.launch.pyruns madgwick → static TFs → rtabmap.Topic names, encodings and frame ids match
realsense2_camera, so the SLAM halfcannot tell simulation from hardware, and the launch file runs the same
imu_filter_madgwicknode with the same parameters as the real-hardware procedure.Swapping the publisher for a real camera leaves the SLAM half untouched.
Intrinsics (
fx=383.682, fy=383.165at 640×480) are taken from a real D455 recordingrather than invented, since RTAB-Map derives scale and geometry from them.
The IMU is synthesised by differentiating the known trajectory. RTAB-Map uses an IMU
as a gravity prior in RGB-D mode; without one, odometry drifts in z on a path that is
flat by construction, and since
Grid/MaxGroundHeightis 0.15 m that drift destroysground/obstacle classification. A physics-based IMU sensor cannot be used here — the
camera is kinematically posed, so such a sensor reads zero.
Running it