ROS 2 packages for Husarion ROSbot Series.
Documentation is available in ROS_API.md.
-
Install all necessary tools:
sudo apt-get update sudo apt-get install -y python3-pip ros-dev-tools
-
Create a workspace folder and clone the rosbot_ros repository:
mkdir rosbot_ws cd rosbot_ws git clone -b jazzy https://github.com/husarion/rosbot_ros.git src/rosbot_ros
The repository is used to run the code both on the real robot and in the simulation. Specify HUSARION_ROS_BUILD_TYPE the variable according to your needs.
Real robot:
export HUSARION_ROS_BUILD_TYPE=hardwareSimulation:
export HUSARION_ROS_BUILD_TYPE=simulationsource /opt/ros/$ROS_DISTRO/setup.bash
vcs import src < src/rosbot_ros/rosbot/rosbot_${HUSARION_ROS_BUILD_TYPE}.repos
vcs import src < src/rosbot_ros/rosbot/manipulator.repos # For ROSbot XL manipulation package
export PIP_BREAK_SYSTEM_PACKAGES=1
sudo rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=ReleaseFor ROSbot XL, you can specify a particular configuration using the launch configuration argument. If you are using the manipulation configuration, please refer to MANIPULATOR.md for detailed instructions.
Real robot:
source install/setup.bash
ros2 launch rosbot_bringup bringup.launch.py robot_model:=<rosbot/rosbot_xl>Note
To run the software on real ROSbots, communication with the CORE2 is required. Ensure the firmware is updated before running the micro-ROS agent. For detailed instructions, refer to the rosbot_ros2_firmware repository.
sudo su
source install/setup.bash
ros2 run rosbot_utils flash_firmware --robot-model <rosbot/rosbot_xl>
exitSimulation:
source install/setup.bash
ros2 launch rosbot_gazebo simulation.launch.py robot_model:=<rosbot/rosbot_xl>| Symbol | Meaning |
|---|---|
| 🤖 | Available for physical robot |
| 🖥️ | Available in simulation |
| 🤖 | 🖥️ | Argument | Description Type: Default |
|---|---|---|---|
| ✅ | ✅ | config_dir |
Path to the common configuration directory. You can create such common configuration directory with ros2 run rosbot_utils create_config_dir {directory}. string: "" |
| ✅ | ✅ | configuration |
Specify configuration packages. Currently only ROSbot XL has available packages. Packages: basic, telepresence, autonomy, manipulation, manipulation_pro, custom. string: 'basic' |
| ✅ | ✅ | joy_vel |
The topic name to which velocity commands will be published. string: cmd_vel |
| ✅ | ✅ | mecanum |
Whether to use mecanum drive controller, otherwise use diff drive. bool: False |
| ✅ | ✅ | namespace |
Add namespace to all launched nodes. string: env(ROBOT_NAMESPACE) |
| ✅ | ✅ | robot_model |
Specify robot model. string: env(ROBOT_MODEL_NAME) (choices: rosbot, rosbot_xl) |
| ✅ | ❌ | manipulator_serial_port |
Port to connect to the manipulator. string: 8888 |
| ✅ | ❌ | microros |
Automatically connect with hardware using microros. bool: True |
| ✅ | ❌ | port |
ROSbot XL only. UDP4 port for micro-ROS agent. string: 8888 |
| ✅ | ❌ | serial_baudrate |
ROSbot only. Baud rate for serial communication. string: 576000 |
| ✅ | ❌ | serial_port |
ROSbot only. Serial port for micro-ROS agent. string: /dev/ttySERIAL |
| ❌ | ✅ | gz_gui |
Run simulation with specific GUI layout. string: teleop.config |
| ❌ | ✅ | gz_headless_mode |
Run the simulation in headless mode. Useful when a GUI is not needed or to reduce the number of calculations. bool: False |
| ❌ | ✅ | gz_log_level |
Adjust the level of console output. int: 1 (choices: 0, 1, 2, 3, 4) |
| ❌ | ✅ | gz_world |
Absolute path to SDF world file. string: husarion_world.sdf |
| ❌ | ✅ | rviz |
Run RViz simultaneously. bool: True |
| ❌ | ✅ | x |
Initial robot position in the global 'x' axis. float: 0.0 |
| ❌ | ✅ | y |
Initial robot position in the global 'y' axis. float: 2.0 |
| ❌ | ✅ | z |
Initial robot position in the global 'z' axis. float: 0.0 |
| ❌ | ✅ | roll |
Initial robot 'roll' orientation. float: 0.0 |
| ❌ | ✅ | pitch |
Initial robot 'pitch' orientation. float: 0.0 |
| ❌ | ✅ | yaw |
Initial robot 'yaw' orientation. float: 0.0 |
Tip
To read the arguments for individual launch files, add the -s flag to the ros2 launch command (e.g. ros2 launch rosbot_bringup bringup.launch.py -s)
Explore demos showcasing the capabilities of ROSbots:
| 📎 Link | 📖 Description |
|---|---|
| rosbot-telepresence | Stream live video from Orbbec Astra to a PC and control the robot using teleop-twist-keyboard |
| rosbot-autonomy | Enables simultaneous mapping and navigation, allowing the robot to move in unknown environments. |

