scenario_simulator_v2 C++ API
Classes | Functions
traffic_simulator::follow_trajectory Namespace Reference

Classes

struct  ControllerError
 
struct  PredictedState
 
class  FollowWaypointController
 

Functions

auto makeUpdatedStatus (const traffic_simulator_msgs::msg::EntityStatus &, traffic_simulator_msgs::msg::PolylineTrajectory &, const traffic_simulator_msgs::msg::BehaviorParameter &, const std::shared_ptr< hdmap_utils::HdMapUtils > &, double, double, std::optional< double > target_speed=std::nullopt) -> std::optional< EntityStatus >
 
template<typename F , typename T , typename... Ts>
auto any (F f, T &&x, Ts &&... xs)
 

Function Documentation

◆ any()

template<typename F , typename T , typename... Ts>
auto traffic_simulator::follow_trajectory::any ( f,
T &&  x,
Ts &&...  xs 
)

◆ makeUpdatedStatus()

auto traffic_simulator::follow_trajectory::makeUpdatedStatus ( const traffic_simulator_msgs::msg::EntityStatus entity_status,
traffic_simulator_msgs::msg::PolylineTrajectory &  polyline_trajectory,
const traffic_simulator_msgs::msg::BehaviorParameter &  behavior_parameter,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils,
double  step_time,
double  matching_distance,
std::optional< double >  target_speed = std::nullopt 
) -> std::optional<EntityStatus>
Note
if entity is on lane use pitch from lanelet, otherwise use pitch on target
If the nearest waypoint is arrived at in this step without a specific arrival time, it will be considered as achieved
If the trajectory has only waypoints with unspecified time, the last one is followed using maximum speed including braking - in this case accuracy of arrival is checked
If it is an intermediate waypoint with an unspecified time, the accuracy of the arrival is irrelevant
Do not change orientation if there is no designed_velocity vector
if there is a designed_velocity vector, set the orientation in the direction of it
If it is the transition between lanelets: overwrite position to improve precision
Handle lanelet transition
if entity is on lane use pitch from lanelet, otherwise use pitch on target
If the nearest waypoint is arrived at in this step without a specific arrival time, it will be considered as achieved
If the trajectory has only waypoints with unspecified time, the last one is followed using maximum speed including braking - in this case accuracy of arrival is checked
If it is an intermediate waypoint with an unspecified time, the accuracy of the arrival is irrelevant
Do not change orientation if there is no designed_velocity vector
if there is a designed_velocity vector, set the orientation in the direction of it
If it is the transition between lanelets: overwrite position to improve precision
Handle lanelet transition