Skip to content

Simulate RealSense D435 and Xema-S depth cameras in Gazebo Ignition Fortress with ROS 2 Humble using the ros_gz_bridge. The simulation uses Gazebo's standard RGB-D camera sensors, configured to mimic the properties of the RealSense D435 and Xema-S for realistic depth image generation and seamless integration with ROS 2.

Notifications You must be signed in to change notification settings

aaqibmahamood/Depth_Camera_Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Depth Camera Simulation: RealSense D435 and Xema-S

cover.png cover-2.png

ROS2 Humble Gazebo Ignition Fortress Ubuntu 22.04

Disclaimer

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.

Project Overview

This project provides a detailed simulation of two depth cameras:

  1. Intel RealSense D435
  2. 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

Prerequisites

System Requirements

  • Ubuntu 22.04 LTS
  • ROS 2 Humble
  • Gazebo Ignition Fortress

Initial Setup

  1. Update System
sudo apt update && sudo apt upgrade -y
  1. Install ROS 2 Humble
sudo apt install -y ros-humble-desktop
  1. 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
  1. Install ROS-Gazebo Bridge
sudo apt install -y ros-humble-ros-gz-bridge

Intel RealSense D435 Simulation

Workspace Preparation

  1. Clone Repository
git clone https://github.com/aaqibmahamood/Depth_Camera_Simulation.git
  1. 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 ~/

Camera Specifications - RealSense D435

RGB Camera

  • Resolution: 1920x1080
  • Horizontal FOV: 80 degrees
  • Update Rate: 30 Hz
  • Distortion Model: Realistic radial and tangential distortion
  • Intrinsic Camera Matrix: Calibrated to D435 specifications

Depth Camera

  • Resolution: 1280x720
  • Horizontal FOV: 80 degrees
  • Depth Range: 0.2m - 10m
  • Noise Model: Gaussian noise (mean 0, stddev 0.0025)
  • Update Rate: 30 Hz

Building and Launching

  1. Build Workspace
cd ~/d435_ws
colcon build
source install/setup.bash
  1. Launch Simulation
ros2 launch depth_d435 one_robot_ign_launch.py

Visualization Examples

blender-1

Intel RealSense D435 DAE File

depth-d435 depth-d435-2 depth-d435-3

Demonstration Video

d435-simulation.mp4

Xema-S Depth Camera Simulation

Workspace Preparation

  1. Clone Repository
git clone <repository-url-for-xema-s>
  1. Copy to Home Directory
# Ensure you're in the src directory
cp -r xema_ws ~/

Camera Specifications - Xema-S

RGB Camera

  • Resolution: 1920x1080
  • Horizontal FOV: 70 degrees
  • Update Rate: 30 Hz
  • Distortion Coefficients: Precisely tuned
  • Intrinsic Camera Matrix: Matched to Xema-S optics

Depth Camera

  • Resolution: 1280x720
  • Horizontal FOV: 70 degrees
  • Depth Range: 0.1m - 8m
  • Noise Model: Gaussian noise (mean 0, stddev 0.0025)
  • Update Rate: 30 Hz

Building and Launching

  1. Build Workspace
cd ~/xema_ws
colcon build
source install/setup.bash
  1. Launch Simulation
ros2 launch xema_s one_robot_ign_launch.py

Visualization Examples

blender-2

Open3D's XEMA-S DAE File

depth-xema

depth-xema-2

depth-xema-3

Advanced Configuration

Optical Frames

  • Dedicated optical frames for both RGB and depth cameras
  • Precise alignment with base link
  • Consistent orientation and positioning

Simulation Parameters

  • 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

Bridging ROS 2 Topics

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

Troubleshooting

  • Verify ROS 2 and Gazebo Ignition installations
  • Check topic names and message types
  • Ensure correct camera placement in Gazebo world

Contributing

Contributions are welcome! 🤖

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Acknowledgments

  • ROS 2 Community
  • Gazebo Ignition Team
  • Intel RealSense
  • Xema-S Manufacturers

About

Simulate RealSense D435 and Xema-S depth cameras in Gazebo Ignition Fortress with ROS 2 Humble using the ros_gz_bridge. The simulation uses Gazebo's standard RGB-D camera sensors, configured to mimic the properties of the RealSense D435 and Xema-S for realistic depth image generation and seamless integration with ROS 2.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published