Implementation:CARLA simulator Carla RssCheck Interface
| Knowledge Sources | |
|---|---|
| Domains | Safety, RSS, Autonomous Driving |
| Last Updated | 2026-02-15 05:00 GMT |
Overview
RssCheck.h defines the interface, supporting enumerations, and data structures for the RSS (Responsibility-Sensitive Safety) checking system in CARLA.
Description
This header file declares the complete public interface for the RssCheck class along with several critical supporting types:
- RoadBoundariesMode -- An enum class controlling whether RSS checks consider road boundaries (
OfforOn). - EgoDynamicsOnRoute -- A struct capturing the ego vehicle's dynamics decomposed into route-relative components, including ego_speed, min_stopping_distance, ego_heading, route_speed_lat, route_speed_lon, route_accel_lat, route_accel_lon, and smoothed averages.
- ActorConstellationResult -- Configuration struct specifying the RSS calculation mode, speed limit restriction mode, ego/actor dynamics, and object type for a given actor.
- ActorConstellationData -- Input data struct providing map-matched information for both the ego vehicle and another actor, including the ego route and ego dynamics on route.
- RssCheck class -- The main class with constructors accepting a maximum steering angle and optional actor constellation callback, plus methods for CheckObjects, dynamics getters/setters, log level control, road boundary mode, routing targets, and route management.
The header also provides std::ostream operators for EgoDynamicsOnRoute, ActorConstellationResult, and ActorConstellationData for debugging output.
Usage
Include this header when you need to instantiate or interact with the RSS checking system. It is the primary entry point for any code that needs to configure and execute RSS safety evaluations within the CARLA client library.
Code Reference
Source Location
- Repository: CARLA
- File:
LibCarla/source/carla/rss/RssCheck.h(423 lines)
Signature
namespace carla {
namespace rss {
enum class RoadBoundariesMode { Off, On };
struct EgoDynamicsOnRoute {
EgoDynamicsOnRoute();
carla::client::Timestamp timestamp;
double time_since_epoch_check_start_ms;
double time_since_epoch_check_end_ms;
::ad::physics::Speed ego_speed;
::ad::physics::Distance min_stopping_distance;
::ad::map::point::ENUPoint ego_center;
::ad::map::point::ENUHeading ego_heading;
::ad::physics::AngularVelocity ego_heading_change;
::ad::physics::Angle ego_steering_angle;
bool ego_center_within_route;
bool crossing_border;
::ad::map::point::ENUHeading route_heading;
::ad::map::point::ENUPoint route_nominal_center;
::ad::map::point::ENUHeading heading_diff;
::ad::physics::Speed route_speed_lat;
::ad::physics::Speed route_speed_lon;
::ad::physics::Acceleration route_accel_lat;
::ad::physics::Acceleration route_accel_lon;
::ad::physics::Acceleration avg_route_accel_lat;
::ad::physics::Acceleration avg_route_accel_lon;
};
struct ActorConstellationResult {
::ad::rss::map::RssMode rss_calculation_mode;
::ad::rss::map::RssSceneCreation::RestrictSpeedLimitMode restrict_speed_limit_mode;
::ad::rss::world::RssDynamics ego_vehicle_dynamics;
::ad::rss::world::ObjectType actor_object_type;
::ad::rss::world::RssDynamics actor_dynamics;
};
struct ActorConstellationData {
::ad::map::match::Object ego_match_object;
::ad::map::route::FullRoute ego_route;
EgoDynamicsOnRoute ego_dynamics_on_route;
::ad::map::match::Object other_match_object;
carla::SharedPtr<carla::client::Actor> other_actor;
};
class RssCheck { /* ... see RssCheck implementation page ... */ };
} // namespace rss
} // namespace carla
Import
#include "carla/rss/RssCheck.h"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| max_steering_angle | float | Yes | Maximum steering angle for the ego vehicle |
| rss_actor_constellation_callback | ActorConstellationCallbackFunctionType | No | Custom callback to configure RSS per-actor |
| carla_ego_actor | SharedPtr<Actor> | No | Ego actor reference (required with callback constructor) |
Outputs
| Name | Type | Description |
|---|---|---|
| EgoDynamicsOnRoute | struct | Route-relative ego dynamics including speed, acceleration, heading |
| ActorConstellationResult | struct | Per-actor RSS configuration result |
| ActorConstellationData | struct | Map-matched data for ego and other actors |
Usage Examples
#include "carla/rss/RssCheck.h"
// Define a custom actor constellation callback
auto callback = [](carla::SharedPtr<carla::rss::ActorConstellationData> data)
-> carla::rss::ActorConstellationResult {
carla::rss::ActorConstellationResult result;
result.rss_calculation_mode = ::ad::rss::map::RssMode::Structured;
result.ego_vehicle_dynamics = carla::rss::RssCheck::GetDefaultVehicleDynamics();
result.actor_dynamics = carla::rss::RssCheck::GetDefaultVehicleDynamics();
result.actor_object_type = ::ad::rss::world::ObjectType::OtherVehicle;
return result;
};
// Create RssCheck with custom callback
carla::rss::RssCheck rss_check(max_steering_angle, callback, ego_actor);
Related Pages
- Environment:CARLA_simulator_Carla_Simulation_Runtime
- CARLA_simulator_Carla_RssCheck - Implementation file
- CARLA_simulator_Carla_RssSensor - Sensor that uses this interface