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

Public Member Functions | |
| TwoAndAHalfCarrots (std::shared_ptr< std::vector< float >> const p_yawStepsSPtr, float p_horizonStepTimeSec=0.5, int p_horizon=2, int p_errorAccuracyStepsPerHorizon=4, float p_carWheelbase=0.205f, float p_errorIncraseFactor=3) | |
| void | set_horizon (int p_horizon) |
| bool | set_horizon_step_time (float valueSec) |
| bool | set_error_factor_first_horizon (float factor) |
| bool | set_error_accuracy_steps_per_horizon (int value) |
| void | set_cross_angle_error_weight (float val) |
| void | set_cross_line_marking_error_weight (float val) |
| float | calculate_best_yaw_rate (std::shared_ptr< PolySpline > p_referenceTrajectorySPtr, std::shared_ptr< line_markings_reference_t > p_lineMarkings, float p_currentVelocity, CarPose p_pose=CarPose()) |
| std::shared_ptr< CarPoseSeries > | get_pose_series (std::shared_ptr< CarPose > const p_currentPoseSPtr, float p_distance, float p_yawRate, int p_steps) |
| std::shared_ptr< CarPoseSeries const > | get_last_first_poseseries () const |
| std::shared_ptr< CarPoseSeries const > | get_last_second_poseseries () const |
| float | get_last_best_yaw_rate () const |
Private Attributes | |
| int | m_horizon |
| int | m_errorAccuracyStepsPerHorizon |
| const std::shared_ptr< std::vector< float > > | m_yawStepsSPtr |
| float | m_crossAngleErrorWeight = 0 |
| float | m_crossLineMarkingErrorWeight = 0 |
| float | m_carWheelbase = 0.205f |
| float | m_errorIncraseFactor = 5 |
| float | m_lastYawRate = 0 |
| float | m_currentVelocity = 0 |
| float | m_horizonStepTimeSec = 0.5f |
| MicroStopwatch | m_debugStopwatch |
| std::shared_ptr< CarPoseSeries > | m_lastFirstPoseSeries |
| std::shared_ptr< CarPoseSeries > | m_lastSecondPoseSeries |
Definition at line 28 of file control.hpp.
| TwoAndAHalfCarrots::TwoAndAHalfCarrots | ( | std::shared_ptr< std::vector< float >> const | p_yawStepsSPtr, |
| float | p_horizonStepTimeSec = 0.5, |
||
| int | p_horizon = 2, |
||
| int | p_errorAccuracyStepsPerHorizon = 4, |
||
| float | p_carWheelbase = 0.205f, |
||
| float | p_errorIncraseFactor = 3 |
||
| ) |
Definition at line 19 of file control.cpp.
References m_carWheelbase, m_errorAccuracyStepsPerHorizon, m_errorIncraseFactor, m_horizonStepTimeSec, and set_horizon().

| float TwoAndAHalfCarrots::calculate_best_yaw_rate | ( | std::shared_ptr< PolySpline > | p_referenceTrajectorySPtr, |
| std::shared_ptr< line_markings_reference_t > | p_lineMarkings, | ||
| float | p_currentVelocity, | ||
| CarPose | p_pose = CarPose() |
||
| ) |
Definition at line 76 of file control.cpp.
References galaxis::calculate_error_between_polyspline_poseseries(), get_pose_series(), galaxis::utils::MicroStopwatch::get_time(), galaxis::utils::log(), galaxis::utils::log_warning(), m_crossAngleErrorWeight, m_crossLineMarkingErrorWeight, m_currentVelocity, m_debugStopwatch, m_errorAccuracyStepsPerHorizon, m_errorIncraseFactor, m_horizonStepTimeSec, m_lastFirstPoseSeries, m_lastSecondPoseSeries, m_lastYawRate, m_yawStepsSPtr, and galaxis::utils::MicroStopwatch::start().

| float TwoAndAHalfCarrots::get_last_best_yaw_rate | ( | ) | const |
Definition at line 154 of file control.cpp.
References m_lastYawRate.
| std::shared_ptr< CarPoseSeries const > TwoAndAHalfCarrots::get_last_first_poseseries | ( | ) | const |
Definition at line 140 of file control.cpp.
References galaxis::utils::log_warning(), and m_lastFirstPoseSeries.

| std::shared_ptr< CarPoseSeries const > TwoAndAHalfCarrots::get_last_second_poseseries | ( | ) | const |
Definition at line 147 of file control.cpp.
References galaxis::utils::log_warning(), and m_lastSecondPoseSeries.

| std::shared_ptr< CarPoseSeries > TwoAndAHalfCarrots::get_pose_series | ( | std::shared_ptr< CarPose > const | p_currentPoseSPtr, |
| float | p_distance, | ||
| float | p_yawRate, | ||
| int | p_steps | ||
| ) |
Definition at line 123 of file control.cpp.
References galaxis::control::get_new_pose(), galaxis::utils::log_error(), and m_carWheelbase.
Referenced by calculate_best_yaw_rate().


| void TwoAndAHalfCarrots::set_cross_angle_error_weight | ( | float | val | ) |
Definition at line 158 of file control.cpp.
References m_crossAngleErrorWeight.
| void TwoAndAHalfCarrots::set_cross_line_marking_error_weight | ( | float | val | ) |
Definition at line 161 of file control.cpp.
References m_crossLineMarkingErrorWeight.
| bool TwoAndAHalfCarrots::set_error_accuracy_steps_per_horizon | ( | int | value | ) |
| bool TwoAndAHalfCarrots::set_error_factor_first_horizon | ( | float | factor | ) |
Definition at line 57 of file control.cpp.
References m_errorIncraseFactor.
| void TwoAndAHalfCarrots::set_horizon | ( | int | p_horizon | ) |
Definition at line 36 of file control.cpp.
References galaxis::utils::log_error(), galaxis::utils::log_warning(), and m_horizon.
Referenced by TwoAndAHalfCarrots().


| bool TwoAndAHalfCarrots::set_horizon_step_time | ( | float | valueSec | ) |
|
private |
Definition at line 37 of file control.hpp.
Referenced by get_pose_series(), and TwoAndAHalfCarrots().
|
private |
Definition at line 34 of file control.hpp.
Referenced by calculate_best_yaw_rate(), and set_cross_angle_error_weight().
|
private |
Definition at line 35 of file control.hpp.
Referenced by calculate_best_yaw_rate(), and set_cross_line_marking_error_weight().
|
private |
Definition at line 41 of file control.hpp.
Referenced by calculate_best_yaw_rate().
|
private |
Definition at line 45 of file control.hpp.
Referenced by calculate_best_yaw_rate().
|
private |
Definition at line 31 of file control.hpp.
Referenced by calculate_best_yaw_rate(), set_error_accuracy_steps_per_horizon(), and TwoAndAHalfCarrots().
|
private |
Definition at line 38 of file control.hpp.
Referenced by calculate_best_yaw_rate(), set_error_factor_first_horizon(), and TwoAndAHalfCarrots().
|
private |
Definition at line 30 of file control.hpp.
Referenced by set_horizon().
|
private |
Definition at line 42 of file control.hpp.
Referenced by calculate_best_yaw_rate(), set_horizon_step_time(), and TwoAndAHalfCarrots().
|
private |
Definition at line 46 of file control.hpp.
Referenced by calculate_best_yaw_rate(), and get_last_first_poseseries().
|
private |
Definition at line 47 of file control.hpp.
Referenced by calculate_best_yaw_rate(), and get_last_second_poseseries().
|
private |
Definition at line 40 of file control.hpp.
Referenced by calculate_best_yaw_rate(), and get_last_best_yaw_rate().
|
private |
Definition at line 32 of file control.hpp.
Referenced by calculate_best_yaw_rate().