#include <cp_goal_checker.hpp>
|
| template<typename TOrthogonal , typename TClient > |
| void | onComponentInitialization () |
| |
| template<typename EventType > |
| void | postEvent (const EventType &ev) |
| |
| template<typename EventType > |
| void | postEvent () |
| |
| template<typename TOrthogonal , typename TSourceObject > |
| void | onStateOrthogonalAllocation () |
| |
| template<typename TComponent > |
| void | requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| |
| template<typename TComponent > |
| void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| |
| template<typename TClient > |
| void | requiresClient (TClient *&requiredClientStorage) |
| |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> |
| SmaccComponentType * | createSiblingComponent (TArgs... targs) |
| |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> |
| SmaccComponentType * | createSiblingNamedComponent (std::string name, TArgs... targs) |
| |
| rclcpp::Node::SharedPtr | getNode () |
| |
| rclcpp::Logger | getLogger () const |
| |
| ISmaccStateMachine * | getStateMachine () |
| |
| ISmaccStateMachine * | stateMachine_ |
| |
| ISmaccClient * | owner_ |
| |
Definition at line 25 of file cp_goal_checker.hpp.
◆ CpGoalChecker()
| cl_px4_mr::CpGoalChecker::CpGoalChecker |
( |
| ) |
|
◆ ~CpGoalChecker()
| cl_px4_mr::CpGoalChecker::~CpGoalChecker |
( |
| ) |
|
|
virtual |
◆ clearGoal()
| void cl_px4_mr::CpGoalChecker::clearGoal |
( |
| ) |
|
◆ isGoalActive()
| bool cl_px4_mr::CpGoalChecker::isGoalActive |
( |
| ) |
const |
◆ onInitialize()
| void cl_px4_mr::CpGoalChecker::onInitialize |
( |
| ) |
|
|
overridevirtual |
◆ setGoal()
| void cl_px4_mr::CpGoalChecker::setGoal |
( |
float | x, |
|
|
float | y, |
|
|
float | z, |
|
|
float | xy_tolerance = 0.5f, |
|
|
float | z_tolerance = 0.3f ) |
Definition at line 50 of file cp_goal_checker.cpp.
51{
58 RCLCPP_INFO(
59 getLogger(),
"CpGoalChecker: goal set [%.2f, %.2f, %.2f] tol(xy=%.2f z=%.2f)", x, y, z,
60 xy_tolerance, z_tolerance);
61}
References smacc2::ISmaccComponent::getLogger(), goalActive_, goalX_, goalY_, goalZ_, xyTolerance_, and zTolerance_.
Referenced by cl_px4_mr::CbGoToLocation::onEntry(), and cl_px4_mr::CbTakeOff::onEntry().
◆ update()
| void cl_px4_mr::CpGoalChecker::update |
( |
| ) |
|
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 31 of file cp_goal_checker.cpp.
32{
34
38 float xyDist = std::sqrt(dx * dx + dy * dy);
39 float zDist = std::abs(dz);
40
42 {
43 RCLCPP_INFO(
44 getLogger(),
"CpGoalChecker: GOAL REACHED (xy_dist=%.2f z_dist=%.2f)", xyDist, zDist);
47 }
48}
smacc2::SmaccSignal< void()> onGoalReached_
References smacc2::ISmaccComponent::getLogger(), cl_px4_mr::CpVehicleLocalPosition::getX(), cl_px4_mr::CpVehicleLocalPosition::getY(), cl_px4_mr::CpVehicleLocalPosition::getZ(), goalActive_, goalX_, goalY_, goalZ_, cl_px4_mr::CpVehicleLocalPosition::isValid(), localPosition_, onGoalReached_, xyTolerance_, and zTolerance_.
◆ goalActive_
| bool cl_px4_mr::CpGoalChecker::goalActive_ = false |
|
private |
◆ goalX_
| float cl_px4_mr::CpGoalChecker::goalX_ = 0.0f |
|
private |
◆ goalY_
| float cl_px4_mr::CpGoalChecker::goalY_ = 0.0f |
|
private |
◆ goalZ_
| float cl_px4_mr::CpGoalChecker::goalZ_ = 0.0f |
|
private |
◆ localPosition_
◆ onGoalReached_
◆ xyTolerance_
| float cl_px4_mr::CpGoalChecker::xyTolerance_ = 0.5f |
|
private |
◆ zTolerance_
| float cl_px4_mr::CpGoalChecker::zTolerance_ = 0.3f |
|
private |
The documentation for this class was generated from the following files: