MJavadZallaghi / ros2webots

Simulation on Webots, Development with ROS2!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ros2webots

Simulation on Webots, Development with ROS2!

In ros2webots repo, we are creating simulated robots and environments in Webots, that are controlled by ROS2. The whole simulation (Webots world setup + ROS2-based software of the robot) is done in one ROS2 package.

Currently the repo hosts two ROS2 packages:

  • ros2webots_rosbot: A rosbot is used in this world. The future development and simulation feature improvement will be mainly done in this package, as rosbot has many sensors like Camera, Lidar, and IMU; Also, the ros2webots_rosbot package building is done by ament_cmake, that makes it easier for C++ based development. alt world of rosbot
  • ros2webots_turtlebot: The world has a turtlebot, and package has been build using ament_python for initial ROS2+Webots interface setup tests.

Demo

  • ROSBot with a way point tracker

alt ROSBot with a way point tracker

  • ROSbot localization node

IMAGE ALT TEXT HERE

  • Controlling the rosbot by keyboard

alt demo of robot controlled by keyboard

Installation

Install directly

I assume you have installed Ubuntu 22.04 as OS or installed on Windows WSL2.

  1. Install ROS2 iron
  2. Install Webots. If you are working on WSL2, then you can install Webots on windows as webots_ros2 package can find your installation by a WEBOTS_HOME variable. Don't worry, eveything is explain the the reference of step 3.
  3. Install webots_ros2 package.
  4. Clone the repo whereever you want:
    git clone https://github.com/MJavadZallaghi/ros2webots.git
    
  5. change directory to the workspace of the cloned package:
    cd ros2webots
    
  6. Source your ros2 installation:
     source /opt/ros/iron/setup.bash
    
  7. Build the package.
    colcon build
    
  8. Source ros2webots installed packages:
    source install/setup.bash
    
  9. Check the installation:
ros2 pkg list |grep ros2webots

You must see this package: ros2webots_rosbot

Install using Docker

Docker image of the ros2webots package is under construction!

Run the simulations

  • sim 1: rosbot controlled by a waypoint tracker
  1. Run the rosbot wprld in terminal and see how the Football ball are being passed by the ROSBot:
    ros2 launch ros2webots_rosbot rosbot_world_launch.py
    

Roadmap

  • Visualized the rosbot using rviz2 of foxglove with it's frames, sensor data, etc.
  • Implment IMU + Wheel based locallization fir the rosbot and visualize its path.
  • Implement KF for the IMU acceleration fussion with odometry data and increase the localization accuracy.
  • Develop a mapping node for the rosbot for environment mapping.
  • Implement a go-to-point controller for the ROSbot

Support and Feedback

For any support and feedback, email MohammadJavadZallaghi@gmail.com or use issues section of this repo.

License

MIT

Authors

Acknowledgements

  • ros2webots is created based on the Webots and ROS2 interface, that is possible by using webots_ros2 package.webots_ros2 is a package that provides the necessary interfaces to simulate a robot in the Webots open-source 3D robots simulator. (https://github.com/cyberbotics/webots_ros2)

About

Simulation on Webots, Development with ROS2!


Languages

Language:C++ 60.0%Language:C 17.9%Language:Python 11.9%Language:Jupyter Notebook 7.3%Language:CMake 2.7%Language:MATLAB 0.2%