68namespace traffic_manager {
92 void SetAutopilot(
bool enabled =
true, uint16_t tm_port = TM_DEFAULT_PORT);
183 uint64_t MaxSubsteps,
184 float MaxSubstepDeltaTime,
185 std::string VehicleJSON =
"",
186 std::string PowertrainJSON =
"",
187 std::string TireJSON =
"",
188 std::string BaseJSONPath =
"");
用于初始化 Actor 类。只有 ActorFactory 可以创建此对象,因此只有 ActorFactory 可以创建 Actor。
车辆类的前向声明,用于在LaneInvasionSensor类中可能的引用。
void SetWheelSteerDirection(WheelLocation wheel_location, float angle_in_deg)
给车辆轮子一个 旋转 (影响汽车的骨骼框架,而不是物理)
TelemetryData GetTelemetryData() const
返回车辆的遥测数据.
void ApplyControl(const Control &control)
应用 控制此车辆.
PhysicsControl GetPhysicsControl() const
返回车辆最后应用的物理控制.
float GetWheelSteerAngle(WheelLocation wheel_location)
从车辆轮子返回一个 旋转
void CloseDoor(const VehicleDoor door_idx)
在车中关门
LightState GetLightState() const
返回当前车辆的打开灯(LightState).
bool IsAtTrafficLight()
返回交通灯是否正在影响该车辆.
void EnableCarSim(std::string simfile_path)
如果可用,启用CarSim模拟
rpc::TrafficLightState GetTrafficLightState() const
返回当前影响该车辆的交通灯的状态.
void ApplyAckermannControl(const AckermannControl &control)
应用 控制此车辆.
void ApplyPhysicsControl(const PhysicsControl &physics_control)
给此车辆应用物理控制.
rpc::AckermannControllerSettings GetAckermannControllerSettings() const
返回最后应用于车辆的 Ackermann controller 设置.
float GetSpeedLimit() const
返回当前影响该车辆的速度限制.
SharedPtr< TrafficLight > GetTrafficLight() const
检索当前影响该车辆的交通灯.
Control GetControl() const
返回最后应用于车辆的控制.
void UseCarSimRoad(bool enabled)
允许使用CarSim内部道路定义,而不是虚幻引擎的
void ApplyAckermannControllerSettings(const rpc::AckermannControllerSettings &settings)
应用 Ackermann 控制设置给此车辆
void OpenDoor(const VehicleDoor door_idx)
在车中开门
void EnableChronoPhysics(uint64_t MaxSubsteps, float MaxSubstepDeltaTime, std::string VehicleJSON="", std::string PowertrainJSON="", std::string TireJSON="", std::string BaseJSONPath="")
void SetLightState(const LightState &light_state)
给车辆设置一个 LightState.
rpc::VehicleFailureState GetFailureState() const
返回车辆的故障状态
void RestorePhysXPhysics()
const bool _is_control_sticky
void SetAutopilot(bool enabled=true, uint16_t tm_port=TM_DEFAULT_PORT)
开关车辆的自动驾驶仪.
void ShowDebugTelemetry(bool enabled=true)
开关车辆的自动驾驶仪.
该类通过使用消息传递机制,将交通管理器的各个阶段恰当地整合在一起
static const unsigned short TM_DEFAULT_PORT
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。