![]() |
Galaxis Codebase
1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
|
#include <AutoPilot.hpp>

Public Member Functions | |
| AutoPilot ()=delete | |
| AutoPilot (GalaxisNode *p_gNodePtr) | |
| ~AutoPilot () | |
| void | set_obstacle_lookup_distance (int value) |
| void | set_obstacle_lookup_distance_step (float value) |
| void | set_obstacle_to_lane_center_min_distance_for_dodge (float value) |
| void | set_polynom_degree (int value) |
| void | set_polynom_min_points_amount (int value) |
| void | set_traj_points_to_append_amount (int value) |
| void | set_traj_points_start_appending_offset (int value) |
| void | set_line_cluster_eps (int value) |
| void | set_line_cluster_min_pts (int value) |
| void | set_line_polynom_evaluation_step (int value) |
| void | set_line_polynom_evaluation_step_size (int value) |
| void | set_min_number_of_clustered_line_points (int value) |
| std::shared_ptr< DriveInformation_t > | get_drive_information () |
| double | eval_poly (DynamicPolynom p_polynom, double p_x) |
Private Member Functions | |
| void | cluster_line_object (std::map< int16_t, std::vector< int16_t >> &linePointsMapInputRef, std::shared_ptr< std::map< int16_t, int16_t >> linePointsOutVecSPtr) |
| std::unique_ptr< std::pair< std::vector< galaxis::lina::Vector2f >, std::vector< galaxis::lina::Vector2f > > > | get_lane_centers (std::shared_ptr< PositionTimepoint > positionTimepoint) |
| std::unique_ptr< std::pair< std::vector< galaxis::lina::Vector2f >, std::vector< galaxis::lina::Vector2f > > > | get_lane_center () |
| void | get_lane_centers_thread_helper (Eigen::Rotation2Df p_reverseRotationMat, std::shared_ptr< std::map< int16_t, int16_t >> p_leftLinePointsMapSPtr, std::shared_ptr< std::map< int16_t, int16_t >> p_centerLinePointsMapSPtr, std::shared_ptr< std::map< int16_t, int16_t >> p_rightLinePointsMapSPtr, std::shared_ptr< MutexedVectorPointer< galaxis::lina::Vector2f >> p_leftLaneMutexedVecSPtr, std::shared_ptr< MutexedVectorPointer< galaxis::lina::Vector2f >> p_rightLaneMutexedVecSPtr, bool p_yxMapping) |
| void | get_lane_centers_via_polynom_thread_helper (Eigen::Rotation2Df p_reverseRotationMat, std::shared_ptr< std::map< int16_t, int16_t >> p_leftLinePointsMapSPtr, std::shared_ptr< std::map< int16_t, int16_t >> p_centerLinePointsMapSPtr, std::shared_ptr< std::map< int16_t, int16_t >> p_rightLinePointsMapSPtr, std::shared_ptr< MutexedVectorPointer< galaxis::lina::Vector2f >> p_leftLaneMutexedVecSPtr, std::shared_ptr< MutexedVectorPointer< galaxis::lina::Vector2f >> p_rightLaneMutexedVecSPtr) |
| void | insert_lane_point (std::shared_ptr< MutexedVectorPointer< galaxis::lina::Vector2f >> p_mutVecPointerSPtr, float p_x, float p_y, Eigen::Rotation2Df const &p_rotationMat, bool p_reverseInsertion) |
| std::tuple< float, float, float, float > | get_lane_blocked (std::pair< DynamicPolynom, DynamicPolynom > &lanePolynom) |
Private Attributes | |
| GalaxisNode * | m_gNodePtr |
| boost::asio::thread_pool | m_threadPool |
| std::shared_mutex | m_sharedThreadMutex |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_leftLineXYTmpVecSPtr |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_centerLineXYTmpVecSPtr |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_rightLineXYTmpVecSPtr |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_leftLineYXTmpVecSPtr |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_centerLineYXTmpVecSPtr |
| std::shared_ptr< std::map< int16_t, int16_t > > | m_rightLineYXTmpVecSPtr |
| std::shared_ptr< std::vector< double > > | m_leftLinePolynomXVectorSPtr |
| std::shared_ptr< std::vector< double > > | m_leftLinePolynomYVectorSPtr |
| std::shared_ptr< std::vector< double > > | m_centerLinePolynomXVectorSPtr |
| std::shared_ptr< std::vector< double > > | m_centerLinePolynomYVectorSPtr |
| std::shared_ptr< std::vector< double > > | m_rightLinePolynomXVectorSPtr |
| std::shared_ptr< std::vector< double > > | m_rightLinePolynomYVectorSPtr |
| std::tuple< float, float, float, float > | m_laneBlocked |
| double | m_leftPolyMax |
| double | m_leftPolyMin |
| std::shared_ptr< std::vector< double > > | m_leftLinePoly |
| double | m_centerPolyMax |
| double | m_centerPolyMin |
| std::shared_ptr< std::vector< double > > | m_centerLinePoly |
| double | m_rightPolyMax |
| double | m_rightPolyMin |
| std::shared_ptr< std::vector< double > > | m_rightLinePoly |
| rclcpp::Time | m_lastTimeLaneVisible |
Definition at line 46 of file AutoPilot.hpp.
|
delete |
| AutoPilot::AutoPilot | ( | GalaxisNode * | p_gNodePtr | ) |
Definition at line 6 of file AutoPilot.cpp.
References m_centerLinePolynomXVectorSPtr, m_centerLinePolynomYVectorSPtr, m_centerLineXYTmpVecSPtr, m_centerLineYXTmpVecSPtr, m_gNodePtr, m_laneBlocked, m_lastDriveInformationSPtr, m_leftLinePolynomPointsVecSPtr, m_leftLinePolynomXVectorSPtr, m_leftLinePolynomYVectorSPtr, m_leftLineXYTmpVecSPtr, m_leftLineYXTmpVecSPtr, m_polynomPointsXVector, m_polynomPointsYVector, m_rightLinePolynomPointsVecSPtr, m_rightLinePolynomXVectorSPtr, m_rightLinePolynomYVectorSPtr, m_rightLineXYTmpVecSPtr, and m_rightLineYXTmpVecSPtr.
| AutoPilot::~AutoPilot | ( | ) |
Definition at line 44 of file AutoPilot.cpp.
References m_threadPool.
|
private |
Definition at line 289 of file AutoPilot.cpp.
References m_lineClusterEps, m_lineClusterMinPts, and m_sharedThreadMutex.
Referenced by get_lane_centers().

| double AutoPilot::eval_poly | ( | DynamicPolynom | p_polynom, |
| double | p_x | ||
| ) |
Definition at line 640 of file AutoPilot.cpp.
Referenced by get_drive_information(), get_lane_blocked(), and AutoPilotNode::send_map_debug_image().

| std::shared_ptr< DriveInformation_t > AutoPilot::get_drive_information | ( | ) |
Definition at line 87 of file AutoPilot.cpp.
References galaxis::utils::calculate_gradient(), eval_poly(), Decision::get_chosen_lane(), Decision::get_current_situationstate(), Decision::get_indicator_left(), Decision::get_indicator_right(), get_lane_blocked(), get_lane_centers(), Localizer::get_latest_position_timepoint(), Decision::get_velocity_reference(), galaxis::utils::log_warning(), m_centerLinePoly, m_decision, m_laneBlocked, m_laneCentersPairVecUPtr, m_lanePolynom, m_lastDriveInformationSPtr, m_leftLinePoly, m_localizer, MapDataLayer::m_lookupWindowSizeCMHeight, m_mapDataLayer, m_polynomMinimumPointsAmount, m_polynomPointsXVector, m_polynomPointsYVector, m_rightLinePoly, m_trajPointsStartAppendingOffset, m_trajPointsToAppendAmount, Parking, ParkingZone, and Decision::update().
Referenced by AutoPilotNode::send_controller_references().


|
private |
Definition at line 581 of file AutoPilot.cpp.
References eval_poly(), Localizer::get_latest_position_timepoint(), MapDataLayer::getObstacles(), m_localizer, m_mapDataLayer, m_obstacleLookupDistanceCM, m_obstacleLookupDistanceStepCM, and m_obstacleToLaneCenterMinimumDistanceForDodge.
Referenced by get_drive_information().


|
private |
|
private |
Definition at line 231 of file AutoPilot.cpp.
References cluster_line_object(), get_lane_centers_thread_helper(), get_lane_centers_via_polynom_thread_helper(), MapDataLayer::getLineObject(), galaxis::autopilot::lookupLookBehindCarCM, m_centerLineXYTmpVecSPtr, m_centerLineYXTmpVecSPtr, m_leftLineXYTmpVecSPtr, m_leftLineYXTmpVecSPtr, m_linesObject, MapDataLayer::m_lookupWindowSizeCMHeight, MapDataLayer::m_lookupWindowSizeCMWidth, m_mapDataLayer, m_rightLineXYTmpVecSPtr, m_rightLineYXTmpVecSPtr, m_sharedThreadMutex, and m_threadPool.
Referenced by get_drive_information().


|
private |
Definition at line 329 of file AutoPilot.cpp.
References insert_lane_point(), and m_sharedThreadMutex.
Referenced by get_lane_centers().


|
private |
Definition at line 371 of file AutoPilot.cpp.
References galaxis::utils::evaluate_polynom(), m_centerLinePoly, m_centerLinePolynomXVectorSPtr, m_centerLinePolynomYVectorSPtr, m_centerPolyMax, m_centerPolyMin, m_leftLinePoly, m_leftLinePolynomPointsVecSPtr, m_leftLinePolynomXVectorSPtr, m_leftLinePolynomYVectorSPtr, m_leftPolyMax, m_leftPolyMin, m_linePolynomEvaluationStepCM, m_linePolynomEvaluationStepSizeCM, MapDataLayer::m_lookupWindowSizeCMHeight, m_mapDataLayer, m_rightLinePoly, m_rightLinePolynomPointsVecSPtr, m_rightLinePolynomXVectorSPtr, m_rightLinePolynomYVectorSPtr, m_rightPolyMax, m_rightPolyMin, m_sharedThreadMutex, and MATH_PI_DOUBLE.
Referenced by get_lane_centers().


|
inlineprivate |
Definition at line 558 of file AutoPilot.cpp.
Referenced by get_lane_centers_thread_helper().

| void AutoPilot::set_line_cluster_eps | ( | int | value | ) |
Definition at line 70 of file AutoPilot.cpp.
References m_lineClusterEps.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_line_cluster_min_pts | ( | int | value | ) |
Definition at line 73 of file AutoPilot.cpp.
References m_lineClusterMinPts.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_line_polynom_evaluation_step | ( | int | value | ) |
Definition at line 76 of file AutoPilot.cpp.
References m_linePolynomEvaluationStepCM.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_line_polynom_evaluation_step_size | ( | int | value | ) |
Definition at line 79 of file AutoPilot.cpp.
References m_linePolynomEvaluationStepSizeCM.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_min_number_of_clustered_line_points | ( | int | value | ) |
Definition at line 82 of file AutoPilot.cpp.
References m_minNumberOfClusteredLinePoints.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_obstacle_lookup_distance | ( | int | value | ) |
Definition at line 49 of file AutoPilot.cpp.
References m_obstacleLookupDistanceCM.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_obstacle_lookup_distance_step | ( | float | value | ) |
Definition at line 52 of file AutoPilot.cpp.
References m_obstacleLookupDistanceStepCM.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_obstacle_to_lane_center_min_distance_for_dodge | ( | float | value | ) |
Definition at line 55 of file AutoPilot.cpp.
References m_obstacleToLaneCenterMinimumDistanceForDodge.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_polynom_degree | ( | int | value | ) |
Definition at line 58 of file AutoPilot.cpp.
References m_polynomDegree.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_polynom_min_points_amount | ( | int | value | ) |
Definition at line 61 of file AutoPilot.cpp.
References m_polynomMinimumPointsAmount.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_traj_points_start_appending_offset | ( | int | value | ) |
Definition at line 67 of file AutoPilot.cpp.
References m_trajPointsStartAppendingOffset.
Referenced by AutoPilotNode::new_parameters_callback().

| void AutoPilot::set_traj_points_to_append_amount | ( | int | value | ) |
Definition at line 64 of file AutoPilot.cpp.
References m_trajPointsToAppendAmount.
Referenced by AutoPilotNode::new_parameters_callback().

|
private |
Definition at line 93 of file AutoPilot.hpp.
Referenced by get_drive_information(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 80 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 81 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 70 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 73 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 91 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 92 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
| Decision AutoPilot::m_decision |
Definition at line 51 of file AutoPilot.hpp.
Referenced by AutoPilotNode::AutoPilotNode(), AutoPilotNode::debug_publish_loop(), get_drive_information(), AutoPilotNode::new_parameters_callback(), AutoPilotNode::on_ecu_measurement_callback(), AutoPilotNode::on_parking_state_callback(), AutoPilotNode::on_qr_code_callback(), AutoPilotNode::on_simulation_pose_callback(), and AutoPilotNode::on_stop_line_callback().
|
private |
Definition at line 63 of file AutoPilot.hpp.
Referenced by AutoPilot().
|
private |
Definition at line 86 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_drive_information().
| std::unique_ptr<std::pair<std::vector<galaxis::lina::Vector2f>, std::vector<galaxis::lina::Vector2f> > > AutoPilot::m_laneCentersPairVecUPtr |
Definition at line 54 of file AutoPilot.hpp.
Referenced by get_drive_information(), and AutoPilotNode::send_map_debug_image().
| std::pair<DynamicPolynom, DynamicPolynom> AutoPilot::m_lanePolynom |
Definition at line 55 of file AutoPilot.hpp.
Referenced by get_drive_information().
| std::shared_ptr<DriveInformation_t> AutoPilot::m_lastDriveInformationSPtr |
Definition at line 57 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_drive_information().
|
private |
Definition at line 98 of file AutoPilot.hpp.
|
private |
Definition at line 90 of file AutoPilot.hpp.
Referenced by get_drive_information(), and get_lane_centers_via_polynom_thread_helper().
| std::shared_ptr<std::vector<Vector2f> > AutoPilot::m_leftLinePolynomPointsVecSPtr |
Definition at line 122 of file AutoPilot.hpp.
Referenced by AutoPilot(), get_lane_centers_via_polynom_thread_helper(), and AutoPilotNode::send_map_debug_image().
|
private |
Definition at line 77 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 78 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 69 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 72 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 88 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 89 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
| int AutoPilot::m_lineClusterEps = 2 |
Definition at line 113 of file AutoPilot.hpp.
Referenced by cluster_line_object(), and set_line_cluster_eps().
| int AutoPilot::m_lineClusterMinPts = 2 |
Definition at line 114 of file AutoPilot.hpp.
Referenced by cluster_line_object(), and set_line_cluster_min_pts().
| int AutoPilot::m_linePolynomEvaluationStepCM = 1 |
Definition at line 116 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper(), and set_line_polynom_evaluation_step().
| int AutoPilot::m_linePolynomEvaluationStepSizeCM = 8 |
Definition at line 117 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper(), and set_line_polynom_evaluation_step_size().
| std::shared_ptr<LinesObject<int16_t> > AutoPilot::m_linesObject |
Definition at line 53 of file AutoPilot.hpp.
Referenced by get_lane_centers(), and AutoPilotNode::send_map_debug_image().
| Localizer AutoPilot::m_localizer |
Definition at line 50 of file AutoPilot.hpp.
Referenced by AutoPilotNode::AutoPilotNode(), AutoPilotNode::car_pose_publish_loop(), get_drive_information(), get_lane_blocked(), AutoPilotNode::on_ecu_measurement_callback(), AutoPilotNode::on_obstacle_callback(), AutoPilotNode::on_simulation_pose_callback(), AutoPilotNode::on_stop_line_callback(), AutoPilotNode::on_vci_lane_detection_callback(), and AutoPilotNode::send_map_debug_image().
| MapDataLayer AutoPilot::m_mapDataLayer |
Definition at line 49 of file AutoPilot.hpp.
Referenced by AutoPilotNode::AutoPilotNode(), get_drive_information(), get_lane_blocked(), get_lane_centers(), get_lane_centers_via_polynom_thread_helper(), AutoPilotNode::new_parameters_callback(), AutoPilotNode::on_obstacle_callback(), AutoPilotNode::on_vci_lane_detection_callback(), AutoPilotNode::send_full_map_debug_image(), and AutoPilotNode::send_map_debug_image().
| int AutoPilot::m_minNumberOfClusteredLinePoints = 20 |
Definition at line 118 of file AutoPilot.hpp.
Referenced by set_min_number_of_clustered_line_points().
| int AutoPilot::m_obstacleLookupDistanceCM = 200 |
Definition at line 103 of file AutoPilot.hpp.
Referenced by get_lane_blocked(), and set_obstacle_lookup_distance().
| int AutoPilot::m_obstacleLookupDistanceStepCM = 5 |
Definition at line 104 of file AutoPilot.hpp.
Referenced by get_lane_blocked(), and set_obstacle_lookup_distance_step().
| int AutoPilot::m_obstacleToLaneCenterMinimumDistanceForDodge = 10 |
Definition at line 105 of file AutoPilot.hpp.
Referenced by get_lane_blocked(), and set_obstacle_to_lane_center_min_distance_for_dodge().
| int AutoPilot::m_polynomDegree = 3 |
Definition at line 107 of file AutoPilot.hpp.
Referenced by set_polynom_degree().
| int AutoPilot::m_polynomMinimumPointsAmount = 30 |
Definition at line 108 of file AutoPilot.hpp.
Referenced by get_drive_information(), and set_polynom_min_points_amount().
| std::vector<double> AutoPilot::m_polynomPointsXVector |
Definition at line 59 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_drive_information().
| std::vector<double> AutoPilot::m_polynomPointsYVector |
Definition at line 60 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_drive_information().
|
private |
Definition at line 96 of file AutoPilot.hpp.
Referenced by get_drive_information(), and get_lane_centers_via_polynom_thread_helper().
| std::shared_ptr<std::vector<Vector2f> > AutoPilot::m_rightLinePolynomPointsVecSPtr |
Definition at line 123 of file AutoPilot.hpp.
Referenced by AutoPilot(), get_lane_centers_via_polynom_thread_helper(), and AutoPilotNode::send_map_debug_image().
|
private |
Definition at line 83 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 84 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 71 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 74 of file AutoPilot.hpp.
Referenced by AutoPilot(), and get_lane_centers().
|
private |
Definition at line 94 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 95 of file AutoPilot.hpp.
Referenced by get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 66 of file AutoPilot.hpp.
Referenced by cluster_line_object(), get_lane_centers(), get_lane_centers_thread_helper(), and get_lane_centers_via_polynom_thread_helper().
|
private |
Definition at line 65 of file AutoPilot.hpp.
Referenced by get_lane_centers(), and ~AutoPilot().
| int AutoPilot::m_trajPointsStartAppendingOffset = 20 |
Definition at line 111 of file AutoPilot.hpp.
Referenced by get_drive_information(), and set_traj_points_start_appending_offset().
| int AutoPilot::m_trajPointsToAppendAmount = 5 |
Definition at line 110 of file AutoPilot.hpp.
Referenced by get_drive_information(), and set_traj_points_to_append_amount().