CARLA AD Agent
The CARLA AD agent is an AD agent that can follow a given route, avoids crashes with other vehicles and respects the state of traffic lights by accessing ground truth data. It is used by the CARLA AD demo to provide an example of how the ROS bridge can be used.
Internally the CARLA AD Agent uses a separate node for local planning. This node has been optimized for the vehicle.tesla.model3
, as it does not have any gear shift delays.
The PID parameters were gathered by Ziegler-Nichols method.
Requirements
To be able to use the carla_ad_agent
, a minimal set of sensors need to be spawned (see Carla Spawn Objects for information on how to spawn sensors):
- An odometry pseudo sensor (
sensor.pseudo.odom
) with role-name odometry
attached to the vehicle.
- An object pseudo sensor (
sensor.pseudo.objects
) with role-name objects
attached to the vehicle.
- A traffic light pseudo sensor (
sensor.pseudo.traffic_lights
) with role-name traffic_lights
.
ROS API
AD Agent Node
Parameters
Parameter |
Type |
Description |
role_name |
string (default: ego_vehicle ) |
CARLA role name of the ego vehicle |
avoid_risk |
bool (default: true ) |
If True, avoids crashes with other vehicles and respects traffic lights |
Subscriptions
Publications
Topic |
Type |
Description |
/carla/<ROLE NAME>/speed_command |
std_msgs/Float64 |
Target speed |
Local Planner Node
Parameters
Parameter |
Type |
Description |
role_name |
string (default: ego_vehicle ) |
CARLA role name of the ego vehicle |
control_time_step |
float (default: 0.05 ) |
Control loop rate |
Kp_lateral |
float (default 0.9 ) |
Proportional term lateral PID controller |
Ki_lateral |
float (default 0.0 ) |
Integral term lateral PID controller |
Kd_lateral |
float (default 0.0 ) |
Derivative term lateral PID controller |
Kp_longitudinal |
float (default 0.206 ) |
Proportional term longitudinal PID controller |
Ki_longitudinal |
float (default 0.0206 ) |
Integral term longitudinal PID controller |
Kd_longitudinal |
float (default 0.515 ) |
Derivative term longitudinal PID controller |
Subscriptions
Publications