15 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__TIME_TO_COLLISION_CONDITION_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__TIME_TO_COLLISION_CONDITION_HPP_
29 inline namespace syntax
145 auto directional_dimension = [&]() {
153 return std::optional<DirectionalDimension>(std::nullopt);
159 directional_dimension());
166 return distance() / std::max(speed(), 0.0);
174 evaluations.push_back(triggering_entity.apply([this](const auto & triggering_entity) {
176 global().entities, triggering_entity, time_to_collision_condition_target,
177 coordinate_system, relative_distance_type, routing_algorithm, freespace);
auto as() const -> U &
Definition: pointer.hpp:109
auto is() const -> bool
Definition: pointer.hpp:97
Definition: scope.hpp:154
Definition: simulator_core.hpp:529
auto size(const T &range)
Definition: size.hpp:25
auto readAttribute(const std::string &name, const Node &node, const Scope &scope) -> T
Definition: attribute.hpp:104
auto readElement(const std::string &name, const pugi::xml_node &parent, Scope &scope)
Definition: element.hpp:75
auto asBoolean(bool) -> const Object &
Definition: boolean.cpp:62
auto print_to(std::ostream &os, const T &value) -> std::enable_if_t< concepts::HasStreamOutputOperator< T >::value, std::ostream & >
Definition: print.hpp:29
auto distance(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
Definition: detection_sensor.cpp:36
Definition: boolean.hpp:26
Definition: coordinate_system.hpp:50
@ longitudinal
Definition: directional_dimension.hpp:48
@ lateral
Definition: directional_dimension.hpp:53
auto evaluate() -> Object
Definition: distance_condition.cpp:612
Definition: double.hpp:25
static auto nan() noexcept -> Double
Definition: double.cpp:44
Definition: entities.hpp:41
Definition: entity.hpp:46
Definition: position.hpp:48
auto evaluate() -> Object
Definition: relative_distance_condition.cpp:332
Definition: relative_distance_type.hpp:55
@ longitudinal
Definition: relative_distance_type.hpp:59
@ euclidianDistance
Definition: relative_distance_type.hpp:61
@ lateral
Definition: relative_distance_type.hpp:60
auto evaluate() -> Object
Definition: relative_speed_condition.cpp:98
Definition: routing_algorithm.hpp:48
auto evaluate() -> Object
Definition: speed_condition.cpp:85
Definition: time_to_collision_condition_target.hpp:39
Definition: time_to_collision_condition.hpp:67
const RelativeDistanceType relative_distance_type
Definition: time_to_collision_condition.hpp:76
const Rule rule
Definition: time_to_collision_condition.hpp:72
const RoutingAlgorithm routing_algorithm
Definition: time_to_collision_condition.hpp:80
const Boolean freespace
Definition: time_to_collision_condition.hpp:70
const CoordinateSystem coordinate_system
Definition: time_to_collision_condition.hpp:78
auto evaluate()
Definition: time_to_collision_condition.hpp:169
const Double value
Definition: time_to_collision_condition.hpp:74
const TimeToCollisionConditionTarget time_to_collision_condition_target
Definition: time_to_collision_condition.hpp:68
auto description() const
Definition: time_to_collision_condition.hpp:105
std::vector< std::valarray< double > > evaluations
Definition: time_to_collision_condition.hpp:84
static auto evaluate(const Entities *entities, const Entity &triggering_entity, const TimeToCollisionConditionTarget &time_to_collision_condition_target, CoordinateSystem coordinate_system, RelativeDistanceType relative_distance_type, RoutingAlgorithm routing_algorithm, Boolean freespace)
Definition: time_to_collision_condition.hpp:126
TimeToCollisionCondition(const pugi::xml_node &node, Scope &scope, const TriggeringEntities &triggering_entities)
Definition: time_to_collision_condition.hpp:86
const TriggeringEntities triggering_entities
Definition: time_to_collision_condition.hpp:82
Definition: triggering_entities.hpp:40
auto apply(Predicate &&predicate) const -> decltype(auto)
Definition: triggering_entities.hpp:48
auto description() const -> String
Definition: triggering_entities.cpp:31