Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2 spaceros_gz_demos

Repository Summary

Description ROS 2 + Gazebo Harmonic package for simulating environments relating to extraterrestrial exploration
Checkout URI https://github.com/david-dorf/spaceros_gz_demos.git
VCS Type git
VCS Version main
Last Updated 2025-01-23
Dev Status UNKNOWN
Released UNRELEASED
Tags gazebo ros2
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
spaceros_gz_demos 0.0.1

README

spaceros_gz_demos

This is a ROS 2 package demonstrating how to use Gazebo Harmonic for robotic simulations in the Space ROS environment. This package is meant to serve as a baseline for how to create Gazebo worlds, set them up with the appropriate plugins for sending controls and receiving data, and bridge these topics to ROS. The simulated worlds use realistic gravity and include a submersible robot on Enceladus, the Perseverance rover and Ingenuity helicopter on Mars, a space capsule docking to the ISS, and two rovers on the Moon.

This package was made by David Dorf and Katie Hughes for the NASA Space ROS Sim Summer Sprint Challenge. The relevant PR in the Space ROS demos repository is here.

https://github.com/user-attachments/assets/b5a11627-e0f3-451b-af0c-b0e76b30fb04

Docker setup

One time setup: If you don’t have Docker, install it with sudo apt install docker.io. You will have to add yourself to the Docker user group with sudo usermod -aG docker $USER, then run newgrp docker to avoid permission errors with Docker daemon. You will need to reboot for these changes to take effect on your system. You will also to run xhost +local:docker on your first time to allow Docker to connect to gui-based application such as Gazebo and RViz.

  1. Navigate to the docker directory.

  2. Build the Docker image locally with


  1. Start the Docker container with

  1. Once you have a running container, to get another shell, run

Running code in the Docker container

  1. Once you are in the Docker container, run colcon build (you should be in the ~/spaceros/ws directory)

  2. Run source install/setup.bash

  3. Start one of the demos with ros2 launch spaceros_gz_demos moon.launch.xml, mars.launch.xml, enceladus.launch.xml, or orbit.launch.xml.

Moon

Launch the moon demo with the following command:

```ros2 launch spaceros_gz_demos moon.launch.xml


This world contains an X1 rover holding a truss that can be detached, an X2 rover, and a solar panel with one controllable joint on a lunar environment.
Images, camera info, laser scans, point clouds, and odometry topics are provided for each robot.
Additionally, each rover can be commanded as a differential drive system via a commanded base twist.
This world uses the Selenographic Coordinate System (SCS). 


<details>
<summary><b>Click here for information about the topics available in this demo.</b></summary>
<br>

| Topic Name | Topic Type | Description | 
| ---------- | ---------- | ----------- |
| ` /X1/camera_front/camera_info ` | ` sensor_msgs/msg/CameraInfo ` |  Camera info for X1's front camera  |
| ` /X1/camera_front/image ` | ` sensor_msgs/msg/Image ` |  Image on X1's front camera  |
| ` /X1/cmd_vel ` | ` geometry_msgs/msg/Twist ` |  Used to command the X1's base velocity  |
| ` /X1/front_laser/scan ` | ` sensor_msgs/msg/LaserScan ` |  Laser scan from the X1's camera  |
| ` /X1/front_laser/scan/points ` | ` sensor_msgs/msg/PointCloud2 ` |  Point cloud from the X1's camera  |
| ` /X1/imu_sensor/imu ` | ` sensor_msgs/msg/Imu ` |  IMU data from X1  |
| ` /X1/odometry ` | ` nav_msgs/msg/Odometry ` |  Base odometry topic from X1  |
| ` /X1/odometry_with_covariance ` | ` nav_msgs/msg/Odometry ` |  Odometry with covariance from X1  |
| ` /X1/truss/attach ` | ` std_msgs/msg/Empty ` |  Used to attach the truss on the back of the X1  |
| ` /X1/truss/detach ` | ` std_msgs/msg/Empty ` |  Used to detach the truss on the back of the X1  |
| ` /X2/camera_front/camera_info ` | ` sensor_msgs/msg/CameraInfo ` |  Camera info for X2's front camera  |
| ` /X2/camera_front/image ` | ` sensor_msgs/msg/Image ` |  Image on X2's front camera  |
| ` /X2/cmd_vel ` | ` geometry_msgs/msg/Twist ` |  Used to command the X2's base velocity  |
| ` /X2/front_laser/scan ` | ` sensor_msgs/msg/LaserScan ` |  Laser scan from the X2's camera  |
| ` /X2/front_laser/scan/points ` | ` sensor_msgs/msg/PointCloud2 ` |  Point cloud from the X2's camera  |
| ` /X2/imu_sensor/imu ` | ` sensor_msgs/msg/Imu ` |  IMU data from X2  |
| ` /X2/odometry ` | ` nav_msgs/msg/Odometry ` |  Base odometry topic from X2  |
| ` /X2/odometry_with_covariance ` | ` nav_msgs/msg/Odometry ` |  Odometry with covariance from the X2  |
| ` /solar_panel/joint ` | ` std_msgs/msg/Float64 ` |  Used to command the joint of the solar panel  |
| ` /tf ` | ` tf2_msgs/msg/TFMessage ` |  TF topic containing odometry from both the X1 and X2  |



</details>



## Mars
Launch the mars demo with the following command:


```ros2 launch spaceros_gz_demos mars.launch.xml

This world contains models of the Perseverance rover and the Ingenuity helicopter on a Martian surface. The Ingenuity helicopter contains a rechargable battery that simulates it charging from its solar panel. Ingenuity can be commanded to fly. Perseverance can be commanded as a differential drive system, and its arm joints can also be commanded to move. Odometry, image, depth, and point cloud topics are also published for both robots. Perseverance and Ingenuity models are meant to be as close to their real-life counterparts as possible.

Click here for information about the topics available in this demo.
| Topic Name | Topic Type | Description | | ---------- | ---------- | ----------- | | ` /ingenuity/battery_recharge_start ` | ` std_msgs/msg/Bool ` | Publish `True` to start recharging the battery, and `False` to stop | | ` /ingenuity/battery_state ` | ` sensor_msgs/msg/BatteryState ` | Used to view the current battery charge | File truncated at 100 lines [see the full file](https://github.com/david-dorf/spaceros_gz_demos/tree/main/README.md)
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2
Repo symbol

spaceros_gz_demos repository

gazebo ros2