🚀 SLAM on Mars: Gazebo Tutorial

Navigate the Red Planet with Husky + UR3 + Robotis Gripper

Fall 2025 archive. Tutorial from Assignment 4 of CS498GC Fall 2025.

🌌 Assignment 4 Part 2: Mars SLAM Challenge

This tutorial guided students through implementing SLAM on the Red Planet with the course mobile manipulator in Mars-themed Gazebo worlds.

🔴 Mars Environment Features

  • Mars gravity: about 38% of Earth's (3.71 m/s² in the repo world)
  • Obstacles: rock-like blocks for navigation and SLAM
Fall 2025 handout text

The Fall 2025 handout also listed dust storms, uneven terrain and NASA rover data. None of these are in the linked worlds.

🤖 Robot Configuration

  • Base: Clearpath Husky (adapted for Mars)
  • Arm: UR3 6-DOF manipulator
  • Gripper: Robotis gripper for sample collection
  • Sensors:
    • RGB-D camera for visual SLAM
    • LiDAR for terrain mapping
    • IMU for orientation in low gravity
  • SLAM: RTAB-Map or custom implementation

🛠️ Installation & Setup

Prerequisites

Step 1: Install Mars World Package

Fall 2025 handout text (not runnable as written)
# Clone the Mars world repository # (fork of itsyashk/ros2-dual-robot-slam-explorer; the final rubric v11 marks it not recommended # because of missing mesh paths - use the Mars Thanksgiving World instead) cd ~/assignment4_ws/src git clone https://github.com/kulbir-ahluwalia/ros2-dual-robot-slam-explorer.git # Install dependencies cd ~/assignment4_ws rosdep install --from-paths src --ignore-src -r -y # Build the workspace colcon build source install/setup.bash

Step 2: Launch Mars Environment

# Launch files in the linked dual-robot repo (they do not run as is; see below) ros2 launch mars_simulation two_robots_sim.launch.py # In a new terminal, start SLAM Toolbox with the repo's parameters ros2 launch mars_robots mapping.launch.py # Start teleoperation (optional) ros2 run teleop_twist_keyboard teleop_twist_keyboard

These steps do not run from the linked repository: its mars_simulation folder is not a ROS 2 package (no package.xml), the launch file refers to a mars_robot.urdf the repository does not contain (it ships only mars_robot.urdf.xacro), and it uses Gazebo Classic (gazebo_ros), which has no ROS 2 Jazzy release. Rubric v11 recommended the Mars Thanksgiving World, which was shared with enrolled students and is not public.

🎯 SLAM Tasks on Mars

Required Tasks (75 points; tutorial split, see the Part B rubric for the graded items)

  1. Basic Navigation (15 pts): Navigate through Mars crater field
  2. Sample Collection (15 pts): Use manipulator to collect Mars rocks
  3. Map Generation (15 pts): Create complete 2D/3D map of environment
  4. Loop Closure (10 pts): Demonstrate successful loop closure in Mars terrain
  5. Obstacle Avoidance (10 pts): Navigate around Mars boulders autonomously
  6. Technical Report (10 pts): Document SLAM performance on Mars

🌟 Bonus Challenge: Mars Dust Storm (10 extra points)

Complete SLAM during a simulated Mars dust storm with reduced visibility!

Fall 2025 handout text (not a runnable command: no /mars_environment node exists in the linked repositories)
# Enable dust storm mode ros2 param set /mars_environment enable_dust_storm true ros2 param set /mars_environment dust_density 0.7

📊 Performance Metrics

Fall 2025 handout text (illustrative targets, not the graded rubric)
Metric Earth Performance Mars Challenge Points
Map Completeness >95% >90% in Mars terrain 15
Localization Error <10cm <20cm with reduced traction 10
Loop Closure Success 100% >80% in dust conditions 10
Sample Collection N/A 5+ Mars rocks collected 15

🚨 Common Challenges & Solutions

Fall 2025 handout text: the node and parameter names below were not checked against the simulator

Problem: Reduced traction on sandy Mars surface
Solution: Adjust wheel odometry covariance and use IMU fusion
# Increase odometry uncertainty ros2 param set /husky_controller odom_covariance_xy 0.1 ros2 param set /ekf_filter imu_weight 0.8

Problem: UR3 arm overshoots in 38% gravity
Solution: Adjust PID gains for Mars gravity
# Mars gravity compensation ros2 param set /ur3_controller gravity_compensation 3.71 ros2 param set /ur3_controller pid_p 0.6

Problem: Feature detection difficult in monochrome Mars environment
Solution: Tune visual feature detectors for Mars
# Adjust RTAB-Map parameters for Mars ros2 param set /rtabmap Vis/FeatureType 6 # GFTT/BRIEF features (type 6) ros2 param set /rtabmap Vis/MaxFeatures 2000 ros2 param set /rtabmap RGBD/OptimizeMaxError 0.5

📁 Submission Requirements

Deliverables for Assignment 4 Part 2
  1. Rosbag Recording: 5-minute Mars exploration (include /tf, /map, /odom)
  2. Generated Maps: 2D occupancy grid + 3D pointcloud of Mars terrain
  3. Video Demo: Screen recording showing SLAM in action (3-5 minutes)
  4. Technical Report: 3-page analysis of SLAM performance on Mars
  5. Code: Your SLAM implementation or configuration files
🎯 Pro Tips for Success

🔗 Resources & References

🚀 Student Testimonial

"I couldn't sleep last night because I was so excited SLAMing on MARS!!" - a CS498GC student

Fall 2025 archive.