Skip to content

A ROS2-based rapid prototyping platform for validating autonomous vehicle functions in simulation and real-world testing.

License

Notifications You must be signed in to change notification settings

RISE-Dependable-Transport-Systems/WayWiseR

WayWiseR ﹘ WayWise ❤️ ROS2

Workflow build result Ask DeepWiki

WayWiseR is the integration of WayWise, the rapid prototyping library for connected, autonomous vehicles developed at the RISE Dependable Transport Systems group, with ROS2. Both WayWise and WayWiseR are focused on our research projects. Broadly speaking, there are two main use cases:

  1. Accelerating bringup of ROS2-powered vehicles. In this case, the main functionality of the vehicle is implemented using ROS2 packages and nodes, e.g., Nav2 or any other package you like. WayWise is used for the low-level functionality like talking to motor controller, servo, IMU and GNSS (optional) to publish Odom messages and subscribe to Twist messages through WayWiseR. The main purpose of WayWiseR here is to make it easy to bringup ROS2-powered vehicles using Waywise. Use Case 1

  2. Extended functionality for WayWise-powered vehicles. In this case, the main functionality is implemented using WayWise (e.g., route following using pure pursuit, control and planning using ControlTower). ROS2 adds additional functionality like localization using SLAM Toolbox or advanced simulations in combination with, e.g., Gazebo. Compared to use case 1, directions of Odom and Twist messages would tentatively reverse: WayWise would publish Twist messages through WayWiseR to control the simulated vehicle and subscribe to Odom messages. Use Case 2

In both cases, WayWiseR provides an abstraction layer between WayWise and ROS2, as well as launch files and configuration to quickly get you started. A typical project might start out in simulation using ROS2 and Gazebo. Then, WayWiseR is used to bring it to a real vehicle (1. use case). Alternatively, a project could start out with a ROS2-supported sensor that you want to gather data with (say a LiDAR). Then, WayWise could be used to make the sensor mobile with exact positioning and waypoint following (2. use case). Considering the modularity of ROS2 and WayWise, a project could also do something entirely different that does not clearly fit into one of the use cases. 😊

Current maintainers are: ([email protected]):

  • Ramana Reddy Avula
  • Aria Mirzai
  • Karl Lundgren
  • Ashfaq Farooqui

Previous maintainers:

  • Marvin Damschen
  • Rickard Häll

How to use it and what to expect

This ROS2 package is meant to be cloned into a ROS2 workspace. We do not do releases (for the time being) and do not promise a stable API but stick to standard ROS messages wherever possible. In general, our development resources are scarce and dedicated to fulfill use cases of research projects we are part of. We do our best to avoid it, but things will break from time to time.

How to install and build (on Ubuntu 22.04)

Install ROS2 (required):

Install MAVSDK latest 2.x version (required, version 3.x is not supported):

To instead build MAVSDK from source (optional):

Setup workspace and build it (without simulator-related packages):

sudo apt update && sudo apt install -y libunwind-dev libqt5serialport5-dev git build-essential cmake python3-colcon-common-extensions

export WAYWISER_WS=~/waywiser_ws     #update the environment variable with desired path
export WAYWISER_SKIPPED_PACKAGES="waywiser_agrarsense waywiser_carla waywiser_gazebo"

mkdir -p $WAYWISER_WS/src
git clone [email protected]:RISE-Dependable-Transport-Systems/WayWiseR.git $WAYWISER_WS/src/WayWiseR
cd $WAYWISER_WS/src/WayWiseR
git submodule update --init waywiser_core/WayWise
cd $WAYWISER_WS
python -m venv .venv
source .venv/bin/activate
export PYTHONPATH=.venv/lib/python3.10/site-packages:$PYTHONPATH
pip install -r src/WayWiseR/requirements.txt
source /opt/ros/humble/setup.bash
rosdep install --from-paths $(colcon list --paths-only | grep -Evw "$(echo "$WAYWISER_SKIPPED_PACKAGES" | tr ' ' '|')") --ignore-src --rosdistro humble -r -y
colcon build --symlink-install --packages-skip $WAYWISER_SKIPPED_PACKAGES

To build simulator-related packages such as waywiser_agrarsense, waywiser_carla, and waywiser_gazebo, follow the instructions in the respective packages.

To persist the environment variables and source the ROS2 overlay automatically in each terminal when activating the virtual environment (using source .venv/bin/activate), run the following command:

echo "source /opt/ros/humble/setup.bash" >> .venv/bin/activate
echo "export WAYWISER_WS=$WAYWISER_WS" >> .venv/bin/activate
echo "export WAYWISER_SKIPPED_PACKAGES=$WAYWISER_SKIPPED_PACKAGES" >> .venv/bin/activate
echo 'export PYTHONPATH=.venv/lib/python3.10/site-packages:$PYTHONPATH' >> .venv/bin/activate
echo 'if [ -f "install/setup.bash" ]; then' >> .venv/bin/activate
echo ' source "install/setup.bash"' >> .venv/bin/activate
echo 'fi' >> .venv/bin/activate

Current state

The current state presents the core platform that our research projects AGRARSENSE and SUNRISE have used throughout 2024–2025 to investigate safety-critical situational awareness in the forestry and road vehicle contexts, respectively.

Organization

WayWiseR is divided into several ROS2 packages. Make sure to have a look into the respecitve package.xml files.

  • waywiser: A meta package that depends on all packages below to be able to refer to WayWiseR as a whole. It contains configuration files to optionally setup fastdds discovery server.
  • waywiser_agrarsense: Everything related to simulation using Agrarsense simulator.
  • waywiser_carla: Everything related to simulation using Carla.
  • waywiser_core: Wraps WayWise into ROS2 nodes.
  • waywiser_description: Contains vehicle descriptions in the form of xacro files. Currently a single vehicle is available that corresponds to a Traxxas Slash incl. camera, depth camera, LiDAR and IMU.
  • waywiser_gazebo: Everything related to simulation using Gazebo.
  • waywiser_hwbringup: Configuration and launch files to get real (not simulated) vehicles running.
  • waywiser_nav2: Package that provides dynamic path planning using Nav2.
  • waywiser_perception: Provides image-processing and computer vision functionalities using YOLOv8.
  • waywiser_rviz2: Configuration and launch files for RViz2.
  • waywiser_slam: Configuration and launch files for SLAM Toolbox.
  • waywiser_teleop: Configuration and launch files for teleop packages (handling keyboard or gamepad input) and a node to arbitrate between them.
  • waywiser_test_runner: Package that orchestrates tests.
  • waywiser_twist_safety: Contains configuration and launch files to manage twist commands to vehicle from different sources. It also includes a composable node for emergency stop monitoring.

Examples

Use case 1 ﹘ Nav2 on top of WayWise:

Waywiseroverwithnav2.mp4

Use case 2 ﹘ WayWise autopilot driving in Gazebo:

Gazebosimwithwaywiseautopilot.mp4

Developer Guide

For detailed developer setup configuration, refer to the Developer Guide.

Funded by

EU logo

This project has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement nº 101095835 and nº 101069573. The results reflect only the authors' view and the Agency is not responsible for any use that may be made of the information it contains.

About

A ROS2-based rapid prototyping platform for validating autonomous vehicle functions in simulation and real-world testing.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks