Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
Class containing the logic for Strategic IHP Plugin. This class is responsible for all the negotiations as well as generating a maneuver msg. More...
#include <platoon_strategic_ihp.h>
Public Member Functions | |
PlatoonStrategicIHPPlugin (carma_wm::WorldModelConstPtr wm, PlatoonPluginConfig config, MobilityResponseCB mobility_response_publisher, MobilityRequestCB mobility_request_publisher, MobilityOperationCB mobility_operation_publisher, PlatooningInfoCB platooning_info_publisher, std::shared_ptr< carma_ros2_utils::timers::TimerFactory > timer_factory) | |
Constructor. More... | |
void | mob_op_cb (const carma_v2x_msgs::msg::MobilityOperation::UniquePtr msg) |
Callback function for Mobility Operation Message. More... | |
void | mob_req_cb (const carma_v2x_msgs::msg::MobilityRequest::UniquePtr msg) |
Callback function for Mobility Request Message. More... | |
void | mob_resp_cb (const carma_v2x_msgs::msg::MobilityResponse::UniquePtr msg) |
Callback function for Mobility Response Message. More... | |
MobilityRequestResponse | handle_mob_req (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to the process and respond to the mobility request. More... | |
bool | plan_maneuver_cb (carma_planning_msgs::srv::PlanManeuvers::Request &req, carma_planning_msgs::srv::PlanManeuvers::Response &resp) |
Callback function to the maneuver request. More... | |
int | findLaneletIndexFromPath (int target_id, lanelet::routing::LaneletPath &path) |
Find lanelet index from path. More... | |
double | findLaneWidth () |
Find lanelet width from local position. More... | |
carma_planning_msgs::msg::Maneuver | composeManeuverMessage (double current_dist, double end_dist, double current_speed, double target_speed, int lane_id, rclcpp::Time ¤t_time) |
Find lanelet index from path. More... | |
carma_planning_msgs::msg::Maneuver | composeLaneChangeManeuverMessage (double current_dist, double end_dist, double current_speed, double target_speed, int starting_lane_id, int ending_lane_id, rclcpp::Time ¤t_time) |
Find start(current) and target(end) lanelet index from path to generate lane change maneuver message. More... | |
void | updateCurrentStatus (carma_planning_msgs::msg::Maneuver maneuver, double &speed, double ¤t_progress, int &lane_id) |
Update maneuver status based on prior plan. More... | |
void | pose_cb (const geometry_msgs::msg::PoseStamped::UniquePtr msg) |
Callback function for current pose. More... | |
carma_planning_msgs::msg::PlatooningInfo | composePlatoonInfoMsg () |
Compose Platoon information message. More... | |
void | twist_cb (const geometry_msgs::msg::TwistStamped::UniquePtr msg) |
Callback for the twist subscriber, which will store latest twist locally. More... | |
void | cmd_cb (const geometry_msgs::msg::TwistStamped::UniquePtr msg) |
Callback for the control command. More... | |
void | georeference_cb (const std_msgs::msg::String::UniquePtr msg) |
Callback for the georeference. More... | |
bool | onSpin () |
Spin callback function. More... | |
void | run_leader () |
Run Leader State. More... | |
void | run_leader_waiting () |
Run Leader Waiting State. More... | |
void | run_candidate_follower () |
Run Candidate Follower State. More... | |
void | run_follower () |
Run Follower State. More... | |
void | run_leader_aborting () |
Run Leader Aborting State. More... | |
void | run_candidate_leader () |
Run Candidate Leader State. More... | |
void | run_lead_with_operation () |
UCLA Run lead with operation State. More... | |
void | run_prepare_to_join () |
UCLA Run prepare to join State. More... | |
void | setHostECEF (carma_v2x_msgs::msg::LocationECEF pose_ecef_point) |
UCLA Update the private variable pose_ecef_point_. More... | |
PlatoonManager | getHostPM () |
UCLA Getter: for PlatoonManager class. More... | |
void | setPMState (PlatoonState desiredState) |
UCLA Setter: function to set pm_.platoon_state. More... | |
void | updatePlatoonList (std::vector< PlatoonMember > platoon_list) |
UCLA Setter: Update platoon list (Unit Test). More... | |
void | setConfig (const PlatoonPluginConfig &config) |
Set the current config. More... | |
Public Attributes | |
carma_v2x_msgs::msg::LocationECEF | pose_ecef_point_ |
Private Member Functions | |
bool | isVehicleRightInFront (double downtrack, double crosstrack) |
Function to determine if a target vehicle is in the front of host vehicle note: This is only applicable for same lane application, so it will check cross track distance. More... | |
double | findSpeedLimit (const lanelet::ConstLanelet &llt) |
Function to find speed limit of a lanelet. More... | |
MobilityRequestResponse | mob_req_cb_leader (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in leader state. More... | |
MobilityRequestResponse | mob_req_cb_leaderwaiting (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in leader waiting state. More... | |
MobilityRequestResponse | mob_req_cb_follower (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in follower state. More... | |
MobilityRequestResponse | mob_req_cb_candidatefollower (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in candidate follower state. More... | |
MobilityRequestResponse | mob_req_cb_standby (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in standby state. More... | |
void | mob_resp_cb_leader (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in leader state. More... | |
void | mob_resp_cb_leaderwaiting (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in leader waiting state. More... | |
void | mob_resp_cb_follower (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in follower state. More... | |
void | mob_resp_cb_candidatefollower (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in candidate follower state. More... | |
void | mob_resp_cb_standby (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in standby state. More... | |
void | mob_op_cb_leader (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in leader state. More... | |
void | mob_op_cb_leaderwaiting (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in leader waiting state. More... | |
void | mob_op_cb_follower (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in follower state. More... | |
void | mob_op_cb_candidatefollower (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in candidate follower state. More... | |
void | mob_op_cb_standby (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in standby state. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationLeader (const std::string &type) |
Function to compose mobility operation in leader state. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationFollower () |
Function to compose mobility operation in follower state. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationLeaderWaiting () |
Function to compose mobility operation in leader waiting state. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationCandidateFollower () |
Function to compose mobility operation in candidate follower state. More... | |
carma_v2x_msgs::msg::LocationECEF | pose_to_ecef (geometry_msgs::msg::PoseStamped pose_msg) |
Function to convert pose from map frame to ecef location. More... | |
lanelet::BasicPoint2d | ecef_to_map_point (carma_v2x_msgs::msg::LocationECEF ecef_point) |
Function to convert ecef location to a 2d point in map frame. More... | |
bool | isVehicleRightBehind (double downtrack, double crosstrack) |
Function to determine if the given downtrack distance (m) is behind the host vehicle. More... | |
bool | isJoiningVehicleNearPlatoon (double joining_downtrack, double joining_crosstrack) |
The method for platoon leader to determine if the joining vehicle is closeby. (Note: Used when host vehicle is the platoon leader) More... | |
bool | isVehicleNearTargetPlatoon (double rearVehicleDtd, double frontVehicleDtd, double frontVehicleCtd) |
Function to determine if the host vehicle is close to the target platoon (used for cut-in join scenarios). More... | |
int | find_target_lanelet_id (double start_downtrack, double end_downtrack) |
Function to find the starting and ending lanelet ID for lane change in a two-lane scenario (used for cut-in join scenarios). More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationSTATUS () |
Function to compose mobility operation message with STATUS params. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationINFO () |
Function to compose mobility operation message with INFO params. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationLeaderAborting () |
Function to compose mobility operation in LeaderAborting state. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationCandidateLeader () |
Function to compose mobility operation in CandidateLeader. More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationLeadWithOperation (const std::string &type) |
Function to compose mobility operation in LeadWithOperation (cut-in join) More... | |
carma_v2x_msgs::msg::MobilityOperation | composeMobilityOperationPrepareToJoin () |
Function to compose mobility operation in PrepareToJoin (cut-in join) More... | |
void | mob_op_cb_STATUS (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation message with STATUS params, read ecef location and update platoon member info. More... | |
double | mob_op_find_platoon_length_from_INFO_params (std::string strategyParams) |
Function to process mobility operation INFO params to find platoon length in m. More... | |
carma_v2x_msgs::msg::LocationECEF | mob_op_find_ecef_from_INFO_params (std::string strategyParams) |
Function to process mobility operation INFO params to find platoon leader's ecef location. More... | |
carma_v2x_msgs::msg::LocationECEF | mob_op_find_ecef_from_STATUS_params (std::string strategyParams) |
Function to process mobility operation for STATUS params. More... | |
void | mob_op_cb_leaderaborting (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in leaderaborting state. More... | |
void | mob_op_cb_candidateleader (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in candidateleader state. More... | |
void | mob_op_cb_leadwithoperation (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in LeadWithOperation state (cut-in join) More... | |
void | mob_op_cb_preparetojoin (const carma_v2x_msgs::msg::MobilityOperation &msg) |
Function to process mobility operation in PrepareToJoin state (cut-in join) More... | |
MobilityRequestResponse | mob_req_cb_leaderaborting (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in leaderaborting state. More... | |
MobilityRequestResponse | mob_req_cb_candidateleader (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in candidateleader state. More... | |
MobilityRequestResponse | mob_req_cb_leadwithoperation (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in leadwithoperation state (cut-in join) More... | |
MobilityRequestResponse | mob_req_cb_preparetojoin (const carma_v2x_msgs::msg::MobilityRequest &msg) |
Function to process mobility request in preparetojoin state (cut-in join) More... | |
void | mob_resp_cb_leaderaborting (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in leaderaborting state. More... | |
void | mob_resp_cb_candidateleader (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in candidateleader state. More... | |
void | mob_resp_cb_leadwithoperation (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in leadwithoperation state (cut-in join) More... | |
void | mob_resp_cb_preparetojoin (const carma_v2x_msgs::msg::MobilityResponse &msg) |
Function to process mobility response in preparetojoin state. More... | |
bool | is_lanechange_possible (lanelet::Id start_lanelet_id, lanelet::Id target_lanelet_id) |
Function to check if lanechange is possible. More... | |
FRIEND_TEST (PlatoonStrategicIHPPlugin, platoon_info_pub_front) | |
FRIEND_TEST (PlatoonStrategicIHPPlugin, is_lanechange_possible) | |
Private Attributes | |
MobilityRequestCB | mobility_request_publisher_ |
MobilityResponseCB | mobility_response_publisher_ |
MobilityOperationCB | mobility_operation_publisher_ |
PlatooningInfoCB | platooning_info_publisher_ |
carma_wm::WorldModelConstPtr | wm_ |
PlatoonPluginConfig | config_ |
geometry_msgs::msg::PoseStamped | pose_msg_ |
double | cmd_speed_ = 0 |
double | current_speed_ = 0 |
double | current_downtrack_ = 0 |
double | current_crosstrack_ = 0 |
long | waitingStartTime = 0 |
long | candidatestateStartTime = 0 |
std::string | HostMobilityId = "hostid" |
std::string | georeference_ {""} |
std::shared_ptr< lanelet::projection::LocalFrameProjector > | map_projector_ |
bool | map_loaded_ = false |
carma_planning_msgs::msg::Plugin | plugin_discovery_msg_ |
int | numLeaderAbortingCalls_ = 0 |
int | candidate_follower_delay_count_ = 0 |
double | maxAllowedJoinTimeGap_ = 15.0 |
double | maxAllowedJoinGap_ = 90 |
int | maxPlatoonSize_ = 10 |
double | vehicleLength_ = 5.0 |
unsigned long | infoMessageInterval_ = 200 |
unsigned long | prevHeartBeatTime_ = 0.0 |
int | statusMessageInterval_ = 100 |
unsigned long | NEGOTIATION_TIMEOUT = 15000 |
unsigned long | LANE_CHANGE_TIMEOUT = 300000 |
int | noLeaderUpdatesCounter = 0 |
int | LEADER_TIMEOUT_COUNTER_LIMIT = 5 |
double | waitingStateTimeout = 25.0 |
double | desiredJoinGap = 30.0 |
double | desiredJoinTimeGap = 4.0 |
lanelet::BasicPoint2d | target_cutin_pose_ |
const double | STOPPED_SPEED = 0.5 |
int | target_join_index_ = -2 |
bool | safeToLaneChange_ = false |
std::shared_ptr< carma_ros2_utils::timers::TimerFactory > | timer_factory_ |
PlatoonManager | pm_ |
const std::string | PLATOONING_STRATEGY = "Carma/Platooning" |
const std::string | OPERATION_INFO_TYPE = "INFO" |
const std::string | OPERATION_STATUS_TYPE = "STATUS" |
const std::string | OPERATION_INFO_PARAMS = "INFO|LENGTH:%.2f,SPEED:%.2f,SIZE:%d,ECEFX:%.2f,ECEFY:%.2f,ECEFZ:%.2f" |
const std::string | OPERATION_STATUS_PARAMS = "STATUS|CMDSPEED:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%" |
const std::string | JOIN_PARAMS = "SIZE:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%,JOINIDX:%6%" |
Class containing the logic for Strategic IHP Plugin. This class is responsible for all the negotiations as well as generating a maneuver msg.
Definition at line 69 of file platoon_strategic_ihp.h.
platoon_strategic_ihp::PlatoonStrategicIHPPlugin::PlatoonStrategicIHPPlugin | ( | carma_wm::WorldModelConstPtr | wm, |
PlatoonPluginConfig | config, | ||
MobilityResponseCB | mobility_response_publisher, | ||
MobilityRequestCB | mobility_request_publisher, | ||
MobilityOperationCB | mobility_operation_publisher, | ||
PlatooningInfoCB | platooning_info_publisher, | ||
std::shared_ptr< carma_ros2_utils::timers::TimerFactory > | timer_factory | ||
) |
Constructor.
wm | Pointer to initalized instance of the carma world model for accessing semantic map data |
config | The configuration to be used for this object |
Definition at line 36 of file platoon_strategic_ihp.cpp.
References config_, platoon_strategic_ihp::PlatoonManager::host_platoon_, platoon_strategic_ihp::PlatoonManager::HostMobilityId, plugin_discovery_msg_, pm_, timer_factory_, and platoon_strategic_ihp::PlatoonPluginConfig::vehicleID.
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::cmd_cb | ( | const geometry_msgs::msg::TwistStamped::UniquePtr | msg | ) |
Callback for the control command.
msg | Latest twist cmd message |
Definition at line 137 of file platoon_strategic_ihp.cpp.
References cmd_speed_.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
carma_planning_msgs::msg::Maneuver platoon_strategic_ihp::PlatoonStrategicIHPPlugin::composeLaneChangeManeuverMessage | ( | double | current_dist, |
double | end_dist, | ||
double | current_speed, | ||
double | target_speed, | ||
int | starting_lane_id, | ||
int | ending_lane_id, | ||
rclcpp::Time & | current_time | ||
) |
Find start(current) and target(end) lanelet index from path to generate lane change maneuver message.
current_dist | current downtrack distance |
end_dist | ending downtrack distance |
current_speed | current speed |
target_speed | target speed |
starting_lane_id | current lanelet id which serves as the starting lanlet id |
ending_lane_id | target lanelet id which is also the ending lanelet id that is in another lane |
current_time | current time in seconds |
Definition at line 3165 of file platoon_strategic_ihp.cpp.
References config_, platoon_strategic_ihp::PlatoonPluginConfig::time_step, and carma_cooperative_perception::to_string().
Referenced by plan_maneuver_cb().
carma_planning_msgs::msg::Maneuver platoon_strategic_ihp::PlatoonStrategicIHPPlugin::composeManeuverMessage | ( | double | current_dist, |
double | end_dist, | ||
double | current_speed, | ||
double | target_speed, | ||
int | lane_id, | ||
rclcpp::Time & | current_time | ||
) |
Find lanelet index from path.
current_dist | current downtrack distance (m) |
end_dist | ending downtrack distance (m) |
current_speed | current speed (m/s) |
target_speed | target speed (m/s) |
lane_id | lanelet id |
current_time | current time (s) |
Definition at line 3125 of file platoon_strategic_ihp.cpp.
References config_, platoon_strategic_ihp::PlatoonPluginConfig::time_step, carma_cooperative_perception::to_string(), and wm_.
Referenced by plan_maneuver_cb().
|
private |
Function to compose mobility operation in candidate follower state.
Definition at line 604 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_candidate_follower().
|
private |
Function to compose mobility operation in CandidateLeader.
Definition at line 624 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_candidate_leader().
|
private |
Function to compose mobility operation in follower state.
Definition at line 586 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_follower().
|
private |
Function to compose mobility operation message with INFO params.
Note: INFO param format: "INFO| --> LENGTH:%.2f,SPEED:%.2f,SIZE:%d,ECEFX:%.2f,ECEFY:%.2f,ECEFZ:%.2f" |----—0--------—1------—2-----—3-------—4-------—5----—|
Definition at line 317 of file platoon_strategic_ihp.cpp.
References config_, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::getCurrentPlatoonLength(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), OPERATION_INFO_PARAMS, PLATOONING_STRATEGY, pm_, pose_ecef_point_, timer_factory_, and platoon_strategic_ihp::PlatoonPluginConfig::vehicleID.
Referenced by composeMobilityOperationLeader(), and composeMobilityOperationLeadWithOperation().
|
private |
Function to compose mobility operation in leader state.
type | type of mobility operation (info or status) |
Definition at line 561 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), OPERATION_INFO_TYPE, and OPERATION_STATUS_TYPE.
Referenced by run_leader().
|
private |
Function to compose mobility operation in LeaderAborting state.
Definition at line 612 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_leader_aborting().
|
private |
Function to compose mobility operation in leader waiting state.
Definition at line 594 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_leader_waiting().
|
private |
Function to compose mobility operation in LeadWithOperation (cut-in join)
type | type of mobility operation (info or status) |
Definition at line 649 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), OPERATION_INFO_TYPE, and OPERATION_STATUS_TYPE.
Referenced by run_lead_with_operation().
|
private |
Function to compose mobility operation in PrepareToJoin (cut-in join)
type | type of mobility operation (info or status) |
Definition at line 637 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationSTATUS().
Referenced by run_prepare_to_join().
|
private |
Function to compose mobility operation message with STATUS params.
Note: STATUS params format: STATUS | --> "CMDSPEED:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%" |-------—0-------—1------—2------—3------—4---—|
Definition at line 280 of file platoon_strategic_ihp.cpp.
References cmd_speed_, config_, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, OPERATION_STATUS_PARAMS, PLATOONING_STRATEGY, pm_, pose_ecef_point_, timer_factory_, and platoon_strategic_ihp::PlatoonPluginConfig::vehicleID.
Referenced by composeMobilityOperationCandidateFollower(), composeMobilityOperationCandidateLeader(), composeMobilityOperationFollower(), composeMobilityOperationLeader(), composeMobilityOperationLeaderAborting(), composeMobilityOperationLeaderWaiting(), composeMobilityOperationLeadWithOperation(), and composeMobilityOperationPrepareToJoin().
carma_planning_msgs::msg::PlatooningInfo platoon_strategic_ihp::PlatoonStrategicIHPPlugin::composePlatoonInfoMsg | ( | ) |
Compose Platoon information message.
Note: There is a difference between the "platoon info status" versus the the "platoon strategic plugin states".
[platooning info status] The "platooning info status" reflect the overall operating status. The status can include vehicles in different "platoon strategic plugin states" as long as the current state is relavent to the genral status. [platoon strategic plugin states] The "platoon strategic plugin states" manage the negotiation strategies and vehicle communication in a more refined manner that can achieve the "platooning info status'" objective. Hence, vehicles in different states will behave differently based on the corresponding roles and predefined rules. However, they can belong to the same "platooning info statu" for the same operation purpose. [Example] Multiple strategic states, such as "leader aborting" and "candidate follower", can both be mapped to "connecting to new leader" platooning info status, as both states are serving the same purpose of connecting to the leader.
Note: There is a difference between the "platoon info status" versus the the "platoon strategic plugin states". The "platooning info status" reflect the overall operating status. The "platoon strategic plugin states" manage the negotiation strategies and vehicle communication in a more refined manner. A more detailed note can be found in the corresponding function declaration in "platoon_strategic_ihp.h" file.
Definition at line 422 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, cmd_speed_, platoon_strategic_ihp::PlatoonMember::commandSpeed, config_, platoon_strategic_ihp::PlatoonPluginConfig::createGapAdjuster, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dynamic_leader_index_, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::PlatoonManager::getDynamicLeader(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::getNumberOfVehicleInFront(), platoon_strategic_ihp::PlatoonManager::getPredecessorPosition(), platoon_strategic_ihp::PlatoonManager::getPredecessorSpeed(), platoon_strategic_ihp::PlatoonManager::getPredecessorTimeHeadwaySum(), platoon_strategic_ihp::PlatoonManager::isCreateGap, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, platoon_strategic_ihp::PlatoonPluginConfig::maxPlatoonSize, pm_, pose_msg_, platoon_strategic_ihp::PREPARETOJOIN, platoon_strategic_ihp::STANDBY, platoon_strategic_ihp::PlatoonPluginConfig::standStillHeadway, platoon_strategic_ihp::PlatoonMember::staticId, platoon_strategic_ihp::PlatoonPluginConfig::timeHeadway, platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, platoon_strategic_ihp::PlatoonMember::vehiclePosition, and wm_.
Referenced by onSpin().
|
private |
Function to convert ecef location to a 2d point in map frame.
ecef_point | ecef location point |
Definition at line 252 of file platoon_strategic_ihp.cpp.
References map_projector_.
Referenced by mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_op_cb_STATUS(), mob_req_cb_candidateleader(), mob_req_cb_leader(), mob_req_cb_leaderwaiting(), and mob_req_cb_leadwithoperation().
|
private |
Function to find the starting and ending lanelet ID for lane change in a two-lane scenario (used for cut-in join scenarios).
Note: This is a temporary function for internal test only. The scenario is not generalized. Can only find adjacent lanletID based on predefined direction (left, right).
\TODO: This function should be replaced by the complete arbitrary lane change module.
start_downtrack | The downtrack distance (m) of the starting point. end_downtrack: The downtrack distance (m) of the target (end) point. |
int platoon_strategic_ihp::PlatoonStrategicIHPPlugin::findLaneletIndexFromPath | ( | int | target_id, |
lanelet::routing::LaneletPath & | path | ||
) |
Find lanelet index from path.
path | path |
target_id | target lanelet id |
Definition at line 153 of file platoon_strategic_ihp.cpp.
References process_bag::i.
double platoon_strategic_ihp::PlatoonStrategicIHPPlugin::findLaneWidth | ( | ) |
Find lanelet width from local position.
Definition at line 186 of file platoon_strategic_ihp.cpp.
References pose_msg_, wm_, process_traj_logs::x, and process_traj_logs::y.
Referenced by isJoiningVehicleNearPlatoon(), and isVehicleNearTargetPlatoon().
|
private |
Function to find speed limit of a lanelet.
llt | inout lanelet |
Definition at line 166 of file platoon_strategic_ihp.cpp.
References wm_.
Referenced by plan_maneuver_cb().
|
private |
|
private |
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::georeference_cb | ( | const std_msgs::msg::String::UniquePtr | msg | ) |
Callback for the georeference.
msg | Latest georeference |
Definition at line 266 of file platoon_strategic_ihp.cpp.
References georeference_, and map_projector_.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
PlatoonManager platoon_strategic_ihp::PlatoonStrategicIHPPlugin::getHostPM | ( | ) |
UCLA Getter: for PlatoonManager class.
Definition at line 97 of file platoon_strategic_ihp.cpp.
References pm_.
MobilityRequestResponse platoon_strategic_ihp::PlatoonStrategicIHPPlugin::handle_mob_req | ( | const carma_v2x_msgs::msg::MobilityRequest & | msg | ) |
Function to the process and respond to the mobility request.
msg | Mobility Request Message |
Definition at line 1357 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, mob_req_cb_candidatefollower(), mob_req_cb_candidateleader(), mob_req_cb_follower(), mob_req_cb_leader(), mob_req_cb_leaderaborting(), mob_req_cb_leaderwaiting(), mob_req_cb_leadwithoperation(), mob_req_cb_preparetojoin(), mob_req_cb_standby(), platoon_strategic_ihp::NO_RESPONSE, PLATOONING_STRATEGY, pm_, platoon_strategic_ihp::PREPARETOJOIN, and platoon_strategic_ihp::STANDBY.
Referenced by mob_req_cb().
|
private |
Function to check if lanechange is possible.
start_lanelet_id | start lanelet id |
target_lanelet_id | start lanelet id |
Definition at line 3475 of file platoon_strategic_ihp.cpp.
References carma_cooperative_perception::to_string(), and wm_.
Referenced by plan_maneuver_cb().
|
private |
The method for platoon leader to determine if the joining vehicle is closeby. (Note: Used when host vehicle is the platoon leader)
joining_downtrack | The downtrack distance of the joining vehicle. joining_crosstrack: The crosstrack distance of the joining vehicle. |
Definition at line 356 of file platoon_strategic_ihp.cpp.
References config_, current_crosstrack_, current_downtrack_, findLaneWidth(), platoon_strategic_ihp::PlatoonManager::host_platoon_, platoon_strategic_ihp::PlatoonPluginConfig::longitudinalCheckThresold, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, platoon_strategic_ihp::PlatoonPluginConfig::maxCutinGap, and pm_.
Referenced by mob_req_cb_leader().
|
private |
Function to determine if the host vehicle is close to the target platoon (used for cut-in join scenarios).
rearVehicleDtd | The downtrack of the neighbor platoon rear vehicle. |
frontVehicleDtd | The downtrack of the neighbor platoon leader. |
frontVehicleCtd | The crosstrack of the neighbor platoon leader. |
Definition at line 391 of file platoon_strategic_ihp.cpp.
References config_, current_crosstrack_, current_downtrack_, findLaneWidth(), platoon_strategic_ihp::PlatoonPluginConfig::longitudinalCheckThresold, and platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError.
Referenced by mob_op_cb_leader().
|
private |
Function to determine if the given downtrack distance (m) is behind the host vehicle.
note: This is only applicable for same lane application, so it will check cross track distance.
downtrack | The downtrack distance (m) of the target vehicle to compare with the host. crosstrack: The crosstrack distance (m) of the target vehicle to compart with the host. |
Definition at line 232 of file platoon_strategic_ihp.cpp.
References config_, current_crosstrack_, current_downtrack_, and platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError.
Referenced by mob_op_cb_leader().
|
private |
Function to determine if a target vehicle is in the front of host vehicle note: This is only applicable for same lane application, so it will check cross track distance.
downtrack | target vehicle downtrack distance relative to host's route (m) crosstrack: target vehicle crosstrack (m) |
Definition at line 211 of file platoon_strategic_ihp.cpp.
References config_, current_crosstrack_, current_downtrack_, and platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError.
Referenced by mob_op_cb_leader().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::mob_op_cb | ( | const carma_v2x_msgs::msg::MobilityOperation::UniquePtr | msg | ) |
Callback function for Mobility Operation Message.
msg | Mobility Operation Message |
Definition at line 812 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, mob_op_cb_candidatefollower(), mob_op_cb_candidateleader(), mob_op_cb_follower(), mob_op_cb_leader(), mob_op_cb_leaderaborting(), mob_op_cb_leaderwaiting(), mob_op_cb_leadwithoperation(), mob_op_cb_preparetojoin(), mob_op_cb_standby(), mob_op_cb_STATUS(), platoon_strategic_ihp::PlatoonManager::neighbor_platoon_info_size_, platoon_strategic_ihp::PlatoonManager::neighbor_platoon_leader_id_, platoon_strategic_ihp::PlatoonManager::neighborPlatoonID, OPERATION_INFO_TYPE, OPERATION_STATUS_TYPE, PLATOONING_STRATEGY, pm_, platoon_strategic_ihp::PREPARETOJOIN, platoon_strategic_ihp::PlatoonManager::resetNeighborPlatoon(), process_traj_logs::split, platoon_strategic_ihp::STANDBY, and STOPPED_SPEED.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
|
private |
Function to process mobility operation in candidate follower state.
msg | incoming mobility operation |
Definition at line 934 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in candidateleader state.
msg | incoming mobility operation message. |
Definition at line 1235 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in follower state.
msg | incoming mobility operation |
Definition at line 940 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in leader state.
msg | incoming mobility operation |
Note: This is the function to handle the mobility operation message. Vehicle in leader state is either a single ADS vehicle or a platoon leader.
Single ADS will send out INFO messages. Platoon leaders will send out both INFO and STATUS messages.
If the host is single vehicle, it should have "isPlatoonInfoMsg = true" and "isInNegotiation = false". In such condition, single leader will start joining and send request to the platoon leader. mob_op_cb_leader(
If the host vehicle is platoon leader, then it should have "isPlatoonInfoMsg = true" and "isInNegotiation = true". But existing platoon leader do not need to send out joining request.
Both the platoon leader and single vehicle need to subscribe to the STATUS message to populate the platoon manager with existing platoon members, so the PM can calculate dtd and ctd corresponds to host vehicle's origin position, hence to be used for later calculation.
note: [veh3*] -------— [veh2] --------------— [veh1] -------— [*veh0] |<---------------— front-rear DTD difference -----------------—>| |<--------------------------— platoon length -------------------------—>|
front-rear DTD difference = platoon_length + one_vehicle_length Vehicle length is already accounted for in the message's LENGTH value
Note: "isVehicleRightInFront" tests for same lane
Note: "isVehicleRightBehind" tests for same lane
JOIN_PARAMS format: JOIN_PARAMS| --> "SIZE:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%,JOINIDX:%6%" |----—0---— –1------—2------—3------—4-------—5----—|
UCLA Implementation note:
Definition at line 957 of file platoon_strategic_ihp.cpp.
References config_, platoon_strategic_ihp::PlatoonManager::current_plan, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), isVehicleNearTargetPlatoon(), isVehicleRightBehind(), isVehicleRightInFront(), JOIN_PARAMS, mob_op_find_ecef_from_INFO_params(), mob_op_find_platoon_length_from_INFO_params(), mobility_request_publisher_, platoon_strategic_ihp::PlatoonManager::neighbor_platoon_, OPERATION_INFO_TYPE, PLATOONING_STRATEGY, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), process_traj_logs::split, target_cutin_pose_, platoon_strategic_ihp::PlatoonManager::targetPlatoonID, platoon_strategic_ihp::PlatoonPluginConfig::test_cutin_join, platoon_strategic_ihp::PlatoonPluginConfig::test_front_join, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::ActionPlan::valid, platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and wm_.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in leaderaborting state.
msg | incoming mobility operation message. |
Definition at line 1229 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in leader waiting state.
msg | incoming mobility operation |
Definition at line 951 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in LeadWithOperation state (cut-in join)
msg | incoming mobility operation |
Definition at line 1241 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in PrepareToJoin state (cut-in join)
msg | incoming mobility operation |
Definition at line 1247 of file platoon_strategic_ihp.cpp.
References config_, current_crosstrack_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_plan, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::is_neighbor_record_complete_, JOIN_PARAMS, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, mob_op_find_ecef_from_INFO_params(), mobility_request_publisher_, platoon_strategic_ihp::PlatoonManager::neighbor_platoon_, OPERATION_INFO_TYPE, PLATOONING_STRATEGY, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), safeToLaneChange_, target_join_index_, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and wm_.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation in standby state.
msg | incoming mobility operation |
Definition at line 927 of file platoon_strategic_ihp.cpp.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation message with STATUS params, read ecef location and update platoon member info.
msg | incoming mobility operation message. |
Note: STATUS params format: STATUS | --> "CMDSPEED:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%" |-------—0-------—1------—2------—3------—4---—|
Definition at line 711 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::hostMemberUpdates(), mob_op_find_ecef_from_STATUS_params(), platoon_strategic_ihp::PlatoonManager::neighborMemberUpdates(), platoon_strategic_ihp::PlatoonManager::neighborPlatoonID, OPERATION_STATUS_TYPE, pm_, platoon_strategic_ihp::PlatoonManager::targetPlatoonID, and wm_.
Referenced by mob_op_cb().
|
private |
Function to process mobility operation INFO params to find platoon leader's ecef location.
strategyParams | The parsed strategy params, used to find ecef locaton. |
Note: INFO param format: "INFO| --> LENGTH:%.2f,SPEED:%.2f,SIZE:%d,ECEFX:%.2f,ECEFY:%.2f,ECEFZ:%.2f" |----—0--------—1------—2-----—3-------—4-------—5----—|
Definition at line 780 of file platoon_strategic_ihp.cpp.
References process_traj_logs::split.
Referenced by mob_op_cb_leader(), and mob_op_cb_preparetojoin().
|
private |
Function to process mobility operation for STATUS params.
strategyParams | The parsed strategy params, used to find ecef locaton. |
Definition at line 678 of file platoon_strategic_ihp.cpp.
References process_traj_logs::split.
Referenced by mob_op_cb_STATUS().
|
private |
Function to process mobility operation INFO params to find platoon length in m.
strategyParams | The parsed strategy params, used to find ecef locaton. |
Note: INFO param format: "INFO| --> LENGTH:%.2f,SPEED:%.2f,SIZE:%d,ECEFX:%.2f,ECEFY:%.2f,ECEFZ:%.2f" |----—0--------—1------—2-----—3-------—4-------—5----—|
Definition at line 760 of file platoon_strategic_ihp.cpp.
References process_traj_logs::split.
Referenced by mob_op_cb_leader().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::mob_req_cb | ( | const carma_v2x_msgs::msg::MobilityRequest::UniquePtr | msg | ) |
Callback function for Mobility Request Message.
msg | Mobility Request Message |
Definition at line 2554 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, config_, current_speed_, handle_mob_req(), platoon_strategic_ihp::PlatoonPluginConfig::minPlatooningSpeed, mobility_response_publisher_, platoon_strategic_ihp::NACK, PLATOONING_STRATEGY, timer_factory_, and platoon_strategic_ihp::PlatoonPluginConfig::vehicleID.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
|
private |
Function to process mobility request in candidate follower state.
msg | incoming mobility request |
Definition at line 1423 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::NO_RESPONSE.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in candidateleader state.
msg | incoming mobility request. |
Definition at line 1830 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), config_, current_crosstrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, ecef_to_map_point(), platoon_strategic_ihp::LEADER, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, platoon_strategic_ihp::NACK, platoon_strategic_ihp::ActionPlan::peerId, platoon_strategic_ihp::PlatoonManager::platoonLeaderID, pm_, platoon_strategic_ihp::PlatoonManager::resetHostPlatoon(), platoon_strategic_ihp::PlatoonManager::resetNeighborPlatoon(), platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and wm_.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in follower state.
msg | incoming mobility request |
For cut-in join, the gap rear vehicle need to slow down once they received the request from platoon leader. Note:1. (cut-in) When joiner is in position, the leader will send the request to relevent platoon member. So no need to check for "in-position" one more time.
Definition at line 1431 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, platoon_strategic_ihp::PlatoonManager::getHostStaticID(), platoon_strategic_ihp::PlatoonManager::host_platoon_, platoon_strategic_ihp::PlatoonManager::isCreateGap, platoon_strategic_ihp::NACK, platoon_strategic_ihp::NO_RESPONSE, pm_, and process_traj_logs::split.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in leader state.
msg | incoming mobility request |
UCLA implementation note:
Note: For front and rear jon, the JOIN_PARAMS format: JOIN_PARAMS| --> "SIZE:%1%,SPEED:%2%,ECEFX:%3%,ECEFY:%4%,ECEFZ:%5%,JOINIDX:%6%" |----—0---— –1------—2------—3------—4-------—5----—|
Note: JOIN_FROM_FRONT indicate a same-lane front join. JOIN_PLATOON_AT_REAR indicate a same-lane rear join. PLATOON_CUT_IN_JOIN indicate a cut-in join, which include three cut-in methods: cut-in front, cut-in middle, and cut-in rear.
Definition at line 1574 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, candidatestateStartTime, config_, current_crosstrack_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::getPlatoonFrontDowntrackDistance(), platoon_strategic_ihp::PlatoonManager::getPlatoonRearDowntrackDistance(), platoon_strategic_ihp::PlatoonManager::HostMobilityId, isJoiningVehicleNearPlatoon(), platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, platoon_strategic_ihp::PlatoonPluginConfig::maxAllowedJoinGap, platoon_strategic_ihp::PlatoonPluginConfig::maxAllowedJoinTimeGap, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, platoon_strategic_ihp::PlatoonPluginConfig::maxPlatoonSize, platoon_strategic_ihp::PlatoonPluginConfig::minAllowedJoinGap, platoon_strategic_ihp::NACK, platoon_strategic_ihp::NO_RESPONSE, platoon_strategic_ihp::PlatoonManager::platoonLeaderID, pm_, process_traj_logs::split, platoon_strategic_ihp::PlatoonPluginConfig::test_front_join, timer_factory_, platoon_strategic_ihp::ActionPlan::valid, platoon_strategic_ihp::PlatoonPluginConfig::vehicleLength, waitingStartTime, and wm_.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in leaderaborting state.
msg | incoming mobility request. |
Definition at line 1821 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::NO_RESPONSE.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in leader waiting state.
msg | incoming mobility request |
Definition at line 1513 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), config_, current_crosstrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::host_platoon_, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, platoon_strategic_ihp::NACK, platoon_strategic_ihp::NO_RESPONSE, platoon_strategic_ihp::ActionPlan::peerId, pm_, platoon_strategic_ihp::PlatoonMember::staticId, platoon_strategic_ihp::PlatoonMember::vehiclePosition, and wm_.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in leadwithoperation state (cut-in join)
msg | incoming mobility request |
Definition at line 1873 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::ACK, candidatestateStartTime, config_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, ecef_to_map_point(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::host_platoon_, platoon_strategic_ihp::PlatoonManager::isCreateGap, JOIN_PARAMS, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::PlatoonPluginConfig::maxCutinGap, mobility_request_publisher_, platoon_strategic_ihp::NACK, platoon_strategic_ihp::NO_RESPONSE, PLATOONING_STRATEGY, platoon_strategic_ihp::PlatoonManager::platoonLeaderID, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), process_traj_logs::split, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::ActionPlan::valid, platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, platoon_strategic_ihp::PlatoonPluginConfig::vehicleLength, waitingStartTime, and wm_.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in preparetojoin state (cut-in join)
msg | incoming mobility request |
Definition at line 2067 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::NO_RESPONSE.
Referenced by handle_mob_req().
|
private |
Function to process mobility request in standby state.
msg | incoming mobility request |
Definition at line 1416 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::NO_RESPONSE.
Referenced by handle_mob_req().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::mob_resp_cb | ( | const carma_v2x_msgs::msg::MobilityResponse::UniquePtr | msg | ) |
Callback function for Mobility Response Message.
msg | Mobility Response Message |
If any of the three condition (i.e., isCurrPlanValid, isForCurrentPlan and isFromTargetVehicle) was not satisfied, return ignore as this message was not intended for the host.
Definition at line 2080 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, mob_resp_cb_candidatefollower(), mob_resp_cb_candidateleader(), mob_resp_cb_follower(), mob_resp_cb_leader(), mob_resp_cb_leaderaborting(), mob_resp_cb_leaderwaiting(), mob_resp_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), mob_resp_cb_standby(), platoon_strategic_ihp::ActionPlan::peerId, platoon_strategic_ihp::ActionPlan::planId, pm_, platoon_strategic_ihp::PREPARETOJOIN, platoon_strategic_ihp::STANDBY, and platoon_strategic_ihp::ActionPlan::valid.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
|
private |
Function to process mobility response in candidate follower state.
msg | incoming mobility response |
Definition at line 2149 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::changeFromLeaderToFollower(), platoon_strategic_ihp::PlatoonManager::clearActionPlan(), platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::ActionPlan::planId, pm_, platoon_strategic_ihp::PlatoonManager::resetHostPlatoon(), platoon_strategic_ihp::PlatoonManager::resetNeighborPlatoon(), platoon_strategic_ihp::PlatoonManager::targetPlatoonID, and platoon_strategic_ihp::ActionPlan::valid.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in candidateleader state.
msg | incoming mobility response. |
Definition at line 2446 of file platoon_strategic_ihp.cpp.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in follower state.
msg | incoming mobility response |
UCLA Note:
This method was implemented with the purpose of updating the platoon related references (i.e., platoon leader, platoon Id) to the new leader that joined from front. Changing the existing follower to candidate follower state will initiate a member update and therefore point all refernce to the new leader.
For rear join, since the existing follower already following the platoon leader. There is no need to establish communication hence no response will be handled for rear-join.
Definition at line 2223 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::ActionPlan::planId, pm_, and timer_factory_.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in leader state.
msg | incoming mobility response |
UCLA implementation note: This is where the Mobility response gets processed for leader state.
If the host is a single vehicle in the leader state, then the host vehicle is the joiner vehicle (frontal join: candidate leader; back join: candidate follower), and the response sender is the existing platoon leader (front join: aborting leader, back join: waiting leader).
If the host is the current platoon leader, all three case will be false and no further action is needed.
Disclaimer: Currently, if the host vehicle is platoon leader, there is no further action needed when receiving the mobility response. However, future development may add functions in this mehtod.
Definition at line 2259 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), config_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::neighbor_platoon_leader_id_, platoon_strategic_ihp::ActionPlan::peerId, platoon_strategic_ihp::ActionPlan::planId, pm_, platoon_strategic_ihp::PREPARETOJOIN, platoon_strategic_ihp::PlatoonManager::resetHostPlatoon(), platoon_strategic_ihp::PlatoonManager::targetPlatoonID, platoon_strategic_ihp::PlatoonPluginConfig::test_front_join, timer_factory_, and platoon_strategic_ihp::ActionPlan::valid.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in leaderaborting state.
msg | incoming mobility response. |
UCLA implementation note: This state is the middle state to handle the leader aborting process of the previous platoon leader in a front join scenario. Within this state, the previous leader will check for front joining vehicle's position and will not handle any further mobility requests.
Note: As the previous leader will join the new leader (joined from front), the corresponding join request will be send out by the previos leader.
Definition at line 2365 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::changeFromLeaderToFollower(), platoon_strategic_ihp::PlatoonManager::clearActionPlan(), platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::LEADER, numLeaderAbortingCalls_, platoon_strategic_ihp::ActionPlan::peerId, platoon_strategic_ihp::ActionPlan::planId, pm_, platoon_strategic_ihp::PlatoonManager::removeMember(), and platoon_strategic_ihp::ActionPlan::valid.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in leader waiting state.
msg | incoming mobility response |
Leader waiting is the state to check joining vehicle is in proper position and to prevent platoon leader from receiving messages from other CAVs in leader state. There was no response involved in this state, hence no action needed in this section.
Definition at line 2213 of file platoon_strategic_ihp.cpp.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in leadwithoperation state (cut-in join)
msg | incoming mobility response |
Definition at line 2452 of file platoon_strategic_ihp.cpp.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in preparetojoin state.
msg | incoming mobility response |
Definition at line 2458 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, candidatestateStartTime, config_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonManager::currentPlatoonID, platoon_strategic_ihp::PlatoonManager::dummyID, platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::is_neighbor_record_complete_, JOIN_PARAMS, platoon_strategic_ihp::LEADER, mobility_request_publisher_, platoon_strategic_ihp::ActionPlan::peerId, PLATOONING_STRATEGY, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), safeToLaneChange_, target_join_index_, platoon_strategic_ihp::PlatoonManager::targetPlatoonID, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::ActionPlan::valid, and platoon_strategic_ihp::PlatoonPluginConfig::vehicleID.
Referenced by mob_resp_cb().
|
private |
Function to process mobility response in standby state.
msg | incoming mobility response |
Definition at line 2143 of file platoon_strategic_ihp.cpp.
Referenced by mob_resp_cb().
bool platoon_strategic_ihp::PlatoonStrategicIHPPlugin::onSpin | ( | ) |
Spin callback function.
Definition at line 3063 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::CANDIDATEFOLLOWER, platoon_strategic_ihp::CANDIDATELEADER, cmd_speed_, composePlatoonInfoMsg(), current_crosstrack_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::FOLLOWER, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::LEADERABORTING, platoon_strategic_ihp::LEADERWAITING, platoon_strategic_ihp::LEADWITHOPERATION, platooning_info_publisher_, pm_, platoon_strategic_ihp::PREPARETOJOIN, run_candidate_follower(), run_candidate_leader(), run_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), run_leader_waiting(), run_prepare_to_join(), platoon_strategic_ihp::STANDBY, platoon_strategic_ihp::PlatoonManager::updateHostPose(), and platoon_strategic_ihp::PlatoonManager::updateHostSpeeds().
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
bool platoon_strategic_ihp::PlatoonStrategicIHPPlugin::plan_maneuver_cb | ( | carma_planning_msgs::srv::PlanManeuvers::Request & | req, |
carma_planning_msgs::srv::PlanManeuvers::Response & | resp | ||
) |
Callback function to the maneuver request.
req | Maneuver service request |
resp | Maneuver service response |
Definition at line 3224 of file platoon_strategic_ihp.cpp.
References composeLaneChangeManeuverMessage(), composeManeuverMessage(), config_, current_crosstrack_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, findSpeedLimit(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), is_lanechange_possible(), platoon_strategic_ihp::LEADER, platoon_strategic_ihp::PlatoonPluginConfig::maxCrosstrackError, platoon_strategic_ihp::PlatoonPluginConfig::maxCutinGap, pm_, pose_msg_, safeToLaneChange_, platoon_strategic_ihp::STANDBY, target_cutin_pose_, platoon_strategic_ihp::PlatoonPluginConfig::time_step, timer_factory_, updateCurrentStatus(), and wm_.
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::pose_cb | ( | const geometry_msgs::msg::PoseStamped::UniquePtr | msg | ) |
Callback function for current pose.
msg | PoseStamped msg |
Definition at line 115 of file platoon_strategic_ihp.cpp.
References carma_wm::TrackPos::crosstrack, current_crosstrack_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_platoon_state, carma_wm::TrackPos::downtrack, pm_, pose_msg_, pose_to_ecef(), setHostECEF(), platoon_strategic_ihp::STANDBY, platoon_strategic_ihp::PlatoonManager::updateHostPose(), and wm_.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
|
private |
Function to convert pose from map frame to ecef location.
pose_msg | pose message |
Definition at line 64 of file platoon_strategic_ihp.cpp.
References map_projector_.
Referenced by mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), pose_cb(), run_candidate_follower(), run_leader_aborting(), and run_prepare_to_join().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_candidate_follower | ( | ) |
Run Candidate Follower State.
Definition at line 2725 of file platoon_strategic_ihp.cpp.
References candidate_follower_delay_count_, candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationCandidateFollower(), config_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonPluginConfig::desiredJoinGap, platoon_strategic_ihp::PlatoonPluginConfig::desiredJoinTimeGap, platoon_strategic_ihp::PlatoonManager::getDistanceToPredVehicle(), platoon_strategic_ihp::LEADER, mobility_operation_publisher_, mobility_request_publisher_, NEGOTIATION_TIMEOUT, platoon_strategic_ihp::PlatoonManager::neighbor_platoon_, platoon_strategic_ihp::ActionPlan::peerId, platoon_strategic_ihp::ActionPlan::planStartTime, PLATOONING_STRATEGY, platoon_strategic_ihp::PlatoonManager::platoonLeaderID, pm_, pose_msg_, pose_to_ecef(), statusMessageInterval_, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::ActionPlan::valid, platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and waitingStateTimeout.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_candidate_leader | ( | ) |
Run Candidate Leader State.
Definition at line 2921 of file platoon_strategic_ihp.cpp.
References candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationCandidateLeader(), platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::LEADER, mobility_operation_publisher_, pm_, platoon_strategic_ihp::PlatoonManager::resetHostPlatoon(), statusMessageInterval_, timer_factory_, and waitingStateTimeout.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_follower | ( | ) |
Run Follower State.
Definition at line 2682 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::changeFromFollowerToLeader(), composeMobilityOperationFollower(), platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::PlatoonManager::getNumberOfVehicleInFront(), platoon_strategic_ihp::LEADER, LEADER_TIMEOUT_COUNTER_LIMIT, mobility_operation_publisher_, noLeaderUpdatesCounter, pm_, statusMessageInterval_, and timer_factory_.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_lead_with_operation | ( | ) |
UCLA Run lead with operation State.
Definition at line 2948 of file platoon_strategic_ihp.cpp.
References composeMobilityOperationLeadWithOperation(), config_, platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), infoMessageInterval_, mobility_operation_publisher_, OPERATION_INFO_TYPE, OPERATION_STATUS_TYPE, pm_, prevHeartBeatTime_, statusMessageInterval_, platoon_strategic_ihp::PlatoonPluginConfig::test_cutin_join, and timer_factory_.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_leader | ( | ) |
Run Leader State.
Definition at line 2625 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationLeader(), config_, platoon_strategic_ihp::PlatoonManager::current_plan, current_speed_, platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), infoMessageInterval_, mobility_operation_publisher_, NEGOTIATION_TIMEOUT, OPERATION_INFO_TYPE, OPERATION_STATUS_TYPE, platoon_strategic_ihp::ActionPlan::planId, platoon_strategic_ihp::ActionPlan::planStartTime, pm_, prevHeartBeatTime_, statusMessageInterval_, STOPPED_SPEED, platoon_strategic_ihp::PlatoonPluginConfig::test_cutin_join, timer_factory_, and platoon_strategic_ihp::ActionPlan::valid.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_leader_aborting | ( | ) |
Run Leader Aborting State.
Definition at line 2825 of file platoon_strategic_ihp.cpp.
References candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationLeaderAborting(), config_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonPluginConfig::desiredJoinGap, platoon_strategic_ihp::PlatoonPluginConfig::desiredJoinTimeGap, platoon_strategic_ihp::PlatoonManager::getDistanceToPredVehicle(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), JOIN_PARAMS, platoon_strategic_ihp::LEADER, platoon_strategic_ihp::PlatoonPluginConfig::maxLeaderAbortingCalls, mobility_operation_publisher_, mobility_request_publisher_, numLeaderAbortingCalls_, PLATOONING_STRATEGY, platoon_strategic_ihp::PlatoonManager::platoonLeaderID, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), statusMessageInterval_, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and waitingStateTimeout.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_leader_waiting | ( | ) |
Run Leader Waiting State.
Definition at line 2600 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationLeaderWaiting(), platoon_strategic_ihp::PlatoonManager::current_platoon_state, platoon_strategic_ihp::LEADER, mobility_operation_publisher_, pm_, statusMessageInterval_, timer_factory_, waitingStartTime, and waitingStateTimeout.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::run_prepare_to_join | ( | ) |
UCLA Run prepare to join State.
Definition at line 2980 of file platoon_strategic_ihp.cpp.
References candidatestateStartTime, platoon_strategic_ihp::PlatoonManager::clearActionPlan(), composeMobilityOperationPrepareToJoin(), config_, current_downtrack_, platoon_strategic_ihp::PlatoonManager::current_plan, platoon_strategic_ihp::PlatoonManager::current_platoon_state, current_speed_, platoon_strategic_ihp::PlatoonManager::getClosestIndex(), platoon_strategic_ihp::PlatoonManager::getHostPlatoonSize(), platoon_strategic_ihp::PlatoonManager::is_neighbor_record_complete_, JOIN_PARAMS, platoon_strategic_ihp::LEADER, mobility_operation_publisher_, mobility_request_publisher_, platoon_strategic_ihp::PlatoonManager::neighbor_platoon_leader_id_, PLATOONING_STRATEGY, pm_, pose_ecef_point_, pose_msg_, pose_to_ecef(), platoon_strategic_ihp::PlatoonManager::resetHostPlatoon(), safeToLaneChange_, target_join_index_, timer_factory_, carma_cooperative_perception::to_string(), platoon_strategic_ihp::ActionPlan::valid, platoon_strategic_ihp::PlatoonPluginConfig::vehicleID, and waitingStateTimeout.
Referenced by onSpin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::setConfig | ( | const PlatoonPluginConfig & | config | ) |
Set the current config.
Definition at line 3520 of file platoon_strategic_ihp.cpp.
References config_.
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::setHostECEF | ( | carma_v2x_msgs::msg::LocationECEF | pose_ecef_point | ) |
UCLA Update the private variable pose_ecef_point_.
Definition at line 90 of file platoon_strategic_ihp.cpp.
References pose_ecef_point_.
Referenced by pose_cb().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::setPMState | ( | PlatoonState | desiredState | ) |
UCLA Setter: function to set pm_.platoon_state.
Definition at line 103 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::current_platoon_state, and pm_.
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::twist_cb | ( | const geometry_msgs::msg::TwistStamped::UniquePtr | msg | ) |
Callback for the twist subscriber, which will store latest twist locally.
msg | Latest twist message |
Definition at line 143 of file platoon_strategic_ihp.cpp.
References current_speed_, and STOPPED_SPEED.
Referenced by platoon_strategic_ihp::Node::on_configure_plugin().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::updateCurrentStatus | ( | carma_planning_msgs::msg::Maneuver | maneuver, |
double & | speed, | ||
double & | current_progress, | ||
int & | lane_id | ||
) |
Update maneuver status based on prior plan.
maneuver | maneuver |
speed | speed |
current_progress | current progress |
lane_id | lanelet ud |
Definition at line 3206 of file platoon_strategic_ihp.cpp.
Referenced by plan_maneuver_cb().
void platoon_strategic_ihp::PlatoonStrategicIHPPlugin::updatePlatoonList | ( | std::vector< PlatoonMember > | platoon_list | ) |
UCLA Setter: Update platoon list (Unit Test).
Definition at line 109 of file platoon_strategic_ihp.cpp.
References platoon_strategic_ihp::PlatoonManager::host_platoon_, and pm_.
|
private |
Definition at line 786 of file platoon_strategic_ihp.h.
Referenced by run_candidate_follower().
|
private |
Definition at line 336 of file platoon_strategic_ihp.h.
Referenced by mob_req_cb_leader(), mob_req_cb_leadwithoperation(), mob_resp_cb_follower(), mob_resp_cb_leader(), mob_resp_cb_preparetojoin(), run_candidate_follower(), run_candidate_leader(), run_leader_aborting(), and run_prepare_to_join().
|
private |
Definition at line 326 of file platoon_strategic_ihp.h.
Referenced by cmd_cb(), composeMobilityOperationSTATUS(), composePlatoonInfoMsg(), and onSpin().
|
private |
Definition at line 318 of file platoon_strategic_ihp.h.
Referenced by PlatoonStrategicIHPPlugin(), composeLaneChangeManeuverMessage(), composeManeuverMessage(), composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), composePlatoonInfoMsg(), isJoiningVehicleNearPlatoon(), isVehicleNearTargetPlatoon(), isVehicleRightBehind(), isVehicleRightInFront(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb(), mob_req_cb_candidateleader(), mob_req_cb_leader(), mob_req_cb_leaderwaiting(), mob_req_cb_leadwithoperation(), mob_resp_cb_leader(), mob_resp_cb_preparetojoin(), plan_maneuver_cb(), run_candidate_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), run_prepare_to_join(), and setConfig().
|
private |
Definition at line 332 of file platoon_strategic_ihp.h.
Referenced by isJoiningVehicleNearPlatoon(), isVehicleNearTargetPlatoon(), isVehicleRightBehind(), isVehicleRightInFront(), mob_op_cb_preparetojoin(), mob_req_cb_candidateleader(), mob_req_cb_leader(), mob_req_cb_leaderwaiting(), onSpin(), plan_maneuver_cb(), and pose_cb().
|
private |
Definition at line 330 of file platoon_strategic_ihp.h.
Referenced by composePlatoonInfoMsg(), isJoiningVehicleNearPlatoon(), isVehicleNearTargetPlatoon(), isVehicleRightBehind(), isVehicleRightInFront(), mob_op_cb_preparetojoin(), mob_req_cb_leader(), mob_req_cb_leadwithoperation(), onSpin(), plan_maneuver_cb(), pose_cb(), run_candidate_follower(), and run_prepare_to_join().
|
private |
Definition at line 328 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), composePlatoonInfoMsg(), mob_op_cb(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), onSpin(), plan_maneuver_cb(), run_candidate_follower(), run_leader(), run_leader_aborting(), run_prepare_to_join(), and twist_cb().
|
private |
Definition at line 800 of file platoon_strategic_ihp.h.
|
private |
Definition at line 801 of file platoon_strategic_ihp.h.
|
private |
Definition at line 773 of file platoon_strategic_ihp.h.
Referenced by georeference_cb().
|
private |
Definition at line 339 of file platoon_strategic_ihp.h.
|
private |
Definition at line 792 of file platoon_strategic_ihp.h.
Referenced by run_lead_with_operation(), and run_leader().
|
private |
index = 0, SIZE, number of members. index = 1, SPEED, in m/s. index = 2, ECEFX, in cm. index = 3, ECEFY, in cm. index = 4, ECEFZ, in cm. index = 5, JOINIDX, index of the position in platoon the incoming vehicle tries to join note: The cut-in index is zero-based and points to the gap-leading vehicle's index. eg: for rear join, cut-in index == platoon.size()-1; for join from front, index == -1; for cut-in in middle, index indicate the gap leading vehicle's index.
Definition at line 859 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), run_leader_aborting(), and run_prepare_to_join().
|
private |
Definition at line 796 of file platoon_strategic_ihp.h.
|
private |
Definition at line 798 of file platoon_strategic_ihp.h.
Referenced by run_follower().
|
private |
Definition at line 777 of file platoon_strategic_ihp.h.
|
private |
Definition at line 774 of file platoon_strategic_ihp.h.
Referenced by ecef_to_map_point(), georeference_cb(), and pose_to_ecef().
|
private |
Definition at line 789 of file platoon_strategic_ihp.h.
|
private |
Definition at line 788 of file platoon_strategic_ihp.h.
|
private |
Definition at line 790 of file platoon_strategic_ihp.h.
|
private |
Definition at line 310 of file platoon_strategic_ihp.h.
Referenced by run_candidate_follower(), run_candidate_leader(), run_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), run_leader_waiting(), and run_prepare_to_join().
|
private |
Definition at line 308 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), run_candidate_follower(), run_leader_aborting(), and run_prepare_to_join().
|
private |
Definition at line 309 of file platoon_strategic_ihp.h.
Referenced by mob_req_cb().
|
private |
Definition at line 795 of file platoon_strategic_ihp.h.
Referenced by run_candidate_follower(), and run_leader().
|
private |
Definition at line 797 of file platoon_strategic_ihp.h.
Referenced by run_follower().
|
private |
Definition at line 783 of file platoon_strategic_ihp.h.
Referenced by mob_resp_cb_leaderaborting(), and run_leader_aborting().
|
private |
index = 0, LENGTH, physical length of the platoon, in m. index = 1, SPEED, in m/s. index = 2, SIZE, number of members. index = 3, ECEFX, in cm. index = 4, ECEFY, in cm. index = 5, ECEFZ, in cm.
Definition at line 834 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationINFO().
|
private |
Definition at line 822 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationLeader(), composeMobilityOperationLeadWithOperation(), mob_op_cb(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), run_lead_with_operation(), and run_leader().
|
private |
index = 0, CMDSPEED, in m/s. index = 1, SPEED, in m/s. index = 2, ECEFX, in cm. index = 3, ECEFY, in cm. index = 4, ECEFZ, in cm.
Definition at line 843 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationSTATUS().
|
private |
Definition at line 823 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationLeader(), composeMobilityOperationLeadWithOperation(), mob_op_cb(), mob_op_cb_STATUS(), run_lead_with_operation(), and run_leader().
|
private |
Definition at line 311 of file platoon_strategic_ihp.h.
Referenced by onSpin().
|
private |
Definition at line 821 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), handle_mob_req(), mob_op_cb(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), run_candidate_follower(), run_leader_aborting(), and run_prepare_to_join().
|
private |
Definition at line 780 of file platoon_strategic_ihp.h.
Referenced by PlatoonStrategicIHPPlugin().
|
private |
Definition at line 818 of file platoon_strategic_ihp.h.
Referenced by PlatoonStrategicIHPPlugin(), composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), composePlatoonInfoMsg(), getHostPM(), handle_mob_req(), isJoiningVehicleNearPlatoon(), mob_op_cb(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_op_cb_STATUS(), mob_req_cb_candidateleader(), mob_req_cb_follower(), mob_req_cb_leader(), mob_req_cb_leaderwaiting(), mob_req_cb_leadwithoperation(), mob_resp_cb(), mob_resp_cb_candidatefollower(), mob_resp_cb_follower(), mob_resp_cb_leader(), mob_resp_cb_leaderaborting(), mob_resp_cb_preparetojoin(), onSpin(), plan_maneuver_cb(), pose_cb(), run_candidate_follower(), run_candidate_leader(), run_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), run_leader_waiting(), run_prepare_to_join(), setPMState(), and updatePlatoonList().
carma_v2x_msgs::msg::LocationECEF platoon_strategic_ihp::PlatoonStrategicIHPPlugin::pose_ecef_point_ |
Definition at line 257 of file platoon_strategic_ihp.h.
Referenced by composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), run_leader_aborting(), run_prepare_to_join(), and setHostECEF().
|
private |
Definition at line 322 of file platoon_strategic_ihp.h.
Referenced by composePlatoonInfoMsg(), findLaneWidth(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb_leadwithoperation(), mob_resp_cb_preparetojoin(), plan_maneuver_cb(), pose_cb(), run_candidate_follower(), run_leader_aborting(), and run_prepare_to_join().
|
private |
Definition at line 793 of file platoon_strategic_ihp.h.
Referenced by run_lead_with_operation(), and run_leader().
|
private |
Definition at line 812 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb_preparetojoin(), mob_resp_cb_preparetojoin(), plan_maneuver_cb(), and run_prepare_to_join().
|
private |
Definition at line 794 of file platoon_strategic_ihp.h.
Referenced by run_candidate_follower(), run_candidate_leader(), run_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), and run_leader_waiting().
|
private |
Definition at line 806 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb(), run_leader(), and twist_cb().
|
private |
Definition at line 803 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb_leader(), and plan_maneuver_cb().
|
private |
Definition at line 809 of file platoon_strategic_ihp.h.
Referenced by mob_op_cb_preparetojoin(), mob_resp_cb_preparetojoin(), and run_prepare_to_join().
|
private |
Definition at line 815 of file platoon_strategic_ihp.h.
Referenced by PlatoonStrategicIHPPlugin(), composeMobilityOperationINFO(), composeMobilityOperationSTATUS(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_req_cb(), mob_req_cb_leader(), mob_req_cb_leadwithoperation(), mob_resp_cb_follower(), mob_resp_cb_leader(), mob_resp_cb_preparetojoin(), plan_maneuver_cb(), run_candidate_follower(), run_candidate_leader(), run_follower(), run_lead_with_operation(), run_leader(), run_leader_aborting(), run_leader_waiting(), and run_prepare_to_join().
|
private |
Definition at line 791 of file platoon_strategic_ihp.h.
|
private |
Definition at line 334 of file platoon_strategic_ihp.h.
Referenced by mob_req_cb_leader(), mob_req_cb_leadwithoperation(), and run_leader_waiting().
|
private |
Definition at line 799 of file platoon_strategic_ihp.h.
Referenced by run_candidate_follower(), run_candidate_leader(), run_leader_aborting(), run_leader_waiting(), and run_prepare_to_join().
|
private |
Definition at line 315 of file platoon_strategic_ihp.h.
Referenced by composeManeuverMessage(), composePlatoonInfoMsg(), findLaneWidth(), findSpeedLimit(), is_lanechange_possible(), mob_op_cb_leader(), mob_op_cb_preparetojoin(), mob_op_cb_STATUS(), mob_req_cb_candidateleader(), mob_req_cb_leader(), mob_req_cb_leaderwaiting(), mob_req_cb_leadwithoperation(), plan_maneuver_cb(), and pose_cb().