iRobotEducation / create3_sim

ROS 2 Simulation for the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
110 stars 56 forks source link

iRobot® Create® 3 Simulator

Testing License

This is a ROS 2 simulation stack for the iRobot® Create® 3 robot. Only Gazebo Harmonic is supported.

Have a look at the Create® 3 documentation for more details on the ROS 2 interfaces exposed by the robot.

Prerequisites

Required dependencies:

  1. ROS 2 humble
  2. ROS 2 dev tools:

Besides the aforementioned dependencies you will also need Gazebo Harmonic.

Gazebo Harmonic

sudo apt-get update && sudo apt-get install wget
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update && sudo apt-get install ros-gz

Build

mkdir -p ~/create3_ws/src
cd ~/create3_ws
sudo apt-get update
rosdep install --from-path src -yi
colcon build --symlink-install
source install/local_setup.bash

Run

Gazebo Harmonic

Create® 3 can be spawned in a demo world in Gazebo and monitored through RViz with

ros2 launch irobot_create_gz_bringup create3_gz.launch.py

The spawn point can be changed with the x, y, z and yaw launch arguments:

ros2 launch irobot_create_gz_bringup create3_gz.launch.py x:=1.0 y:=0.5 yaw:=1.5707
Namespacing

A namespace can be applied to the robot using the namespace launch argument:

ros2 launch irobot_create_gz_bringup create3_gz.launch.py namespace:=my_robot

Multiple robots can be spawned with unique namespaces:

ros2 launch irobot_create_gz_bringup create3_gz.launch.py namespace:=robot1
ros2 launch irobot_create_gz_bringup create3_spawn.launch.py namespace:=robot2 x:=1.0

:warning: create3_gz.launch.py should only be used once as it launches the Ignition simulator itself. Additional robots should be spawned with create3_spawn.launch.py. Namespaces and spawn points should be unique for each robot.

Package layout

This repository contains packages for both the Classic and Ignition Gazebo simulators: