Skip to content

aksymus/rover_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rover Simulation

ROS 2 Jazzy + Gazebo Harmonic + PX4 rover simulation with LiDAR and camera sensors.

Features: PX4 SITL rover simulation Gazebo Harmonic world LiDAR sensor publishing PointCloud2 Camera sensor publishing Image topics ROS-Gazebo bridge RViz2 visualization Manual rover control

Requirements:

Ubuntu 24.04
ROS 2 Jazzy
Gazebo Harmonic
PX4 Autopilot
ros_gz_bridge
RViz2

FAST-LIVO2 Dependencies

The FAST-LIVO2 integration used in this project is based on:

FAST-LIVO2-ROS2 Repository: https://github.com/v4rl-ucy/FAST-LIVO2-ROS2

Before running the SLAM pipeline, create a dedicated ROS2 workspace and install the required dependencies. Example workspace:

mkdir -p ~/fast_livo2_ros2_ws/src cd ~/fast_livo2_ros2_ws/src

Required repositories:

FAST-LIVO2-ROS2
livox_ros_driver2
Livox-SDK2
rpg_vikit_ros2_fisheye
Sophus

Example workspace structure:

fast_livo2_ros2_ws/ └── src/ ├── FAST-LIVO2-ROS2/ ├── livox_ros_driver2/ ├── Livox-SDK2/ ├── rpg_vikit_ros2_fisheye/ └── Sophus/

Workspace cd ~/rover_sim colcon build source install/setup.bash

Launch Gazebo Simulation:

rover_clean.launch is PX4 + Gazebo + ROS2 Launch File

This launch file starts the full rover simulation pipeline.

It launches PX4 SITL with a selected Gazebo world and rover model, then starts the ROS2-Gazebo bridges for simulation time, LiDAR point cloud, IMU, and camera data.

Default arguments:

ros2 launch rover_launch rover_clean.launch.xml \
  model:=r1_rover_lidar_camera \
  world:=forest \
  rviz_config_name:=rover_clean.rviz

FAST-LIVO2 Launch File

This launch file starts the LiDAR-Inertial-Visual Odometry (LIVO) pipeline using FAST-LIVO2 and connects it to the simulated rover sensors.

Started components:

Static Transform

Publishes a fixed transform between the FAST-LIVO2 global frame and the rover base frame:

ros2 launch rover_launch fast-livo2.launch.xml

Control Launch Files

There are two alternative control methods for the rover.
Launch only one of them at the same time:

  • QGroundControl
  • Manual keyboard control

Do not run both together, because they can send conflicting commands.


QGroundControl Launch

Starts QGroundControl from the home directory:

ros2 launch rover_launch qgroundcontrol.launch.xml
ros2 launch rover_launch manual_control.launch.xml

Started components:

kills old PX4 processes
starts raw_keyboard_publisher in a new xterm
starts rover_manual_cmd
bridges ROS actuator commands to Gazebo actuator commands

Controls: Keyboard control:

W - forward S - backward A - left D - right Q - increase speed by 1 unit E - decrease speed by 1 unit

LiDAR Time Field Fix Node

PointCloudTimeFieldFix converts a Gazebo LiDAR PointCloud2 message into a FAST-LIVO2-compatible point cloud by adding a time field to every point.

FAST-LIVO2 expects each LiDAR point to contain timing information. Gazebo point clouds usually do not provide this field, so this node reconstructs it manually.

Input / Output

Default input:

/lidar/points

Default output:

/lidar/points_time

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages