ROS 2 Jazzy (Ubuntu 24.04) mobile & manipulator robotics simulation + control workspace
This repository is a ROS 2 Jazzy monorepo-style workspace containing simulation, description, control, navigation and utility packages for multiple mobile robot platforms (MiR-like, MUR, UR arm in Gazebo / gz sim) plus example four–wheel-steering control.
Key components:
match_gazebo: Launches Gazebo (Ignition / gz sim) worlds (maze, empty) and bridges selected topics viaros_gz_bridge.mir_*packages: Description, drivers, actions, navigation, REST API, messages/services for a MiR-style platform.mur_*packages: Description, MoveIt config, simulation launch for a MUR (mobile manipulator) configuration.ur_robot: Upstream UR (Universal Robots) simulation integration (gz based) via included.reposmanifests.velocity_pub: Example four wheel steering velocity + steering angle commander driven by joystick (sensor_msgs/Joy).
NOTE: Some sub-packages have
COLCON_IGNOREto exclude them until their dependencies are satisfied or they are ready.
Tested on Ubuntu 24.04 (Noble) with ROS 2 Jazzy.
- Install ROS 2 Jazzy base + desktop + dev tools and dependencies (gz sim, control, MoveIt, etc.). An example script is provided in
ROS2_setup.sh(review before executing):
chmod +x ROS2_setup.sh
./ROS2_setup.sh # optional convenience; may prompt for sudo- Source ROS 2 environment (add to your shell RC if desired):
source /opt/ros/jazzy/setup.bash- Install additional system packages (if not already present):
sudo apt update
sudo apt install -y python3-colcon-common-extensions ros-jazzy-ros-gz-sim ros-jazzy-ros-gz-bridge ros-jazzy-ros2-control ros-jazzy-ros2-controllers ros-jazzy-moveit-py ros-jazzy-srdfdom joystick
sudo apt install -y ros-jazzy-pcl-ros ros-jazzy-pcl-conversions ros-jazzy-pcl-msgs # required by ira_laser_tools (scan merging)- (Optional) Install
joypackage for joystick input:
sudo apt install -y ros-jazzy-joyIf you have not yet cloned this repository:
mkdir -p ~/ws/src
cd ~/ws/src
git clone https://github.com/match-ROS/match_mobile_robotics_jazzy.git
cd ..Import any referenced external repositories (for UR simulation, etc.) using the provided .repos files (select the one matching Jazzy when relevant):
vcs import src < src/match_mobile_robotics_jazzy/ros2.reposIf vcs is missing:
sudo apt install -y python3-vcstoolFrom the workspace root (one level above src/):
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfoThen source the local overlay:
source install/setup.bashRe-build after changes:
colcon build --packages-select <pkg_name>Run tests (copyright / lint / style):
colcon test --packages-select match_gazebo
colcon test-result --verboseLaunch gazebo with a world (default: maze):
ros2 launch match_gazebo gazebo.launch.py world:=mazeAvailable worlds are found in match_gazebo/worlds/ (e.g. empty, maze – pass the base name).
The launch file internally:
- Sets
GZ_SIM_RESOURCE_PATHto include package worlds. - Includes
ros_gz_simlauncher with-v 4 -rverbosity and real-time flag. - Bridges topics via
ros_gz_bridgefor/b_scan,/f_scan(LaserScan) and/clock.
To list gz topics:
gz topic -lSingle MUR (mur620a) using reusable base:
ros2 launch mur_launch_sim mur620.launch.py world:=mazeMultiple MUR robots (mur620a–d) in one world (first robot starts Gazebo, others reuse it):
ros2 launch mur_launch_sim multi_mur620.launch.py world:=mazeCustomize spawn positions / names by cloning multi_mur620.launch.py or creating a new launcher that includes mur_base.launch.py with different robot_name / x / y arguments. Base arguments available:
robot_name(namespace + entity name)world(only first include needs to start Gazebo with it)x y z Y(spawn pose; yaw in radians)include_gz(trueonly for first robot)lidar_bridge(bridge that robot's /scan)
Example custom include (second robot without starting gz):
ros2 launch mur_launch_sim mur_base.launch.py robot_name:=mur620b include_gz:=false x:=2.0 y:=1.0The velocity_pub package publishes steering positions and wheel velocities to controllers at:
/forward_position_controller/commands(Float64MultiArray4 elements)/forward_velocity_controller/commands(Float64MultiArray4 elements)
Launch the node:
ros2 launch velocity_pub four_ws_control.launch.pyModes (selected from joystick buttons in robot_control.py):
- Opposite phase (LB)
- In-phase (A)
- Pivot turn (RB)
- None (default / others)
Axes mapping (Xbox layout):
axes[1]forward/back (linear x)axes[0]lateral (linear y)axes[3]yaw (angular z)
Currently the script zeroes steering positions and sets wheel velocities to 0.5 each cycle (lines near the end of
timer_callback) – adjust logic before deployment.
- Some packages (e.g.
mir_driver,mir_navigation) require additional hardware / map / config assets; ensure their dependencies are installed or selectively build using--packages-select. - Ignore packages by creating a
COLCON_IGNOREfile in their directory (already used for some doc folders). - UR simulation support: Use provided
ur_simulation_gz.jazzy.reposif you want the full UR environment.
Formatting / lint (Python):
pip install black==24.4.2
black .General ROS code style: run ament_lint_auto through colcon tests where configured.
Environment convenience:
Add to ~/.bashrc:
source /opt/ros/jazzy/setup.bash
source ~/ws/install/setup.bash
export ROS_DOMAIN_ID=0 # or set per project| Issue | Cause | Fix |
|---|---|---|
package not found |
Overlay not sourced | source install/setup.bash |
Missing /clock |
Bridge not running | Ensure match_gazebo launch ran; check ros2 node list |
| Joystick no messages | joy not installed / permissions |
Install ros-jazzy-joy; run sudo chmod a+rw /dev/input/js* |
| Build fails for UR | External repos missing | Run vcs import with correct .repos file |
- Fork & create feature branch.
- Add / update tests or simulation launch instructions if behavior changes.
- Run formatting & lint tests.
- Submit PR with concise description & reproduction / launch steps.
See LICENSE file.
Feel free to open issues for missing instructions or feature requests.