scenario_simulator_v2 C++ API
Public Member Functions | Static Public Member Functions | List of all members
entity_behavior::vehicle::LaneChangeAction Class Reference

#include <lane_change_action.hpp>

Inheritance diagram for entity_behavior::vehicle::LaneChangeAction:
Inheritance graph
[legend]
Collaboration diagram for entity_behavior::vehicle::LaneChangeAction:
Collaboration graph
[legend]

Public Member Functions

 LaneChangeAction (const std::string &name, const BT::NodeConfiguration &config)
 
BT::NodeStatus tick () override
 
const traffic_simulator_msgs::msg::WaypointsArray calculateWaypoints () override
 
const std::optional< traffic_simulator_msgs::msg::Obstacle > calculateObstacle (const traffic_simulator_msgs::msg::WaypointsArray &waypoints) override
 
void getBlackBoardValues () override
 
- Public Member Functions inherited from entity_behavior::VehicleActionNode
 VehicleActionNode (const std::string &name, const BT::NodeConfiguration &config)
 
 ~VehicleActionNode () override=default
 
void getBlackBoardValues () override
 
auto calculateUpdatedEntityStatus (double target_speed) const -> traffic_simulator::EntityStatus
 
auto calculateUpdatedEntityStatusInWorldFrame (double target_speed) const -> traffic_simulator::EntityStatus
 
- Public Member Functions inherited from entity_behavior::ActionNode
 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
 
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 ()
 
- Static Public Member Functions inherited from entity_behavior::VehicleActionNode
static BT::PortsList providedPorts ()
 
- Static Public Member Functions inherited from entity_behavior::ActionNode
static BT::PortsList providedPorts ()
 

Additional Inherited Members

- Protected Attributes inherited from entity_behavior::VehicleActionNode
traffic_simulator_msgs::msg::BehaviorParameter behavior_parameter
 
traffic_simulator_msgs::msg::VehicleParameters vehicle_parameters
 
std::shared_ptr< math::geometry::CatmullRomSplinereference_trajectory
 
std::unique_ptr< math::geometry::CatmullRomSubsplinetrajectory
 
- Protected Attributes inherited from entity_behavior::ActionNode
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

◆ LaneChangeAction()

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

Member Function Documentation

◆ calculateObstacle()

const std::optional< traffic_simulator_msgs::msg::Obstacle > entity_behavior::vehicle::LaneChangeAction::calculateObstacle ( const traffic_simulator_msgs::msg::WaypointsArray &  waypoints)
overridevirtual

◆ calculateWaypoints()

const traffic_simulator_msgs::msg::WaypointsArray entity_behavior::vehicle::LaneChangeAction::calculateWaypoints ( )
overridevirtual

◆ getBlackBoardValues()

void entity_behavior::vehicle::LaneChangeAction::getBlackBoardValues ( )
overridevirtual

Reimplemented from entity_behavior::ActionNode.

◆ providedPorts()

static BT::PortsList entity_behavior::vehicle::LaneChangeAction::providedPorts ( )
inlinestatic

◆ tick()

BT::NodeStatus entity_behavior::vehicle::LaneChangeAction::tick ( )
override
Note
Hard coded parameter, 10.0 is a maximum_curvature_threshold (If the curvature of the trajectory is over 10.0, the trajectory was not selected.) 20.0 is a target_trajectory_length (The one with the closest length to 20 m is selected from the candidate trajectories.) 1.0 is a forward_distance_threshold (If the goal x position in the cartesian coordinate was under 1.0, the goal was rejected.)

Force changing speed in order to fulfill constraint.

Changing linear speed and try to fulfill constraint.

Note
Hard coded parameter, -10.0 is a minimum linear velocity of the entity.

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