SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
cl_nav2z
cl_nav2z
include
cl_nav2z
client_behaviors
cb_dock_robot.hpp
Go to the documentation of this file.
1
// Copyright 2026 RobosoftAI 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
#pragma once
16
17
#include <string>
18
19
#include <geometry_msgs/msg/pose_stamped.hpp>
20
#include <nav2_msgs/action/dock_robot.hpp>
21
#include <
smacc2/client_behavior_bases/cb_action_client_behavior_base.hpp
>
22
23
namespace
cl_nav2z
24
{
25
26
// Dock the robot via the Nav2 docking server (opennav_docking): navigate to
27
// the dock's staging pose, detect the dock, drive in, and confirm charging.
28
// Requires the docking server running with a dock database (dock-id form) or
29
// a detectable dock at the given pose (dock-pose form).
30
class
CbDockRobot
31
:
public
smacc2::client_behavior_bases::CbActionClientBehaviorBase
<nav2_msgs::action::DockRobot>
32
{
33
public
:
34
// dock at a named dock from the server's dock database
35
explicit
CbDockRobot
(std::string dockId);
36
37
// dock at an explicit pose; dockType selects the dock plugin when the
38
// server has several configured
39
CbDockRobot
(geometry_msgs::msg::PoseStamped dockPose, std::string dockType =
""
);
40
41
void
onEntry
()
override
;
42
43
private
:
44
bool
useDockId_
;
45
std::string
dockId_
;
46
geometry_msgs::msg::PoseStamped
dockPose_
;
47
std::string
dockType_
;
48
};
49
50
}
// namespace cl_nav2z
cb_action_client_behavior_base.hpp
cl_nav2z::CbDockRobot
Definition
cb_dock_robot.hpp:32
cl_nav2z::CbDockRobot::dockPose_
geometry_msgs::msg::PoseStamped dockPose_
Definition
cb_dock_robot.hpp:46
cl_nav2z::CbDockRobot::useDockId_
bool useDockId_
Definition
cb_dock_robot.hpp:44
cl_nav2z::CbDockRobot::CbDockRobot
CbDockRobot(std::string dockId)
Definition
cb_dock_robot.cpp:20
cl_nav2z::CbDockRobot::dockType_
std::string dockType_
Definition
cb_dock_robot.hpp:47
cl_nav2z::CbDockRobot::onEntry
void onEntry() override
Definition
cb_dock_robot.cpp:27
cl_nav2z::CbDockRobot::dockId_
std::string dockId_
Definition
cb_dock_robot.hpp:45
smacc2::client_behavior_bases::CbActionClientBehaviorBase
Definition
cb_action_client_behavior_base.hpp:52
cl_nav2z
Definition
cl_nav2z.hpp:23
Generated by
1.12.0