#include <action_node.hpp>
◆ ActionNode()
entity_behavior::ActionNode::ActionNode |
( |
const std::string & |
name, |
|
|
const BT::NodeConfiguration & |
config |
|
) |
| |
◆ ~ActionNode()
entity_behavior::ActionNode::~ActionNode |
( |
| ) |
|
|
overridedefault |
◆ calculateStopDistance()
auto entity_behavior::ActionNode::calculateStopDistance |
( |
const traffic_simulator_msgs::msg::DynamicConstraints & |
constraints | ) |
const -> double |
◆ calculateUpdatedEntityStatus()
auto entity_behavior::ActionNode::calculateUpdatedEntityStatus |
( |
const double |
local_target_speed, |
|
|
const traffic_simulator_msgs::msg::DynamicConstraints & |
constraints |
|
) |
| const -> traffic_simulator::EntityStatus |
- Todo:
- it will be moved to route::moveAlongLaneletPose(...)
◆ calculateUpdatedEntityStatusInWorldFrame()
auto entity_behavior::ActionNode::calculateUpdatedEntityStatusInWorldFrame |
( |
const double |
local_target_speed, |
|
|
const traffic_simulator_msgs::msg::DynamicConstraints & |
constraints |
|
) |
| const -> traffic_simulator::EntityStatus |
- Note
- Apply yaw change (delta rotation) in radians: yaw_angular_speed (rad/s) * time_step (s)
-
Apply position change
- Todo:
- first determine global desired_velocity, calculate position change using it then pass the same global desired_velocity to updatePositionForLaneletTransition()
- Note
- If it is the transition between lanelets: overwrite position to improve precision
-
Handle lanelet transition
◆ 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()
◆ getDistanceToFrontEntity()
◆ getDistanceToTargetEntity()
- Note
- getDistanceToTargetEntity working schematics
- Check if route to target entity from reference entity exists, if not try to transform pose to other routable lanelet, within matching distance (findRoutableAlternativeLaneletPoseFrom).
- Calculate longitudinal distance between entities bounding boxes -> bounding_box_distance.
- Calculate longitudinal distance between entities poses -> longitudinal_distance.
- Calculate target entity bounding box distance to reference entity spline (minimal distance from all corners) -> target_to_spline_distance.
- If target_to_spline_distance is less than half width of reference entity target entity is conflicting.
- Check corner case where target entity width is bigger than width of entity and target entity is exactly on the spline -> spline.getCollisionPointIn2D
- If target entity is conflicting return bounding_box_distance enlarged by half of the entity length.
boundingBoxLaneLongitudinalDistance requires routing_configuration, 'allow_lane_change = true' is needed to check distances to entities on neighbour lanelets
- Todo:
- rotation of NPC is not taken into account, same as in boundingBoxLaneLongitudinalDistance this should be considered to be changed in separate task in the future
- Note
- if the distance of the target entity to the spline is smaller than the width of the reference entity
-
if the distance of the target entity to the spline cannot be calculated because a collision occurs
◆ getDistanceToTrafficLightStopLine()
◆ getEntityStatus()
◆ getFrontEntityName()
- Note
- Euclidean distance is here used as a "rough" distance to filter only NPCs which possibly are in range of current horizon. Because euclidean distance is the shortest possible distance comparing it with horizon will never omit NPCs for which actual lane distance is in range of horizon.
-
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()
◆ getRightOfWayEntities() [1/2]
◆ getRightOfWayEntities() [2/2]
◆ 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()
◆ stopEntity()
auto entity_behavior::ActionNode::stopEntity |
( |
| ) |
const -> void |
◆ behavior_parameter
traffic_simulator_msgs::msg::BehaviorParameter entity_behavior::ActionNode::behavior_parameter |
|
protected |
◆ canonicalized_entity_status
◆ 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 |
◆ euclidean_distances_map
◆ hdmap_utils
◆ other_entity_status
◆ request
◆ 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
The documentation for this class was generated from the following files: