Skip to content

Latest commit

 

History

History
114 lines (84 loc) · 3.86 KB

README.md

File metadata and controls

114 lines (84 loc) · 3.86 KB

Rosbot ROS

ROS2 packages for ROSbot 2R and ROSbot 2 PRO.

ROS packages

rosbot

Metapackage that contains dependencies to other repositories.

rosbot_bringup

Package that contains launch, which starts all base functionalities. Also configuration for robot_localization and ros2_controllers are defined there.

rosbot_description

URDF model used as a source of transforms on the physical robot. It was written to be compatible with ROS Industrial and preconfigured for ROS2 control.

rosbot_gazebo

Launch files for Ignition Gazebo working with ROS2 control.

rosbot_controller

ROS2 hardware controllers configuration for ROSbots.

ROS API

Available in ROS_API.md

Usage on hardware

To run the software on real ROSbot 2R, 2 PRO, also communication with the CORE2 will be necessary. First update your firmware to make sure that you use the latest version, then run the micro-ROS agent. For detailed instructions refer to the rosbot_ros2_firmware repository.

Source build

Prerequisites

Install colcon, vcs and rosdep:

sudo apt-get update
sudo apt-get install -y python3-colcon-common-extensions python3-vcstool python3-rosdep

Create workspace folder and clone rosbot_ros repository:

mkdir -p ros2_ws/src
cd ros2_ws
git clone https://github.com/husarion/rosbot_ros src/

Build and run on hardware

Building:

export HUSARION_ROS_BUILD=hardware

source /opt/ros/$ROS_DISTRO/setup.bash

vcs import src < src/rosbot/rosbot_hardware.repos

rm -r src/rosbot_gazebo

rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build

Prerequisites

Before starting the software on the robot please make sure that you're using the latest firmware and run the micro-ROS agent (as described in the Usage on hardware step).

Running:

source install/setup.bash
ros2 launch rosbot_bringup bringup.launch.py

Build and run Gazebo simulation

Prerequisites:

Warning The simulation is compatible with the Gazebo Fortress LTS version. Use this installation guide to install the proper version and remove the another versions e. g. Gazebo Garden: sudo apt remove gz-garden && sudo apt autoremove Look at the table to see the compatible ROS 2 and Gazebo versions.

If you have installed multiple versions of Gazebo use the global variable to select the correct one:

export GZ_VERSION=fortress

Building:

export HUSARION_ROS_BUILD=simulation

source /opt/ros/$ROS_DISTRO/setup.bash

vcs import src < src/rosbot/rosbot_hardware.repos
vcs import src < src/rosbot/rosbot_simulation.repos

rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build

Running:

source install/setup.bash
ros2 launch rosbot_gazebo simulation.launch.py

Demo

Bellow you can find demos with ROSbots: