Main Content

Automated Parking Valet with ROS 2 in Simulink

This example shows how to distribute the Automated Parking Valet application among various nodes in a ROS 2 network in Simulink® and deploy them as standalone ROS 2 nodes. This example extends the Automated Parking Valet (Automated Driving Toolbox) example in the Automated Driving Toolbox™. Using the Simulink model in the Automated Parking Valet in Simulink example, tune the planner, controller and vehicle dynamic parameters before partitioning the model into ROS 2 nodes. Then you generate code for the ROS 2 nodes and deploy them.

Prerequisites: Automated Parking Valet (Automated Driving Toolbox), Generate a Standalone ROS 2 Node from Simulink

Introduction

This autonomous vehicle application has the following components.

Parking valet Components

This example concentrates on simulating the Planning, Control and the Vehicle components. For Localization, this example uses pre-recorded localization map data. The Planning component is further divided into Behavior planner and Path Planner components. This results in a ROS 2 network comprised of four ROS 2 nodes: Behavioral Planner, Path Planner, Controller and Vehicle. The following figure shows the relationships between each ROS 2 node in the network and the topics used in each.

Parking valet nodes.

The example follows this general workflow from algorithm design to deployment:

  1. Design a Simulink model without enabling ROS and verify that the controller algorithm provides accurate results

  2. Replace the input and output ports with ROS 2 Subscribe and Publish blocks to prepare for actual deployment

  3. Generate and deploy ROS 2 nodes

This example walks you through the simulation and code generation workflow for the automated parking valet components in these steps.

  1. Simulate Automated Parking Valet with ROS 2 in Simulink — Examine Simulink models for all the components, and simulate the automated parking valet workflow.

  2. Generate and Deploy ROS 2 Nodes for Automated Parking Valet in Simulink — Generate code and deploy the automated parking valet system components as ROS 2 nodes.