|
SMACC2
|
#include <cb_px4_client_behavior_base.hpp>


Public Member Functions | |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| virtual | ~CbPx4ClientBehaviorBase () |
| void | setTimeout (std::chrono::milliseconds timeout) |
| bool | hasTimeout () const |
| void | update () override |
Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| virtual | ~SmaccAsyncClientBehavior () |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onSuccess (TCallback callback, T *object) |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onFinished (TCallback callback, T *object) |
| template<typename TCallback , typename T > | |
| smacc2::SmaccSignalConnection | onFailure (TCallback callback, T *object) |
| void | requestForceFinish () |
| void | executeOnEntry () override |
| void | executeOnExit () override |
| void | waitOnEntryThread (bool requestFinish) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onSuccess (TCallbackMethod callback, T *object) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onFinished (TCallbackMethod callback, T *object) |
| template<typename TCallbackMethod , typename T > | |
| smacc2::SmaccSignalConnection | onFailure (TCallbackMethod callback, T *object) |
Public Member Functions inherited from smacc2::ISmaccClientBehavior | |
| ISmaccClientBehavior () | |
| virtual | ~ISmaccClientBehavior () |
| ISmaccStateMachine * | getStateMachine () |
| std::string | getName () const |
| template<typename SmaccClientType > | |
| void | requiresClient (SmaccClientType *&storage) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (std::string name, SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| virtual void | onEntry () |
| virtual void | onExit () |
Public Member Functions inherited from smacc2::ISmaccUpdatable | |
| ISmaccUpdatable () | |
| ISmaccUpdatable (rclcpp::Duration duration) | |
| void | executeUpdate (rclcpp::Node::SharedPtr node) |
| void | setUpdatePeriod (rclcpp::Duration duration) |
Protected Member Functions | |
| virtual void | wireCompletionSignals () |
| void | postPx4Success () |
| void | postPx4Failure () |
Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
| void | postSuccessEvent () |
| void | postFailureEvent () |
| virtual void | dispose () override |
| bool | isShutdownRequested () |
| onEntry is executed in a new thread. However the current state cannot be left until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread. | |
Protected Member Functions inherited from smacc2::ISmaccClientBehavior | |
| virtual void | runtimeConfigure () |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
| ISmaccState * | getCurrentState () |
| virtual rclcpp::Node::SharedPtr | getNode () const |
| virtual rclcpp::Logger | getLogger () const |
Protected Member Functions inherited from smacc2::ISmaccUpdatable | |
Protected Attributes | |
| CpVehicleCommand * | vehicleCommand_ = nullptr |
| CpVehicleStatus * | vehicleStatus_ = nullptr |
| CpTrajectorySetpoint * | trajectorySetpoint_ = nullptr |
| CpGoalChecker * | goalChecker_ = nullptr |
| CpVehicleLocalPosition * | localPosition_ = nullptr |
| CpOffboardKeepAlive * | offboardKeepAlive_ = nullptr |
Private Attributes | |
| std::atomic< bool > | completed_ {false} |
| std::atomic< int64_t > | timeoutMs_ {0} |
| std::optional< std::chrono::steady_clock::time_point > | watchdogStart_ |
Definition at line 60 of file cb_px4_client_behavior_base.hpp.
|
inlinevirtual |
Definition at line 80 of file cb_px4_client_behavior_base.hpp.
|
inline |
Definition at line 90 of file cb_px4_client_behavior_base.hpp.
References timeoutMs_.
Referenced by cl_px4_mr::CbPx4PathFollowerBase::onEntry().

|
inline |
Definition at line 65 of file cb_px4_client_behavior_base.hpp.
References goalChecker_, localPosition_, offboardKeepAlive_, smacc2::SmaccAsyncClientBehavior::onStateOrthogonalAllocation(), smacc2::ISmaccClientBehavior::requiresComponent(), smacc2::SOFT, trajectorySetpoint_, vehicleCommand_, vehicleStatus_, and wireCompletionSignals().
Referenced by cl_px4_mr::CbConnectMicroRosAgent::onStateOrthogonalAllocation(), and cl_px4_mr::CbLoadKmlMission::onStateOrthogonalAllocation().


|
inlineprotected |
Definition at line 129 of file cb_px4_client_behavior_base.hpp.
References completed_, and smacc2::SmaccAsyncClientBehavior::postFailureEvent().
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbConnectMicroRosAgent::onEntry(), cl_px4_mr::CbLoadKmlMission::onEntry(), cl_px4_mr::CbPx4PathFollowerBase::onEntry(), cl_px4_mr::CbSineAltitudeCruise::onEntry(), cl_px4_mr::CbYawScan::onEntry(), and update().


|
inlineprotected |
Definition at line 121 of file cb_px4_client_behavior_base.hpp.
References completed_, and smacc2::SmaccAsyncClientBehavior::postSuccessEvent().
Referenced by cl_px4_mr::CbDisarmPX4::onDisarmedCallback(), cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbConnectMicroRosAgent::onEntry(), cl_px4_mr::CbFollowWaypoints::onEntry(), cl_px4_mr::CbLoadKmlMission::onEntry(), cl_px4_mr::CbChangeAltitude::onGoalReachedCallback(), cl_px4_mr::CbFollowWaypoints::onGoalReachedCallback(), cl_px4_mr::CbGoToLocation::onGoalReachedCallback(), cl_px4_mr::CbReturnToHome::onGoalReachedCallback(), cl_px4_mr::CbTakeOff::onGoalReachedCallback(), cl_px4_mr::CbLand::onLandedCallback(), cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbHoldPosition::update(), cl_px4_mr::CbOrbitLocation::update(), cl_px4_mr::CbPx4PathFollowerBase::update(), cl_px4_mr::CbSpiralPattern::update(), and cl_px4_mr::CbYawRotate::update().


|
inline |
Definition at line 87 of file cb_px4_client_behavior_base.hpp.
References timeoutMs_.
Referenced by cl_px4_mr::CbPx4PathFollowerBase::onEntry().

|
inlineoverridevirtual |
Implements smacc2::ISmaccUpdatable.
Reimplemented in cl_px4_mr::CbPx4PathFollowerBase, cl_px4_mr::CbSineAltitudeCruise, cl_px4_mr::CbSpiralPattern, cl_px4_mr::CbYawRotate, and cl_px4_mr::CbYawScan.
Definition at line 92 of file cb_px4_client_behavior_base.hpp.
References completed_, smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), postPx4Failure(), timeoutMs_, and watchdogStart_.
Referenced by cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbHoldPosition::update(), cl_px4_mr::CbOrbitLocation::update(), cl_px4_mr::CbPx4PathFollowerBase::update(), cl_px4_mr::CbSineAltitudeCruise::update(), cl_px4_mr::CbSpiralPattern::update(), cl_px4_mr::CbYawRotate::update(), and cl_px4_mr::CbYawScan::update().


|
inlineprotectedvirtual |
Reimplemented in cl_px4_mr::CbArmPX4, cl_px4_mr::CbChangeAltitude, cl_px4_mr::CbDisarmPX4, cl_px4_mr::CbFollowWaypoints, cl_px4_mr::CbGoToLocation, cl_px4_mr::CbLand, cl_px4_mr::CbReturnToHome, and cl_px4_mr::CbTakeOff.
Definition at line 119 of file cb_px4_client_behavior_base.hpp.
Referenced by onStateOrthogonalAllocation().

|
private |
Definition at line 145 of file cb_px4_client_behavior_base.hpp.
Referenced by postPx4Failure(), postPx4Success(), and update().
|
protected |
Definition at line 140 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbFollowWaypoints::commandCurrentWaypoint(), cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbGoToLocation::onEntry(), cl_px4_mr::CbReturnToHome::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbChangeAltitude::onExit(), cl_px4_mr::CbFollowWaypoints::onExit(), cl_px4_mr::CbGoToLocation::onExit(), cl_px4_mr::CbReturnToHome::onExit(), onStateOrthogonalAllocation(), cl_px4_mr::CbChangeAltitude::wireCompletionSignals(), cl_px4_mr::CbFollowWaypoints::wireCompletionSignals(), cl_px4_mr::CbGoToLocation::wireCompletionSignals(), cl_px4_mr::CbReturnToHome::wireCompletionSignals(), and cl_px4_mr::CbTakeOff::wireCompletionSignals().
|
protected |
Definition at line 141 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbOrbitLocation::onEntry(), cl_px4_mr::CbPx4PathFollowerBase::onEntry(), cl_px4_mr::CbSineAltitudeCruise::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbYawRotate::onEntry(), cl_px4_mr::CbYawScan::onEntry(), onStateOrthogonalAllocation(), cl_px4_mr::CbPx4PathFollowerBase::update(), and cl_px4_mr::CbYawRotate::update().
|
protected |
Definition at line 142 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbLand::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), and onStateOrthogonalAllocation().
|
private |
Definition at line 146 of file cb_px4_client_behavior_base.hpp.
Referenced by hasTimeout(), setTimeout(), and update().
|
protected |
Definition at line 139 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbFollowWaypoints::commandCurrentWaypoint(), cl_px4_mr::CbChangeAltitude::onEntry(), cl_px4_mr::CbFigureEight::onEntry(), cl_px4_mr::CbGoToLocation::onEntry(), cl_px4_mr::CbHoldPosition::onEntry(), cl_px4_mr::CbOrbitLocation::onEntry(), cl_px4_mr::CbPx4PathFollowerBase::onEntry(), cl_px4_mr::CbReturnToHome::onEntry(), cl_px4_mr::CbSineAltitudeCruise::onEntry(), cl_px4_mr::CbSpiralPattern::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), cl_px4_mr::CbYawRotate::onEntry(), cl_px4_mr::CbYawScan::onEntry(), cl_px4_mr::CbPx4PathFollowerBase::onExit(), cl_px4_mr::CbSineAltitudeCruise::onExit(), cl_px4_mr::CbYawScan::onExit(), onStateOrthogonalAllocation(), cl_px4_mr::CbFigureEight::update(), cl_px4_mr::CbOrbitLocation::update(), cl_px4_mr::CbPx4PathFollowerBase::update(), cl_px4_mr::CbSineAltitudeCruise::update(), cl_px4_mr::CbSpiralPattern::update(), and cl_px4_mr::CbYawScan::update().
|
protected |
Definition at line 137 of file cb_px4_client_behavior_base.hpp.
Referenced by cl_px4_mr::CbArmPX4::onEntry(), cl_px4_mr::CbDisarmPX4::onEntry(), cl_px4_mr::CbLand::onEntry(), cl_px4_mr::CbTakeOff::onEntry(), and onStateOrthogonalAllocation().
|
protected |
Definition at line 138 of file cb_px4_client_behavior_base.hpp.
Referenced by onStateOrthogonalAllocation(), cl_px4_mr::CbArmPX4::wireCompletionSignals(), cl_px4_mr::CbDisarmPX4::wireCompletionSignals(), and cl_px4_mr::CbLand::wireCompletionSignals().
|
private |
Definition at line 147 of file cb_px4_client_behavior_base.hpp.
Referenced by update().