-
Clone Repository:
Clone the R2Ware repository and navigate into the project directory:
cd ~/ git clone https://github.com/ahmaad-ansari/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 VLP32 3D LiDAR.
Before setting up the Nebula Driver, ensure you have the following prerequisites installed:
- ROS (Galactic distribution)
- Velodyne ROS package
You can install the Velodyne ROS package using the following command:
sudo apt-get install ros-galactic-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.
-
Enable Multicast:
Run the following commands on the R2's local machine 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 while inside the R2's Docker 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 running Autoware:
sudo ufw disable sudo ip link set lo multicast on sudo apt install -y ros-humble-fastrtps
Set the following environment variables to enable ROS 2 communication:
export ROS_LOCALHOST_ONLY=0 export ROS_DOMAIN_ID=32
-
Test Communication:
Once you have completed the setup steps, you can test the communication between the two machines by running one command on each machine:
ros2 run demo_nodes_cpp listener
ros2 run demo_nodes_cpp talker
To run the entire system, follow these steps:
-
Run on Local Machine:
ros2 launch nebula_ros nebula_launch.py sensor_model:=VLP32
-
Run in Docker Container:
ros2 launch r2ware_launch r2ware_launch.py
-
Run on Ground Station:
[...]