This repository is designed to facilitate deployment on the ROSMASTER R2 model car and stream all onboard sensor data to a topic compatible with Autoware. Following deployment, users can execute the external parking detector and autonomous parking script to enable autonomous valet parking of the model car. Please note that while the documentation is provided, it is incomplete and may be updated progressively.
- Getting Started
- Tier IV Nebula Sensor Driver
- Multi-Machine Wi-Fi Communication Setup
- System Deployment
-
Clone Repository:
Clone the R2Ware repository and navigate into the project directory:
cd ~/ git clone https://github.com/zubxxr/r2ware.git cd r2ware
-
Initialize Workspace:
Create the
src
directory and import the necessary repositories:mkdir src vcs import src < r2ware.repos
-
Set Up Docker:
Run the provided script to set up Docker for the R2Ware environment. You can optionally specify the
vlp32
option to configure the Docker container for VLP32 usage:./run_docker.sh vlp32 cd ~/r2ware
-
Install Dependencies:
Install ROS dependencies using
rosdep
:apt update rosdep update rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
-
Build the Workspace:
Build the R2Ware workspace using
colcon
:colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
Or build specific packages:
colcon build --symlink-install --packages-select r2ware_control
colcon build --symlink-install --packages-select r2ware_sensing
colcon build --symlink-install --packages-select r2ware_launch
colcon build --symlink-install --packages-select r2ware_status
This guide provides instructions for setting up the Nebula Driver for VLP32C Velodyne LiDAR. It must be done locally, on a Galactic or Humble ROS Distribution.
Before setting up the Nebula Driver, ensure you have the following prerequisites installed:
- ROS (Galactic or Humble distribution)
- Velodyne ROS package
You can install the Velodyne ROS package using the following command:
sudo apt-get install ros-<distro>-velodyne
-
Create Workspace:
Create a workspace directory for the Nebula Sensor Driver on the local machine:
mkdir -p ~/nebula_sensor_driver/src cd ~/nebula_sensor_driver
-
Clone Nebula Repository:
Clone the Nebula repository into the
src
directory:git clone https://github.com/tier4/nebula.git src
-
Import Dependencies:
Import the dependencies using
vcs
:vcs import src < src/build_depends.repos
-
Install Dependencies:
Install ROS dependencies using
rosdep
:rosdep install --from-paths src --ignore-src -y -r
-
Build Nebula:
Build the Nebula driver using
colcon
:colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
- Make sure to source your ROS workspace (
source ~/nebula_sensor_driver/install/setup.bash
) before using the Nebula Driver. And add the following to your.bashrc
file.export ROS_LOCALHOST_ONLY=1 export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp if [ ! -e /tmp/cycloneDDS_configured ]; then sudo sysctl -w net.core.rmem_max=2147483647 sudo ip link set lo multicast on touch /tmp/cycloneDDS_configured fi
This section outlines the setup process for enabling multi-machine communication between the R2 and a ground station. It consists of setting up the network for the R2 locally and in docker container, and the ground station so they can all recognize each other over Wi-Fi.
-
Enable Multicast: Run the following commands locally to enable communication with a ground station on the same network:
sudo ip link set lo multicast on sudo ufw disable
You can check the status of the firewall with the following command:
sudo ufw status
-
Inside Docker Container: Run the following commands in the container to enable communication with a ground station on the same network:
apt install -y ros-foxy-fastrtps
-
Ground Station Configuration: Run the following commands on the ground station.
sudo ufw disable sudo ip link set lo multicast on sudo apt install -y ros-humble-fastrtps
-
Enable Network Discovery: Set the following environment variables to enable ROS 2 communication:
export ROS_LOCALHOST_ONLY=0 export ROS_DOMAIN_ID=32 export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
Test Communication: Test the communications between the two machines. Run the talker on 1 machine and listener on the other.
ros2 run demo_nodes_cpp listener
ros2 run demo_nodes_cpp talker
To run the entire system, follow these steps:
-
Run Nebula Velodyne Driver on Local Machine.
ros2 launch nebula_ros nebula_launch.py sensor_model:=VLP32
-
Run Vehicle Sensor Data Launcher in Docker Container.
ros2 launch r2ware_launch r2ware_launch.py
-
Run Autoware on Ground Station.
ros2 launch autoware_launch autoware.launch.xml \ map_path:=/PATH/TO/YOUR/MAP \ vehicle_model:=YOUR_VEHICLE \ sensor_model:=YOUR_SENSOR_KIT
-
Execute Autonomous Valet Parking: Follow the steps here to start the parking spot detector and enable the vehicle to autonomously park itself.