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 &, 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,
double  step_time,
double  matching_distance,
std::optional< double >  target_speed = std::nullopt 
) -> std::optional<EntityStatus>

DIRTY HACK! Negative longitudinal distance (calculated along lanelet in opposite direction) causes some scenarios to fail because of an unrelated issue with lanelet matching. The issue is caused by wrongly matched lanelet poses and thus wrong distances. When lanelet matching errors are fixed, this dirty hack can be removed.

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

DIRTY HACK! Negative longitudinal distance (calculated along lanelet in opposite direction) causes some scenarios to fail because of an unrelated issue with lanelet matching. The issue is caused by wrongly matched lanelet poses and thus wrong distances. When lanelet matching errors are fixed, this dirty hack can be removed.

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