Written by ChenYing Kuo (ADLINK and ZettaScale)
As autonomous vehicles become increasingly popular, it is important to monitor and manage them from the cloud. The management system needs to collect data from autonomous driving systems and send control commands when necessary. This feature will be critical as Autoware gains wider adoption within the open-source community. In this scenario, we believe that Zenoh can play a significant role to enhance the communication efficiency.
We built a prototype project zenoh_autoware_fms, to show how Zenoh improves vehicle management. Autoware is based on ROS 2 and uses CycloneDDS as its communication layer. DDS functions well within vehicles, but it lacks compatibility for Internet communication and cannot interface with the cloud. We can indeed choose some popular protocols for external communication, for instance, MQTT or Kafka. However, we would suggest using Zenoh because of the following reasons:
- Zenoh is more efficient than other protocol according to our benchmark result.
- Zenoh can easily work with other protocol with the help of plugins. For example, zenoh-bridge-ros2dds can easily transform ROS 2 messages to Zenoh ones and provide other useful features, like access control and downsampling.
Architecture
In our architecture, we use the zenoh-bridge-ros2dds as a gateway to communicate with the management system server. Every vehicle has its own zenoh-bridge-ros2dds with a unique namespace. The server can talk to different vehicles by adding the corresponding namespace.
On the server side, we implement some basic functions: monitoring vehicles, remote driving and setting goal. The server is web-based, and the backend speaks in Zenoh for communication.
On the client side, we leverage AD API defined by Autoware to get data and send commands. zenoh-bridge-ros2dds can filter uninterested ROS 2 messages, and we only allow AD API to enter into the Zenoh network.
Tutorial
In the following section, we’ll show you how to run the system step by step. You can also refer to the tutorial here.
Firstly, let’s download and install the management system.
# Download the code
git clone https://github.com/evshary/zenoh_autoware_fms.git
# Install prerequisite
cd zenoh_autoware_fms
./prerequisite.sh
Then, we need to leverage our previous work to run multiple vehicles in the Carla simulator. You can also check the online document for the detail commands.
- 1st terminal: Run Carla simulator
./CarlaUE4.sh -quality-level=Epic -world-port=2000 -RenderOffScreen
- 2nd terminal: Run the bridges
# Go inside "Carla bridge container"
./container/run-bridge-docker.sh
# Run zenoh_carla_bridge and Python Agent
cd autoware_carla_launch
source env.sh
./script/run-bridge-two-vehicles.sh
- 3rd terminal: Run the first vehicle
# Go inside "Autoware container"
./container/run-autoware-docker.sh
# Run zenoh-bridge-ros2dds and Autoware
cd autoware_carla_launch
source env.sh
# You can ignore the Bridge IP and management system IP if they are on the same host.
./script/run-autoware.sh v1 <Bridge IP> <FMS IP>
- 4th terminal: Run the second vehicle
# Go inside "Autoware container"
./run-autoware-docker.sh
# Run zenoh-bridge-ros2dds and Autoware
cd autoware_carla_launch
source env.sh
# You can ignore the Bridge IP and management system IP if they are on the same host.
./script/run-autoware.sh v2 <Bridge IP> <FMS IP>
Finally, let’s run the management system.
cd zenoh_autoware_fms
source env.sh
./run_server.sh
The following video shows how we run the management system on the ADLINK ADM-AL30 platform, which is designed for autonomous driving applications. There are three main functions inside the system:
- Monitoring vehicles (0:29): Listing all the available vehicles on the Zenoh network.
- Setting goal (0:47): Assign the route for each vehicle.
- Remote driving (2:04): Control the vehicle from the web console. It is not easy to control with a mouse, but it is sufficient to demonstrate Zenoh’s compatibility in remote driving.
Conclusion
The blog and the project give an overview of how to use Zenoh in the Autoware management system. As we’ve already mentioned, the project is only a prototype to demonstrate the power of Zenoh. There should be more features for a complete management system. If you are interested in applying Zenoh in your communication system, welcome to contribute to the project or contact us.
Special Thanks
The project is also contributed by ADLINK interns: