SMACC2
Loading...
Searching...
No Matches
cb_nav2z_client_behavior_base.cpp
Go to the documentation of this file.
1// Copyright 2025 Robosoft Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*****************************************************************************************************************
16 *
17 * Authors: Pablo Inigo Blasco, Brett Aldrich
18 *
19 ******************************************************************************************************************/
20
22#include <cl_nav2z/common.hpp>
23
24namespace cl_nav2z
25{
27
28void CbNav2ZClientBehaviorBase::onActionSuccess(const WrappedResult & r)
29{
30 navigationResult_ = r.code;
31 actionResult_ = r.code;
33}
34
35void CbNav2ZClientBehaviorBase::onActionAbort(const WrappedResult & r)
36{
37 navigationResult_ = r.code;
38 actionResult_ = r.code;
40}
41
44{
45 RCLCPP_INFO(getLogger(), "[%s] Propagating success event from action server", getName().c_str());
46 this->postSuccessEvent();
47}
48
51{
52 RCLCPP_INFO(getLogger(), "[%s] Propagating failure event from action server", getName().c_str());
53 this->postFailureEvent();
54}
55
56} // namespace cl_nav2z
virtual void onNavigationActionAbort(const components::CpNav2ActionInterface::WrappedResult &)
virtual void onNavigationActionSuccess(const components::CpNav2ActionInterface::WrappedResult &)
void onActionSuccess(const WrappedResult &result) override
void onActionAbort(const WrappedResult &result) override
virtual rclcpp::Logger getLogger() const