This package provides ROS 2 controllers for controlling Omnidirectional robots with three wheels. It is based on the concepts of ros2_control and ros2_controllers. Initially, only forward and inverse kinematics, based solely on the diff_drive_controller, and odometry calculation have been implemented. The input for control is robot body velocity (
Author: Mateus Menezes
Maintainer: Mateus Menezes, mateusmenezes95@gmail.com
ROS2 Distro | Branch | Build status |
---|---|---|
Humble | humble |
-
This repository has been tested on [ROS2 Foxy] and with Classic Gazebo 11;
-
These instructions assume that you have already installed ROS2 Foxy Fitzroy on your machine. If not, please follow the recommended recommended ubuntu installation tutorial;
-
Before installing the package, you will need to have an ament workspace set up. If you don't have one, follow the instructions in the Creating a workspace tutorial. Once you have created the workspace, clone this repository in the source folder of your workspace.
ATTENTION: These commands assume that you have created a workspace called "ros_ws" in your home folder. If you used a different directory or name, please adjust the commands accordingly.
After installing ROS2 and creating the workspace, clone this repository in your workspace:
cd ~/ros_ws/src
git clone https://github.com/mateusmenezes95/omnidirectional_controllers
Install the binary dependencies by running the following command in the root of your workspace:
cd ~/ros_ws
rosdep init
rosdep update
sudo apt update
rosdep install --from-paths src/omnidirectional_controllers --ignore-src -r -y --rosdistro foxy
If all dependencies are already installed, you should see the message "All required rosdeps installed successfully."
Run the following command to build the package:
cd ~/ros_ws
colcon build --symlink-install --event-handlers console_direct+
Run
colcon build --help
to understand the arguments passed!
After building the package, open a new terminal and navigate to your workspace. Then, source the overlay by running the following command:
source /opt/ros/foxy/setup.bash
cd ~/ros_ws
. install/local_setup.bash
See Source the overlay to learn about underlay and overlay concepts.
You must follow the three steps explained in Running the Framework for Your Robot tutorial.
For an concrete example of how to use the Omnidirectional controllers, refer to the Axebot simulation's controller configuration, ros2_control URDF, and launch file.
-
/omnidirectional_controller/cmd_vel_unstamped
(geometry_msgs/msg/Twist)Velocity twist from which the controller extracts the x and y component of the linear velocity and the z component of the angular velocity. Velocities on other components are ignored.
-
/omnidirectional_controller/odom
(nav_msgs/msg/Odometry)Robot odometry. The odometry can be computed from hardware feedback or using an open-loop approach, in which the integration is performed using the Twist command. You can select the approach in the configuration file. Additionally, you can choose either the Runge-Kutta or Euler Forward integration method.
TODO
Please report bugs and request features using the Issue Tracker