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


Public Member Functions | |
| AutoPilotNode () | |
| ~AutoPilotNode () | |
Private Member Functions | |
| void | on_system_settings_callback (SystemSettingsType::SharedPtr msg) |
| void | car_pose_publish_loop () |
| void | debug_publish_loop () |
| void | controller_reference_publish_loop () |
| void | lane_detection_shared_memory_loop () |
| void | on_simulation_pose_callback (geometry_msgs::msg::Pose::SharedPtr p_message) |
| void | on_ecu_measurement_callback (MeasurementsType::SharedPtr msg) |
| void | on_vci_lane_detection_callback (sensor_msgs::msg::Image::SharedPtr msg) |
| void | on_obstacle_callback (ObstacleListType::SharedPtr msg) |
| void | on_qr_code_callback (QRCodeDetectType::SharedPtr msg) |
| void | on_stop_line_callback (StopLineType::SharedPtr msg) |
| void | on_parking_state_callback (ParkingStateType::SharedPtr msg) |
| void | send_controller_references () |
| void | send_map_debug_image () |
| void | send_full_map_debug_image () |
| rcl_interfaces::msg::SetParametersResult | new_parameters_callback (const std::vector< rclcpp::Parameter > ¶meters) |
Additional Inherited Members | |
Protected Member Functions inherited from GalaxisNode | |
| GalaxisNode ()=delete | |
| GalaxisNode (std::string p_name, unsigned int p_heartbeatTimePeriod) | |
| GalaxisNode (std::string p_name) | |
| template<typename MsgSPtr > | |
| void | tickSub (std::map< galaxis::serviceStates::State, std::function< void(const MsgSPtr)>> const *p_functionMapPtr, MsgSPtr const p_message) |
| template<typename... Args> | |
| void | tickPub (std::map< galaxis::serviceStates::State, std::function< void(Args...)>> const *p_functionMapPtr, Args... p_args) |
| void | register_callback (std::function< void(galaxis::serviceStates::State)> p_function) |
| void | service_state_callback (ServiceStateType::SharedPtr const p_msgSPtr) |
| galaxis::serviceStates::State | get_current_service_state () const |
| void | enable_parameters (std::function< rcl_interfaces::msg::SetParametersResult(const std::vector< rclcpp::Parameter > &)> callbackFunc) |
| void | create_parameters (std::shared_ptr< json > configJsonSPtr) |
| json const & | get_global_settings () |
Definition at line 23 of file AutoPilotNode.hpp.
| AutoPilotNode::AutoPilotNode | ( | ) |
Definition at line 18 of file AutoPilotNode.cpp.
References Localizer::add_position_timepoint(), com::SharedMemory::allocate(), car_pose_publish_loop(), controller_reference_publish_loop(), debug_publish_loop(), GalaxisNode::enable_parameters(), MapDataLayer::enableSimulationMode(), GalaxisNode::get_global_settings(), lane_detection_shared_memory_loop(), galaxis::utils::log(), galaxis::utils::log_warning(), m_autopilot, m_autopilotStatePubSPtr, m_carposePubSPtr, m_controllerRefPubSPtr, m_debugMode, AutoPilot::m_decision, m_fakeLineDetectionMode, m_fullMapDataImageDebugPub, m_laneDetectionImageSize, m_laneDetectionMessage, m_laneDetectionSharedMemory, m_laneDetectionSharedMemoryMode, m_lastLaneDetectionUpdate, m_lastParkingState, AutoPilot::m_localizer, m_mapDataImageDebugPub, AutoPilot::m_mapDataLayer, m_measurementSub, m_parkingOperationPubSPtr, m_pathpolynomPubSPtr, m_poseSendSleepTimeMicroSec, m_sendFullMapDebugMsg, m_sendLaneDetectionImage, m_simulationMode, Decision::m_stopAtStartLine, m_stoplineIgnoreAreaRadius, m_subscriberCarPoseSPtr, m_subscriberLaneDetectionSub, m_subscriberObstaclesSPtr, m_subscriberParkingStateSPtr, m_subscriberQRCodeSPtr, m_subscriberStopLine, new_parameters_callback(), on_ecu_measurement_callback(), on_obstacle_callback(), on_parking_state_callback(), on_qr_code_callback(), on_simulation_pose_callback(), on_stop_line_callback(), on_vci_lane_detection_callback(), galaxis::utils::read_json_file(), galaxis::autopilot::realPixelToPositionConversionFactorCM, MapDataLayer::setLaneImageConversionFactor(), galaxis::autopilot::simulationPixelToPositionConversionFactorCM, and Decision::start_driving().

| AutoPilotNode::~AutoPilotNode | ( | ) |
Definition at line 150 of file AutoPilotNode.cpp.
|
private |
Definition at line 152 of file AutoPilotNode.cpp.
References Localizer::get_latest_position_timepoint(), Localizer::is_empty(), m_autopilot, m_carposePubSPtr, AutoPilot::m_localizer, and m_poseSendSleepTimeMicroSec.
Referenced by AutoPilotNode().


|
private |
Definition at line 169 of file AutoPilotNode.cpp.
References galaxis::utils::MicroStopwatch::get_time(), m_controllerReferenceSendSleepTimeMicroSec, and send_controller_references().
Referenced by AutoPilotNode().


|
private |
Definition at line 179 of file AutoPilotNode.cpp.
References Decision::get_current_situationstate(), galaxis::utils::MicroStopwatch::get_time(), galaxis::utils::log(), m_autopilot, m_autopilotStatePubSPtr, m_controllerPublishMtx, AutoPilot::m_decision, m_sendFullMapDebugMsg, send_full_map_debug_image(), and send_map_debug_image().
Referenced by AutoPilotNode().


|
private |
Definition at line 202 of file AutoPilotNode.cpp.
References com::SharedData::data, com::SharedData::dataSize, com::SharedMemory::is_new_data_available(), galaxis::utils::log(), galaxis::utils::log_warning(), m_laneDetectionImageSize, m_laneDetectionMessage, m_laneDetectionSharedMemory, m_sendLaneDetectionImage, on_vci_lane_detection_callback(), com::SharedMemory::read_mutexed(), com::SharedData::tv_nsec, and com::SharedData::tv_sec.
Referenced by AutoPilotNode().


|
private |
Definition at line 812 of file AutoPilotNode.cpp.
References galaxis::utils::log(), galaxis::utils::log_warning(), m_autopilot, m_controllerReferenceSendSleepTimeMicroSec, AutoPilot::m_decision, AutoPilot::m_mapDataLayer, m_stoplineIgnoreAreaRadius, Decision::set_critical_obstacle_distance_for_lane_changing(), Decision::set_distance_after_switch_back_lane(), AutoPilot::set_line_cluster_eps(), AutoPilot::set_line_cluster_min_pts(), AutoPilot::set_line_polynom_evaluation_step(), AutoPilot::set_line_polynom_evaluation_step_size(), AutoPilot::set_min_number_of_clustered_line_points(), AutoPilot::set_obstacle_lookup_distance(), AutoPilot::set_obstacle_lookup_distance_step(), AutoPilot::set_obstacle_to_lane_center_min_distance_for_dodge(), AutoPilot::set_polynom_degree(), AutoPilot::set_polynom_min_points_amount(), AutoPilot::set_traj_points_start_appending_offset(), AutoPilot::set_traj_points_to_append_amount(), Decision::set_velocity_reference(), Decision::set_velocity_reference_parking(), MapDataLayer::setCellLineDecreasePerView(), MapDataLayer::setCellLineIncreasePerView(), MapDataLayer::setCellThresholdExtract(), MapDataLayer::setCellThresholdRGBValue(), MapDataLayer::setLookupWindowSizeCMHeight(), MapDataLayer::setLookupWindowSizeCMWidth(), MapDataLayer::setObstaclePositionDiffForRerecognition(), and MapDataLayer::setObstacleTrackTimeDuration().
Referenced by AutoPilotNode().


|
private |
Definition at line 270 of file AutoPilotNode.cpp.
References Localizer::add_state(), galaxis::motorSettings::erpmToVelocity(), galaxis::utils::log(), m_autopilot, AutoPilot::m_decision, AutoPilot::m_localizer, and Decision::update_tof().
Referenced by AutoPilotNode().


|
private |
Definition at line 402 of file AutoPilotNode.cpp.
References MapDataLayer::addOrUpdateStaticObstacle(), Localizer::get_position_timepoint_by_time(), Localizer::is_empty(), galaxis::utils::log(), galaxis::utils::log_warning(), m_autopilot, AutoPilot::m_localizer, and AutoPilot::m_mapDataLayer.
Referenced by AutoPilotNode().


|
private |
Definition at line 464 of file AutoPilotNode.cpp.
References Done, Idle, InParking, galaxis::utils::log_debug(), m_autopilot, AutoPilot::m_decision, m_lastParkingState, Searching, and Decision::set_parking_state().
Referenced by AutoPilotNode().


|
private |
Definition at line 421 of file AutoPilotNode.cpp.
References galaxis::utils::log_debug(), m_autopilot, AutoPilot::m_decision, m_qrCodeDetectedSomeTime, and Decision::start_driving().
Referenced by AutoPilotNode().


|
private |
Definition at line 240 of file AutoPilotNode.cpp.
References Localizer::add_position_timepoint(), Decision::get_velocity_reference(), m_autopilot, AutoPilot::m_decision, AutoPilot::m_localizer, MATH_PI_DOUBLE, and galaxis::autopilot::simluationCarPositionOffsetToFrontAxisM.
Referenced by AutoPilotNode().


|
private |
Definition at line 433 of file AutoPilotNode.cpp.
References Localizer::get_latest_position_timepoint(), galaxis::utils::log_debug(), m_autopilot, AutoPilot::m_decision, AutoPilot::m_localizer, Decision::update_starttargetline(), and Decision::update_stopline().
Referenced by AutoPilotNode().


|
private |
|
private |
Definition at line 282 of file AutoPilotNode.cpp.
References Localizer::get_position_timepoint_by_time(), galaxis::utils::MicroStopwatch::get_time(), Localizer::is_empty(), galaxis::utils::log(), galaxis::utils::log_debug(), galaxis::utils::log_error(), galaxis::utils::log_warning(), m_autopilot, m_debugMode, m_lastLaneDetectionUpdate, AutoPilot::m_localizer, AutoPilot::m_mapDataLayer, and MapDataLayer::updateMap().
Referenced by AutoPilotNode(), and lane_detection_shared_memory_loop().


|
private |
Definition at line 324 of file AutoPilotNode.cpp.
References AutoPilot::get_drive_information(), galaxis::utils::MicroStopwatch::get_time(), galaxis::utils::log(), galaxis::utils::log_error(), m_autopilot, m_controllerPublishMtx, m_controllerRefPubSPtr, m_currentDriveInformationSPtr, m_parkingOperationPubSPtr, and m_pathpolynomPubSPtr.
Referenced by controller_reference_publish_loop().


|
private |
Definition at line 736 of file AutoPilotNode.cpp.
References galaxis::utils::MicroStopwatch::get_milliseconds(), MapDataLayer::getLineObject(), map::classes::LinePoints< T >::getPointsXY(), galaxis::autopilot::imageCLinePixelByteIndex, galaxis::autopilot::imageLLinePixelByteIndex, galaxis::autopilot::imageRLinePixelByteIndex, galaxis::utils::log(), galaxis::utils::log_warning(), m_autopilot, m_fullMapDataImageDebugPub, and AutoPilot::m_mapDataLayer.
Referenced by debug_publish_loop().


|
private |
Definition at line 490 of file AutoPilotNode.cpp.
References AutoPilot::eval_poly(), Localizer::get_latest_position_timepoint(), MapDataLayer::getObstacles(), map::classes::LinePoints< T >::getPointsXY(), galaxis::autopilot::imageCLinePixelByteIndex, galaxis::autopilot::imageLLinePixelByteIndex, galaxis::autopilot::imageRLinePixelByteIndex, galaxis::utils::log(), galaxis::utils::log_warning(), galaxis::autopilot::lookupLookBehindCarCM, m_autopilot, m_currentDriveInformationSPtr, AutoPilot::m_laneCentersPairVecUPtr, AutoPilot::m_leftLinePolynomPointsVecSPtr, AutoPilot::m_linesObject, AutoPilot::m_localizer, MapDataLayer::m_lookupWindowSizeCMHeight, MapDataLayer::m_lookupWindowSizeCMWidth, m_mapDataImageDebugPub, AutoPilot::m_mapDataLayer, and AutoPilot::m_rightLinePolynomPointsVecSPtr.
Referenced by debug_publish_loop().


|
private |
Definition at line 39 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), car_pose_publish_loop(), debug_publish_loop(), new_parameters_callback(), on_ecu_measurement_callback(), on_obstacle_callback(), on_parking_state_callback(), on_qr_code_callback(), on_simulation_pose_callback(), on_stop_line_callback(), on_vci_lane_detection_callback(), send_controller_references(), send_full_map_debug_image(), and send_map_debug_image().
|
private |
Definition at line 47 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and debug_publish_loop().
|
private |
Definition at line 45 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and car_pose_publish_loop().
|
private |
Definition at line 67 of file AutoPilotNode.hpp.
Referenced by debug_publish_loop(), and send_controller_references().
|
private |
Definition at line 32 of file AutoPilotNode.hpp.
Referenced by controller_reference_publish_loop(), and new_parameters_callback().
|
private |
Definition at line 44 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and send_controller_references().
|
private |
Definition at line 65 of file AutoPilotNode.hpp.
Referenced by send_controller_references(), and send_map_debug_image().
|
private |
Definition at line 26 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and on_vci_lane_detection_callback().
|
private |
Definition at line 27 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 62 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and send_full_map_debug_image().
|
private |
Definition at line 70 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and lane_detection_shared_memory_loop().
|
private |
Definition at line 61 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and lane_detection_shared_memory_loop().
|
private |
Definition at line 69 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and lane_detection_shared_memory_loop().
|
private |
Definition at line 29 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 37 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and on_vci_lane_detection_callback().
|
private |
Definition at line 35 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and on_parking_state_callback().
|
private |
Definition at line 60 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and send_map_debug_image().
|
private |
Definition at line 50 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 46 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and send_controller_references().
|
private |
Definition at line 43 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and send_controller_references().
|
private |
Definition at line 33 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and car_pose_publish_loop().
|
private |
Definition at line 73 of file AutoPilotNode.hpp.
Referenced by on_qr_code_callback().
|
private |
Definition at line 28 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and debug_publish_loop().
|
private |
Definition at line 30 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and lane_detection_shared_memory_loop().
|
private |
Definition at line 25 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 75 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode(), and new_parameters_callback().
|
private |
Definition at line 51 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 53 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 52 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 56 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 54 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().
|
private |
Definition at line 55 of file AutoPilotNode.hpp.
Referenced by AutoPilotNode().