Note: Due to the lack of official Gazebo Ignition plugins for RealSense D435 and Xema-S cameras, this simulation uses Gazebo's standard RGB-D camera sensors configured to mimic the specific properties of these depth cameras. The simulation leverages ros_gz_bridge
for ROS 2 integration.
This project provides a detailed simulation of two depth cameras:
- Intel RealSense D435
- Xema-S Depth Camera
The simulation includes:
- Realistic camera parameter configurations
- RGB and depth image generation
- ROS 2 topic bridging
- Mounting on a simple differential drive robot
- Ubuntu 22.04 LTS
- ROS 2 Humble
- Gazebo Ignition Fortress
- Update System
sudo apt update && sudo apt upgrade -y
- Install ROS 2 Humble
sudo apt install -y ros-humble-desktop
- Install Gazebo Ignition Fortress
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/pkgs-osrf-archive.gpg] https://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list
sudo apt update
sudo apt install -y ignition-fortress
- Install ROS-Gazebo Bridge
sudo apt install -y ros-humble-ros-gz-bridge
- Clone Repository
git clone https://github.com/aaqibmahamood/Depth_Camera_Simulation.git
- Copy to Home Directory
# Ensure you're in the Home directory where you have your workspaces. Copy d435_ws into home from Depth_Camera_Simulation folder.
cp -r d435_ws ~/
- Resolution: 1920x1080
- Horizontal FOV: 80 degrees
- Update Rate: 30 Hz
- Distortion Model: Realistic radial and tangential distortion
- Intrinsic Camera Matrix: Calibrated to D435 specifications
- Resolution: 1280x720
- Horizontal FOV: 80 degrees
- Depth Range: 0.2m - 10m
- Noise Model: Gaussian noise (mean 0, stddev 0.0025)
- Update Rate: 30 Hz
- Build Workspace
cd ~/d435_ws
colcon build
source install/setup.bash
- Launch Simulation
ros2 launch depth_d435 one_robot_ign_launch.py
d435-simulation.mp4
- Clone Repository
git clone <repository-url-for-xema-s>
- Copy to Home Directory
# Ensure you're in the src directory
cp -r xema_ws ~/
- Resolution: 1920x1080
- Horizontal FOV: 70 degrees
- Update Rate: 30 Hz
- Distortion Coefficients: Precisely tuned
- Intrinsic Camera Matrix: Matched to Xema-S optics
- Resolution: 1280x720
- Horizontal FOV: 70 degrees
- Depth Range: 0.1m - 8m
- Noise Model: Gaussian noise (mean 0, stddev 0.0025)
- Update Rate: 30 Hz
- Build Workspace
cd ~/xema_ws
colcon build
source install/setup.bash
- Launch Simulation
ros2 launch xema_s one_robot_ign_launch.py
- Dedicated optical frames for both RGB and depth cameras
- Precise alignment with base link
- Consistent orientation and positioning
- Clip Distances:
- D435: Near clip 0.2m, Far clip 10m
- Xema-S: Near clip 0.1m, Far clip 15m
- Accurate lens intrinsics and distortion parameters
To bridge camera topics:
ros2 run ros_gz_bridge parameter_bridge /camera/depth/image@sensor_msgs/msg/Image@ignition.msgs.Image
ros2 run ros_gz_bridge parameter_bridge /camera/color/image@sensor_msgs/msg/Image@ignition.msgs.Image
- Verify ROS 2 and Gazebo Ignition installations
- Check topic names and message types
- Ensure correct camera placement in Gazebo world
Contributions are welcome! 🤖
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- ROS 2 Community
- Gazebo Ignition Team
- Intel RealSense
- Xema-S Manufacturers