Self-Driving Cars with ROS 2 and Autoware
- Ubuntu 18.04
- Docker.ce, installion.
- Nvidia-container-runtime.
Follow installtion here
Notes
- After docker installtion, docker and
ade start
command should be started with root privileges so you should do:
sudo groupadd docker
sudo usermod -aG docker $USER
reboot
for more info, Check this link
- Disable secure boot from BIOS -> to avoid problems to Nvidia dirivers installtion
- Do
unset ADE_DISABLE_NVIDIA_DOCKER
and delete ADE_DISABLE_NVIDIA_DOCKER line from~/AutowareAuto/.aderc
-> to avoid Rviz problems
First implemention of ADE by checking 3D perception stack
Autoware.Ai is like the skelton for Autowar.Auto. It contains the main software algorithms but supports ROS1.
Autowar.Auto is the next generation with more robust, clean and reliable code and supports ROS2.
First LGSVL simulator implmentation with ADE
Note
Bridging with Autoware.Auto
LGSVL uses conventions which are not directly aligned with ROS 2 conventions. The full list of behaviors the lgsvl_interface implements is:
- Converts control inputs with CCW positive rotations to the CCW negative inputs the LGSVL simulator expects
- Provides a mapping from VehicleControlCommand to the RawControlCommand LGSVL expects via parametrizable 1D lookup tables To run the lgsvl_interface, enter the following in a new terminal window:
$ ade enter
ade$ source /opt/AutowareAuto/setup.bash
ade$ ros2 run lgsvl_interface lgsvl_interface_exe __params:=/opt/AutowareAuto/share/lgsvl_interface/param/lgsvl.param.yaml
Autoware.Auto uses a classical object detection stack:
- Simpler and more robust
- Geometric and optimization-based methods for: ○ Ground filtering ○ Clustering ○ Shape Extraction
Documentation: -https://autowarefoundation.gitlab.io/autoware.auto/AutowareAuto/lgsvl.html
- https://www.lgsvlsimulator.com/docs/vehicles-tab/#how-to-add-a-vehicle
- lgsvl-sensors.json file for vehicle configuration : https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/blob/master/lgsvl-sensors.json
Running command for Object detection:
ade$ source /opt/AutowareAuto/setup.bash
ade$ ros2 launch autoware_demos
lidar_bounding_boxes_lgsvl.launch.py
Note:
For the lgsvl bridge with ROS2 connection, ros2-lgsvl-bridge
package
should be cloned and build inside ~/adehome
and then restart ADE
Hands-on lab on Camera perception to detect and Project road lanes using ROS2 and Autoware ADE
Repo: https://gitlab.com/ApexAI/autowareclass2020/-/tree/master/code/src/08_Perception_Camera
Test:
- enter ADE
ade start
ade enter
-
go to project repo
-
source install/setup.bash
-
sudo apt-get install libopencv-dev
(optionally, if you don't have already libopencv-dev installed ) -
open 4 terminals ( inside ade ) and
source install/setup.bash
( inside project repo) -
terminal 1 : init. data_loader node
ros2 run lane_detection_data_loader lane_detection_data_loader_node
-
terminal 2 : init. projection_node
ros2 run lane_detection_projection lane_detection_projection_node
-
terminal 3 : init. visualization_node
ros2 run lane_detection_visualization lane_detection_visualization_node
-
terminal 4 : open RViz
rviz2
then setup RViz to visualize image and marker topics