scenario_simulator_v2 C++ API
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
entity_behavior::ActionNode Class Reference

#include <action_node.hpp>

Inheritance diagram for entity_behavior::ActionNode:
Inheritance graph
[legend]
Collaboration diagram for entity_behavior::ActionNode:
Collaboration graph
[legend]

Public Member Functions

 ActionNode (const std::string &name, const BT::NodeConfiguration &config)
 
 ~ActionNode () override=default
 
auto foundConflictingEntity (const lanelet::Ids &following_lanelets) const -> bool
 
auto getDistanceToConflictingEntity (const lanelet::Ids &route_lanelets, const math::geometry::CatmullRomSplineInterface &spline) const -> std::optional< double >
 
auto getFrontEntityName (const math::geometry::CatmullRomSplineInterface &spline) const -> std::optional< std::string >
 
auto calculateStopDistance (const traffic_simulator_msgs::msg::DynamicConstraints &) const -> double
 
auto getDistanceToFrontEntity (const math::geometry::CatmullRomSplineInterface &spline) const -> std::optional< double >
 
auto getDistanceToStopLine (const lanelet::Ids &route_lanelets, const std::vector< geometry_msgs::msg::Point > &waypoints) const -> std::optional< double >
 
auto getDistanceToTrafficLightStopLine (const lanelet::Ids &route_lanelets, const math::geometry::CatmullRomSplineInterface &spline) const -> std::optional< double >
 
auto getRightOfWayEntities () const -> std::vector< traffic_simulator::CanonicalizedEntityStatus >
 
auto getRightOfWayEntities (const lanelet::Ids &following_lanelets) const -> std::vector< traffic_simulator::CanonicalizedEntityStatus >
 
auto getYieldStopDistance (const lanelet::Ids &following_lanelets) const -> std::optional< double >
 
auto getOtherEntityStatus (lanelet::Id lanelet_id) const -> std::vector< traffic_simulator::CanonicalizedEntityStatus >
 
auto stopEntity () const -> void
 
auto getHorizon () const -> double
 
auto executeTick () -> BT::NodeStatus override
 throws if the derived class return RUNNING. More...
 
void halt () override final
 
virtual auto getBlackBoardValues () -> void
 
auto getEntityStatus (const std::string &target_name) const -> const traffic_simulator::CanonicalizedEntityStatus &
 
auto getDistanceToTargetEntityPolygon (const math::geometry::CatmullRomSplineInterface &spline, const std::string target_name, double width_extension_right=0.0, double width_extension_left=0.0, double length_extension_front=0.0, double length_extension_rear=0.0) const -> std::optional< double >
 
auto setCanonicalizedEntityStatus (const traffic_simulator::EntityStatus &entity_status) -> void
 
auto calculateUpdatedEntityStatus (double target_speed, const traffic_simulator_msgs::msg::DynamicConstraints &) const -> traffic_simulator::EntityStatus
 
auto calculateUpdatedEntityStatusInWorldFrame (double target_speed, const traffic_simulator_msgs::msg::DynamicConstraints &) const -> traffic_simulator::EntityStatus
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 

Protected Attributes

traffic_simulator::behavior::Request request
 
std::shared_ptr< hdmap_utils::HdMapUtilshdmap_utils
 
std::shared_ptr< traffic_simulator::TrafficLightsBasetraffic_lights
 
std::shared_ptr< traffic_simulator::CanonicalizedEntityStatuscanonicalized_entity_status
 
double current_time
 
double step_time
 
double default_matching_distance_for_lanelet_pose_calculation
 
std::optional< double > target_speed
 
EntityStatusDict other_entity_status
 
lanelet::Ids route_lanelets
 

Constructor & Destructor Documentation

◆ ActionNode()

entity_behavior::ActionNode::ActionNode ( const std::string &  name,
const BT::NodeConfiguration &  config 
)

◆ ~ActionNode()

entity_behavior::ActionNode::~ActionNode ( )
overridedefault

Member Function Documentation

◆ calculateStopDistance()

auto entity_behavior::ActionNode::calculateStopDistance ( const traffic_simulator_msgs::msg::DynamicConstraints &  constraints) const -> double

◆ calculateUpdatedEntityStatus()

auto entity_behavior::ActionNode::calculateUpdatedEntityStatus ( double  target_speed,
const traffic_simulator_msgs::msg::DynamicConstraints &  constraints 
) const -> traffic_simulator::EntityStatus

◆ calculateUpdatedEntityStatusInWorldFrame()

auto entity_behavior::ActionNode::calculateUpdatedEntityStatusInWorldFrame ( double  target_speed,
const traffic_simulator_msgs::msg::DynamicConstraints &  constraints 
) const -> traffic_simulator::EntityStatus

◆ executeTick()

auto entity_behavior::ActionNode::executeTick ( ) -> BT::NodeStatus
override

throws if the derived class return RUNNING.

◆ foundConflictingEntity()

auto entity_behavior::ActionNode::foundConflictingEntity ( const lanelet::Ids &  following_lanelets) const -> bool

◆ getBlackBoardValues()

auto entity_behavior::ActionNode::getBlackBoardValues ( ) -> void
virtual

◆ getDistanceToConflictingEntity()

auto entity_behavior::ActionNode::getDistanceToConflictingEntity ( const lanelet::Ids &  route_lanelets,
const math::geometry::CatmullRomSplineInterface spline 
) const -> std::optional<double>

◆ getDistanceToFrontEntity()

auto entity_behavior::ActionNode::getDistanceToFrontEntity ( const math::geometry::CatmullRomSplineInterface spline) const -> std::optional<double>

◆ getDistanceToStopLine()

auto entity_behavior::ActionNode::getDistanceToStopLine ( const lanelet::Ids &  route_lanelets,
const std::vector< geometry_msgs::msg::Point > &  waypoints 
) const -> std::optional<double>

◆ getDistanceToTargetEntityPolygon()

auto entity_behavior::ActionNode::getDistanceToTargetEntityPolygon ( const math::geometry::CatmullRomSplineInterface spline,
const std::string  target_name,
double  width_extension_right = 0.0,
double  width_extension_left = 0.0,
double  length_extension_front = 0.0,
double  length_extension_rear = 0.0 
) const -> std::optional<double>

◆ getDistanceToTrafficLightStopLine()

auto entity_behavior::ActionNode::getDistanceToTrafficLightStopLine ( const lanelet::Ids &  route_lanelets,
const math::geometry::CatmullRomSplineInterface spline 
) const -> std::optional<double>

◆ getEntityStatus()

auto entity_behavior::ActionNode::getEntityStatus ( const std::string &  target_name) const -> const traffic_simulator::CanonicalizedEntityStatus &

◆ getFrontEntityName()

auto entity_behavior::ActionNode::getFrontEntityName ( const math::geometry::CatmullRomSplineInterface spline) const -> std::optional<std::string>
Note
hard-coded parameter, if the Yaw value of RPY is in ~1.5708 -> 1.5708, entity is a candidate of front entity.

◆ getHorizon()

auto entity_behavior::ActionNode::getHorizon ( ) const -> double

◆ getOtherEntityStatus()

auto entity_behavior::ActionNode::getOtherEntityStatus ( lanelet::Id  lanelet_id) const -> std::vector<traffic_simulator::CanonicalizedEntityStatus>

◆ getRightOfWayEntities() [1/2]

auto entity_behavior::ActionNode::getRightOfWayEntities ( ) const -> std::vector<traffic_simulator::CanonicalizedEntityStatus>

◆ getRightOfWayEntities() [2/2]

auto entity_behavior::ActionNode::getRightOfWayEntities ( const lanelet::Ids &  following_lanelets) const -> std::vector<traffic_simulator::CanonicalizedEntityStatus>

◆ getYieldStopDistance()

auto entity_behavior::ActionNode::getYieldStopDistance ( const lanelet::Ids &  following_lanelets) const -> std::optional<double>

◆ halt()

void entity_behavior::ActionNode::halt ( )
inlinefinaloverride

◆ providedPorts()

static BT::PortsList entity_behavior::ActionNode::providedPorts ( )
inlinestatic

◆ setCanonicalizedEntityStatus()

auto entity_behavior::ActionNode::setCanonicalizedEntityStatus ( const traffic_simulator::EntityStatus entity_status) -> void

◆ stopEntity()

auto entity_behavior::ActionNode::stopEntity ( ) const -> void

Member Data Documentation

◆ canonicalized_entity_status

std::shared_ptr<traffic_simulator::CanonicalizedEntityStatus> entity_behavior::ActionNode::canonicalized_entity_status
protected

◆ current_time

double entity_behavior::ActionNode::current_time
protected

◆ default_matching_distance_for_lanelet_pose_calculation

double entity_behavior::ActionNode::default_matching_distance_for_lanelet_pose_calculation
protected

◆ hdmap_utils

std::shared_ptr<hdmap_utils::HdMapUtils> entity_behavior::ActionNode::hdmap_utils
protected

◆ other_entity_status

EntityStatusDict entity_behavior::ActionNode::other_entity_status
protected

◆ request

traffic_simulator::behavior::Request entity_behavior::ActionNode::request
protected

◆ route_lanelets

lanelet::Ids entity_behavior::ActionNode::route_lanelets
protected

◆ step_time

double entity_behavior::ActionNode::step_time
protected

◆ target_speed

std::optional<double> entity_behavior::ActionNode::target_speed
protected

◆ traffic_lights

std::shared_ptr<traffic_simulator::TrafficLightsBase> entity_behavior::ActionNode::traffic_lights
protected

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