CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::traffic_manager::MotionPlanStage Class Reference

#include <MotionPlanStage.h>

+ Inheritance diagram for carla::traffic_manager::MotionPlanStage:
+ Collaboration diagram for carla::traffic_manager::MotionPlanStage:

Public Member Functions

 MotionPlanStage (const std::vector< ActorId > &vehicle_id_list, const SimulationState &simulation_state, const Parameters &parameters, const BufferMap &buffer_map, const TrackTraffic &track_traffic, const std::vector< float > &urban_longitudinal_parameters, const std::vector< float > &highway_longitudinal_parameters, const std::vector< float > &urban_lateral_parameters, const std::vector< float > &highway_lateral_parameters, const LocalizationFrame &localization_frame, const CollisionFrame &collision_frame, const TLFrame &tl_frame, const cc::World &world, ControlFrame &output_array)
 
void RemoveActor (const ActorId actor_id)
 
void Reset ()
 
void Update (const unsigned long index)
 

Private Member Functions

std::pair< bool, float > CollisionHandling (const CollisionHazardData &collision_hazard, const bool tl_hazard, const cg::Vector3D ego_velocity, const cg::Vector3D ego_heading, const float max_target_velocity)
 
bool SafeAfterJunction (const LocalizationData &localization, const bool tl_hazard, const bool collision_emergency_stop)
 
- Private Member Functions inherited from carla::traffic_manager::Stage
 Stage ()
 
 Stage (const Stage &)
 
virtual ~Stage ()
 

Private Attributes

const BufferMapbuffer_map
 
const CollisionFramecollision_frame
 
cc::Timestamp current_timestamp
 
const std::vector< float > highway_lateral_parameters
 
const std::vector< float > highway_longitudinal_parameters
 
const LocalizationFramelocalization_frame
 
ControlFrameoutput_array
 
const Parametersparameters
 
std::unordered_map< ActorId, StateEntrypid_state_map
 
const SimulationStatesimulation_state
 
std::unordered_map< ActorId, cc::Timestampteleportation_instance
 
const TLFrametl_frame
 
const TrackTraffictrack_traffic
 
const std::vector< float > urban_lateral_parameters
 
const std::vector< float > urban_longitudinal_parameters
 
const std::vector< ActorId > & vehicle_id_list
 
const cc::Worldworld
 

Detailed Description

Definition at line 17 of file MotionPlanStage.h.

Constructor & Destructor Documentation

◆ MotionPlanStage()

carla::traffic_manager::MotionPlanStage::MotionPlanStage ( const std::vector< ActorId > &  vehicle_id_list,
const SimulationState simulation_state,
const Parameters parameters,
const BufferMap buffer_map,
const TrackTraffic track_traffic,
const std::vector< float > &  urban_longitudinal_parameters,
const std::vector< float > &  highway_longitudinal_parameters,
const std::vector< float > &  urban_lateral_parameters,
const std::vector< float > &  highway_lateral_parameters,
const LocalizationFrame localization_frame,
const CollisionFrame collision_frame,
const TLFrame tl_frame,
const cc::World world,
ControlFrame output_array 
)

Definition at line 17 of file MotionPlanStage.cpp.

Member Function Documentation

◆ CollisionHandling()

std::pair< bool, float > carla::traffic_manager::MotionPlanStage::CollisionHandling ( const CollisionHazardData collision_hazard,
const bool  tl_hazard,
const cg::Vector3D  ego_velocity,
const cg::Vector3D  ego_heading,
const float  max_target_velocity 
)
private

◆ RemoveActor()

void carla::traffic_manager::MotionPlanStage::RemoveActor ( const ActorId  actor_id)
virtual

Implements carla::traffic_manager::Stage.

Definition at line 281 of file MotionPlanStage.cpp.

References pid_state_map, and teleportation_instance.

Referenced by carla::traffic_manager::ALSM::RemoveActor().

+ Here is the caller graph for this function:

◆ Reset()

void carla::traffic_manager::MotionPlanStage::Reset ( void  )
virtual

Implements carla::traffic_manager::Stage.

Definition at line 286 of file MotionPlanStage.cpp.

References pid_state_map, and teleportation_instance.

Referenced by carla::traffic_manager::TrafficManagerLocal::Stop().

+ Here is the caller graph for this function:

◆ SafeAfterJunction()

bool carla::traffic_manager::MotionPlanStage::SafeAfterJunction ( const LocalizationData localization,
const bool  tl_hazard,
const bool  collision_emergency_stop 
)
private

◆ Update()

void carla::traffic_manager::MotionPlanStage::Update ( const unsigned long  index)
virtual

Implements carla::traffic_manager::Stage.

Definition at line 47 of file MotionPlanStage.cpp.

References carla::rpc::VehicleControl::brake, buffer_map, collision_frame, CollisionHandling(), current_timestamp, carla::traffic_manager::StateEntry::deviation_integral, carla::traffic_manager::DeviationCrossProduct(), carla::traffic_manager::DeviationDotProduct(), carla::client::Timestamp::elapsed_seconds, carla::geom::Transform::GetForwardVector(), carla::traffic_manager::SimulationState::GetHeading(), carla::traffic_manager::SimulationState::GetLocation(), carla::traffic_manager::SimulationState::GetRotation(), carla::client::World::GetSnapshot(), carla::traffic_manager::SimulationState::GetSpeedLimit(), carla::traffic_manager::Parameters::GetSynchronousMode(), carla::traffic_manager::GetTargetWaypoint(), carla::client::WorldSnapshot::GetTimestamp(), carla::traffic_manager::Parameters::GetVehicleTargetVelocity(), carla::traffic_manager::SimulationState::GetVelocity(), highway_lateral_parameters, highway_longitudinal_parameters, carla::traffic_manager::constants::SpeedThreshold::HIGHWAY_SPEED, carla::traffic_manager::constants::HybridMode::HYBRID_MODE_DT, carla::traffic_manager::constants::HybridMode::HYBRID_MODE_DT_FL, carla::traffic_manager::SimulationState::IsPhysicsEnabled(), carla::geom::Vector3D::Length(), localization_frame, carla::geom::Transform::location, output_array, parameters, pid_state_map, carla::geom::Transform::rotation, carla::traffic_manager::PID::RunStep(), SafeAfterJunction(), simulation_state, carla::traffic_manager::PID::StateUpdate(), carla::rpc::VehicleControl::steer, carla::traffic_manager::constants::WaypointSelection::TARGET_WAYPOINT_HORIZON_LENGTH, carla::traffic_manager::constants::WaypointSelection::TARGET_WAYPOINT_TIME_HORIZON, teleportation_instance, carla::rpc::VehicleControl::throttle, tl_frame, urban_lateral_parameters, urban_longitudinal_parameters, vehicle_id_list, carla::traffic_manager::StateEntry::velocity_integral, and world.

Referenced by carla::traffic_manager::TrafficManagerLocal::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ buffer_map

const BufferMap& carla::traffic_manager::MotionPlanStage::buffer_map
private

Definition at line 22 of file MotionPlanStage.h.

Referenced by Update().

◆ collision_frame

const CollisionFrame& carla::traffic_manager::MotionPlanStage::collision_frame
private

Definition at line 30 of file MotionPlanStage.h.

Referenced by Update().

◆ current_timestamp

cc::Timestamp carla::traffic_manager::MotionPlanStage::current_timestamp
private

Definition at line 39 of file MotionPlanStage.h.

Referenced by Update().

◆ highway_lateral_parameters

const std::vector<float> carla::traffic_manager::MotionPlanStage::highway_lateral_parameters
private

Definition at line 28 of file MotionPlanStage.h.

Referenced by Update().

◆ highway_longitudinal_parameters

const std::vector<float> carla::traffic_manager::MotionPlanStage::highway_longitudinal_parameters
private

Definition at line 26 of file MotionPlanStage.h.

Referenced by Update().

◆ localization_frame

const LocalizationFrame& carla::traffic_manager::MotionPlanStage::localization_frame
private

Definition at line 29 of file MotionPlanStage.h.

Referenced by Update().

◆ output_array

ControlFrame& carla::traffic_manager::MotionPlanStage::output_array
private

Definition at line 38 of file MotionPlanStage.h.

Referenced by Update().

◆ parameters

const Parameters& carla::traffic_manager::MotionPlanStage::parameters
private

Definition at line 21 of file MotionPlanStage.h.

Referenced by Update().

◆ pid_state_map

std::unordered_map<ActorId, StateEntry> carla::traffic_manager::MotionPlanStage::pid_state_map
private

Definition at line 34 of file MotionPlanStage.h.

Referenced by RemoveActor(), Reset(), and Update().

◆ simulation_state

const SimulationState& carla::traffic_manager::MotionPlanStage::simulation_state
private

Definition at line 20 of file MotionPlanStage.h.

Referenced by CollisionHandling(), SafeAfterJunction(), and Update().

◆ teleportation_instance

std::unordered_map<ActorId, cc::Timestamp> carla::traffic_manager::MotionPlanStage::teleportation_instance
private

Definition at line 37 of file MotionPlanStage.h.

Referenced by RemoveActor(), Reset(), and Update().

◆ tl_frame

const TLFrame& carla::traffic_manager::MotionPlanStage::tl_frame
private

Definition at line 31 of file MotionPlanStage.h.

Referenced by Update().

◆ track_traffic

const TrackTraffic& carla::traffic_manager::MotionPlanStage::track_traffic
private

Definition at line 23 of file MotionPlanStage.h.

Referenced by SafeAfterJunction().

◆ urban_lateral_parameters

const std::vector<float> carla::traffic_manager::MotionPlanStage::urban_lateral_parameters
private

Definition at line 27 of file MotionPlanStage.h.

Referenced by Update().

◆ urban_longitudinal_parameters

const std::vector<float> carla::traffic_manager::MotionPlanStage::urban_longitudinal_parameters
private

Definition at line 25 of file MotionPlanStage.h.

Referenced by Update().

◆ vehicle_id_list

const std::vector<ActorId>& carla::traffic_manager::MotionPlanStage::vehicle_id_list
private

Definition at line 19 of file MotionPlanStage.h.

Referenced by Update().

◆ world

const cc::World& carla::traffic_manager::MotionPlanStage::world
private

Definition at line 32 of file MotionPlanStage.h.

Referenced by Update().


The documentation for this class was generated from the following files: