CARLA
 
载入中...
搜索中...
未找到
RssRestrictor.h
浏览该文件的文档.
1// Copyright (c) 2019-2020 Intel Corporation
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once // 防止头文件被重复包含
7
8#include <spdlog/spdlog.h> // 引入 spdlog 日志库
9#include <memory> // 引入智能指针库
10
11namespace ad {
12namespace rss {
13namespace state {
14
15// 前向声明 RSS 正确响应
16struct ProperResponse;
17
18} // namespace world
19} // namespace rss
20} // namespace ad
21
22namespace carla {
23namespace rpc {
24class VehicleControl; // 前向声明车辆控制类
25class VehiclePhysicsControl; // 前向声明车辆物理控制类
26} // namespace rpc
27
28namespace rss {
29
30// 前向声明自我车辆在当前路线上的动态
31struct EgoDynamicsOnRoute;
32
33// 实现 CARLA 中 RSS 限制的类
35public:
36 // 构造函数
38
39 // 析构函数
41
42 // 实际上限制给定车辆控制输入以模拟
43 // 通过制动来符合 RSS 的行为
44 // 横向制动通过反向转向实现,因此只是一个非常粗略的解决方案
45 carla::rpc::VehicleControl RestrictVehicleControl(const carla::rpc::VehicleControl &vehicle_control, // 限制车辆控制
46 const ::ad::rss::state::ProperResponse &proper_response, // 正确响应
47 const carla::rss::EgoDynamicsOnRoute &ego_dynamics_on_route, // 自我车辆动态
48 const carla::rpc::VehiclePhysicsControl &vehicle_physics); // 车辆物理控制
49
50 void SetLogLevel(const uint8_t log_level); // 设置日志级别
51
52private:
53 // 日志记录器实例
54 std::shared_ptr<spdlog::logger> _logger; // 智能指针管理的日志记录器
55};
56
57} // namespace rss
58} // namespace carla
std::shared_ptr< spdlog::logger > _logger
carla::rpc::VehicleControl RestrictVehicleControl(const carla::rpc::VehicleControl &vehicle_control, const ::ad::rss::state::ProperResponse &proper_response, const carla::rss::EgoDynamicsOnRoute &ego_dynamics_on_route, const carla::rpc::VehiclePhysicsControl &vehicle_physics)
void SetLogLevel(const uint8_t log_level)
CARLA模拟器的主命名空间。
Definition Carla.cpp:139
struct defining the ego vehicles current dynamics in respect to the current route
Definition RssCheck.h:46