49 void SetAutopilot(
bool enabled =
true, uint16_t tm_port = TM_DEFAULT_PORT);
162 uint64_t MaxSubsteps,
163 float MaxSubstepDeltaTime,
164 std::string VehicleJSON =
"",
165 std::string PowertrainJSON =
"",
166 std::string TireJSON =
"",
167 std::string BaseJSONPath =
"");
Used to initialize Actor classes.
Actor(ActorInitializer init)
rpc::VehicleTelemetryData TelemetryData
void SetWheelSteerDirection(WheelLocation wheel_location, float angle_in_deg)
Sets a Rotation to a wheel of the vehicle (affects the bone of the car skeleton, not the physics).
TelemetryData GetTelemetryData() const
Return the runtime telemetry of this vehicle: forward speed, last applied control inputs,...
void ApplyControl(const Control &control)
Apply control to this vehicle.
void SetWheelAnimationOverride(bool enabled)
Enables or disables the wheel animation override, in which the wheels show only the values set throug...
rpc::VehiclePhysicsControl PhysicsControl
PhysicsControl GetPhysicsControl() const
Return the physics control last applied to this vehicle.
float GetWheelSteerAngle(WheelLocation wheel_location)
Return a Rotation from a wheel of the vehicle.
void CloseDoor(const VehicleDoor door_idx)
Close a door in this vehicle.
Vehicle(ActorInitializer init)
LightState GetLightState() const
Return the current open lights (LightState) of this vehicle.
rpc::VehicleAckermannControl AckermannControl
bool IsAtTrafficLight()
Return whether a traffic light is affecting this vehicle.
void EnableCarSim(std::string simfile_path)
Enables CarSim simulation if it is availiable.
rpc::TrafficLightState GetTrafficLightState() const
Return the state of the traffic light currently affecting this vehicle.
void ApplyAckermannControl(const AckermannControl &control)
Apply control to this vehicle.
float GetWheelSuspensionOffset(WheelLocation wheel_location)
Return the suspension compression of a wheel, in meters.
void ApplyPhysicsControl(const PhysicsControl &physics_control)
Apply physics control to this vehicle.
rpc::AckermannControllerSettings GetAckermannControllerSettings() const
Return the last Ackermann controller settings applied to this vehicle.
float GetSpeedLimit() const
Return the speed limit currently affecting this vehicle.
void SetWheelPitchAngle(WheelLocation wheel_location, float angle_in_deg)
Sets the spin angle of a wheel, in degrees (affects the bone of the car skeleton, not the physics).
SharedPtr< TrafficLight > GetTrafficLight() const
Retrieve the traffic light actor currently affecting this vehicle.
void SetWheelSuspensionOffset(WheelLocation wheel_location, float offset)
Sets the suspension compression of a wheel, in meters (affects the bone of the car skeleton,...
rpc::VehicleControl Control
Control GetControl() const
Return the control last applied to this vehicle.
std::vector< geom::Transform > GetVehicleBoneWorldTransforms() const
void UseCarSimRoad(bool enabled)
Enables the use of CarSim internal road definition instead of unreal's.
carla::rpc::VehicleWheelLocation WheelLocation
void ApplyAckermannControllerSettings(const rpc::AckermannControllerSettings &settings)
Apply Ackermann control settings to this vehicle.
void OpenDoor(const VehicleDoor door_idx)
Open a door in this vehicle.
void EnableChronoPhysics(uint64_t MaxSubsteps, float MaxSubstepDeltaTime, std::string VehicleJSON="", std::string PowertrainJSON="", std::string TireJSON="", std::string BaseJSONPath="")
float GetWheelPitchAngle(WheelLocation wheel_location)
Return the spin angle of a wheel, in degrees.
rpc::VehicleLightState::LightState LightState
rpc::VehicleDoor VehicleDoor
void SetLightState(const LightState &light_state)
Sets a LightState to this vehicle.
rpc::VehicleFailureState GetFailureState() const
Returns the failure state of the vehicle.
traffic_manager::TrafficManager TM
const bool _is_control_sticky
void SetAutopilot(bool enabled=true, uint16_t tm_port=TM_DEFAULT_PORT)
Switch on/off this vehicle's autopilot.
void ShowDebugTelemetry(bool enabled=true)
Switch on/off this vehicle's autopilot.
LightState
Can be used as flags.
This class integrates all the various stages of the traffic manager appropriately using messengers.
static const unsigned short TM_DEFAULT_PORT
This file contains definitions of common data structures used in traffic manager.
std::shared_ptr< T > SharedPtr