Coder Social home page Coder Social logo

mateusmenezes95 / axebot Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 69 KB

Gazebo simulation with ROS2 integration of the Omnidirectional robot called AxeBot

License: MIT License

CMake 16.64% Python 47.89% C++ 35.47%
robot ros2 ros2-control robotics robots

axebot's Introduction

Axebot Simulation

Axebot in gazebo

The Axebot is an omnidirectional robot with three wheels that was initially developed by students at Universidade Federal da Bahia for robot soccer competitions. However, it was later used by the LaR UFBA for academic research in mobile robotics and control. This repository provides a simulation version of the robot to make it easier for researchers to validate algorithms.

Build status

ROS2 Distro Branch Build status
Humble humble Humble Source Build

Table of Contents

Installation Premises

  1. This repository has been tested on ROS2 Version with Classic Gazebo 11;

  2. These instructions assume that you have already installed ROS2 Humble Hawskbill on your machine. If not, please follow the recommended recommended ubuntu installation tutorial;

  3. 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.

Installing

Non ROS Dependencies

  • vcstool: Refer to its repository for instructions on how to install.

Installing from source

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/axebot.git

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/axebot --ignore-src -r -y --rosdistro humble

If all dependencies are already installed, you should see the message "All required rosdeps installed successfully."

Now, install the omnidirectional controller packager running:

cd ~/ros_ws/src
vcs import < axebot/axebot.humble.repos

Building

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/humble/setup.bash
cd ~/ros_ws
. install/local_setup.bash

See Source the overlay to learn about underlay and overlay concepts.

Static code analysis

Run the static code analysis with

TODO

Usage

To launch the Gazebo simulation and spawn the robot into it, run the following command:

ros2 launch axebot_gazebo axebot.launch.py

To move the robot in a straight line with a velocity of 0.5 m/s in the x-axis, execute the following command:

ros2 topic pub \
omnidirectional_controller/cmd_vel_unstamped \
-r 10 \
geometry_msgs/msg/Twist \
"{linear: {x: 0.5, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"

Alternatively, you can also send twist velocity commands through the rqt publisher plugin by running the command ros2 run rqt_publisher rqt_publisher and then configuring the command in the GUI.

Move to point

To navigate the robot to a specific point (x, y) in 2D cartesian space, there is a simple move-to-point node that can be launched using the following command:

ros2 launch axebot_control move_axebot_to_point.launch.py

In a new terminal, you can command the robot to move to point (2, 2) by executing:

ros2 topic pub /go_to_goal/goal --once geometry_msgs/msg/Vector3 "{x: 2.0, y: 2.0, z: 0.0}"

As an alternative, you can use the rqt_publisher to set the 2D points and interact with the Axebot.

This move-to-point node is a great starting point for those looking to develop high-level controllers for navigating the robot in an environment.

Config files

Nodes

When you launch the main file (axebot.launch.py), the following nodes are initiated:

  • /controller_manager
  • /gazebo
  • /gazebo_ground_truth/gazebo_ros_p3d
  • /gazebo_ros2_control
  • /joint_state_broadcaster
  • /omnidirectional_controller
  • /robot_state_publisher

Additionally, the following topics will also be available:

  • /clock [rosgraph_msgs/msg/Clock]: This topic provides information about the current system time, it is used to keep the time-stamp of the data published in other topics consistent.
  • /dynamic_joint_states [control_msgs/msg/DynamicJointState]: This topic provides the current states of the joints on a robot, such as position and velocity.
  • /gazebo_ground_truth/odom [nav_msgs/msg/Odometry]: This topic provides odometry data from the Gazebo simulator, which includes information about the robot's position and orientation in the simulated environment.
  • /joint_states [sensor_msgs/msg/JointState]: This topic provides the current states of the joints on a robot, such as position and velocity.
  • /omnidirectional_controller/cmd_vel_unstamped [geometry_msgs/msg/Twist]: This topic provides the command velocity for an omnidirectional robot, which is a robot that can move in any direction.
  • /omnidirectional_controller/odom [nav_msgs/msg/Odometry]: This topic provides odometry data for an omnidirectional robot, which includes information about the robot's position and orientation in the environment.
  • /parameter_events [rcl_interfaces/msg/ParameterEvent]: This topic provides information about changes in the ROS 2 parameter server, which is a central repository for configuration information.
  • /performance_metrics [gazebo_msgs/msg/PerformanceMetrics]: This topic provides performance metrics for the system, such as CPU usage, memory usage, and network traffic.
  • /robot_description [std_msgs/msg/String]: This topic provides information about the robot, such as its physical properties, sensors, and actuators.
  • /rosout [rcl_interfaces/msg/Log]: This topic provides log messages and diagnostic information from ROS 2 nodes.
  • /tf [tf2_msgs/msg/TFMessage]: This topic provides information about the relationship between different coordinate frames in the system, such as the location of the robot's sensors in relation to the robot's base frame.
  • /tf_static [tf2_msgs/msg/TFMessage]: This topic provides information about the relationship between different coordinate frames in the system, but for the static frames. It does not change over time.

Topics description wrote by ChatGPT!!!

For more information about nodes, topics, services, and other elements of the Axebot simulation, refer to the CLI Tools Tutorial.

Contributing

To contribute to this package, you can either open an issue describing the desired subject or develop the feature yourself and submit a pull request to the main branch (in this case, humble).

If you choose to develop the feature yourself, please adhere to the ROS 2 Code style and language guidelines to improve code readability and maintainability.

Developed Researches

M. S. Meneses, B. S. S. Pereira and T. L. M. Santos, "Robust reference tracking control subject to time-varying delay with future reference anticipation," 2023 Latin American Robotics Symposium (LARS), 2023 Brazilian Symposium on Robotics (SBR), and 2023 Workshop on Robotics in Education (WRE), Salvador, Brazil, 2023, pp. 367-372, doi: 10.1109/LARS/SBR/WRE59448.2023.10333024. [link]

J. Santos, A. Conceição, T. Santos, and H. Ara ujo, “Remote control of an omnidirectional mobile robot with time-varying delay and noise attenuation,” Mechatronics, vol. 52, pp. 7–21, 2018, ISSN: 0957-4158. DOI: 10.1016/j.mechatronics.2018.04.003. Online.

J. Santos, A. G. Conceição, and T. L. Santos, “Trajectory tracking of omni-directional mobile robots via predictive control plus a filtered smith predictor,” IFAC- PapersOnLine, vol. 50, no. 1, pp. 10 250–10 255, 2017, 20th IFAC World Congress, ISSN: 2405-8963. DOI: 10.1016/j.ifacol.2017.08.1286. Online.

J. C. L. Barreto S., A. G. S. Conceição, C. E. T. Dórea, L. Martinez and E. R. de Pieri, "Design and Implementation of Model-Predictive Control With Friction Compensation on an Omnidirectional Mobile Robot," in IEEE/ASME Transactions on Mechatronics, vol. 19, no. 2, pp. 467-476, April 2014, doi: 10.1109/TMECH.2013.2243161. [link]

A. G. S. Conceicao, M. D. Correia, and L. Martinez, “Modeling and friction estimation for wheeled omnidirectional mobile robots,” Robotica, vol. 34, no. 9, pp. 2140–2150, 2016. [link]

axebot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

axebot's Issues

Put Git LFS as dependency in the README

          the 3D files are stored on github lfs so if this extension to github is not installed when the directory is cloned it will not download the file but only a text file saying that the 3D file is stored at such and such a location.

Originally posted by @Valoliin in #1 (comment)

Error due to /controller_manager on launching the axebot.launch.py file

I have followed the guide given in the repository README to install all required dependencies on the foxy version of the package and even for omnidirectional_controller I have installed the foxy version specifically as I am running it on a Ubuntu 22.04 machine. The build works fine and compiles as expected and all dependencies get installed too but an error shows up on using the command ros2 launch axebot_gazebo axebot.launch.py to launch the file.

Screenshot from 2023-12-16 08-02-49

[spawner.py-6] [INFO] [1702742523.966068594] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1702742524.011552589] [spawner_omnidirectional_controller]: Waiting for /controller_manager services
[gzserver-3] Segmentation fault (core dumped)
[ERROR] [gzserver-3]: process has died [pid 9958, exit code 139, cmd 'gzserver                                                                       -s libgazebo_ros_init.so   -s libgazebo_ros_factory.so   -s libgazebo_ros_force_system.so       '].
[spawner.py-6] [INFO] [1702742525.974316086] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1702742526.019569104] [spawner_omnidirectional_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1702742527.982664827] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1702742528.026907060] [spawner_omnidirectional_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1702742529.990337206] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1702742530.035777912] [spawner_omnidirectional_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1702742531.998107961] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1702742532.043160764] [spawner_omnidirectional_controller]: Waiting for /controller_manager services
[spawner.py-6] [ERROR] [1702742534.006244248] [spawner_joint_state_broadcaster]: Controller manager not available
[ERROR] [spawner.py-6]: process has died [pid 10043, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster --ros-args'].
[spawner.py-5] [ERROR] [1702742534.050925254] [spawner_omnidirectional_controller]: Controller manager not available
[ERROR] [spawner.py-5]: process has died [pid 10041, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py omnidirectional_controller --ros-args'].

It doesn't seem to be able to load the controllers. I have installed all dependencies of ros2_control like ros-foxy-ros2-control and ros-foxy-ros2-controllers. Please help me identifying the issue.

corrupted 3D models

hello i'm using your project for a real robot under humble ros originally your project and for the foxy version i had to do some modification but my big problem is that the 3D files you put on the github repository are corrupted they don't contain any triangles

Controller manager has an issue when configuring joint state broadcaster and omnidirectional controller axebot

Hello @mateusmenezes95
I loaded the whole axebot system on humble, using the humble version in axebot/axebot.foxy.repos instead of foxy, and am getting exactly the same error as @aamodbk. Here is my error :

[gzserver-3] [INFO] [1704724238.342368811] [controller_manager]: Configuring controller 'omnidirectional_controller'
[spawner-6] [INFO] [1704724238.466758645] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[gzserver-3] [INFO] [1704724238.658969124] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[gzserver-3] [INFO] [1704724238.660412408] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[gzserver-3] [ERROR] [1704724239.299151749] [omnidirectional_controller]: Unable to obtain joint state handle for wheel1_joint
[gzserver-3] [WARN] [1704724239.299415568] [omnidirectional_controller]: Error occurred while doing error handling.
[gzserver-3] [ERROR] [1704724239.299517688] [controller_manager]: After activation, controller 'omnidirectional_controller' is in state 'unconfigured' (1), expected 'active' (3).
[spawner-5] [INFO] [1704724239.601585864] [spawner_omnidirectional_controller]: Configured and activated omnidirectional_controller
[INFO] [spawner-5]: process has finished cleanly [pid 61869]
[INFO] [rviz2-7]: process started with pid [61961]

Please could you help with this if possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.