SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
nav2z_client
nav2z_client
include
nav2z_client
client_behaviors
cb_wait_transform.hpp
Go to the documentation of this file.
1
// Copyright 2021 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
/*****************************************************************************************************************
16
*
17
* Authors: Pablo Inigo Blasco, Brett Aldrich
18
*
19
******************************************************************************************************************/
20
#pragma once
21
22
#include <
nav2z_client/nav2z_client.hpp
>
23
#include <
smacc2/smacc_asynchronous_client_behavior.hpp
>
24
25
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
26
27
#include <tf2/transform_datatypes.h>
28
#include <tf2/utils.h>
29
#include <tf2_ros/buffer.h>
30
#include <tf2_ros/transform_listener.h>
31
32
namespace
cl_nav2z
33
{
34
class
CbWaitTransform
:
public
smacc2::SmaccAsyncClientBehavior
35
{
36
public
:
37
CbWaitTransform
(std::string targetFrame, std::string referenceFrame, rclcpp::Duration timeout);
38
39
virtual
~CbWaitTransform
();
40
41
template
<
typename
TOrthogonal,
typename
TSourceObject>
42
void
onOrthogonalAllocation
()
43
{
44
smacc2::SmaccAsyncClientBehavior::onOrthogonalAllocation<TOrthogonal, TSourceObject>();
45
}
46
47
void
onEntry
()
override
;
48
49
protected
:
50
// shared static listener
51
std::shared_ptr<tf2_ros::Buffer>
tfBuffer_
;
52
std::shared_ptr<tf2_ros::TransformListener>
tfListener_
;
53
54
std::string
targetFrame_
;
55
std::string
referenceFrame_
;
56
rclcpp::Duration
timeout_
;
57
58
std::optional<tf2::Stamped<tf2::Transform>>
result_
;
59
};
60
}
// namespace cl_nav2z
cl_nav2z::CbWaitTransform
Definition
cb_wait_transform.hpp:35
cl_nav2z::CbWaitTransform::tfListener_
std::shared_ptr< tf2_ros::TransformListener > tfListener_
Definition
cb_wait_transform.hpp:52
cl_nav2z::CbWaitTransform::~CbWaitTransform
virtual ~CbWaitTransform()
Definition
cb_wait_transform.cpp:30
cl_nav2z::CbWaitTransform::referenceFrame_
std::string referenceFrame_
Definition
cb_wait_transform.hpp:55
cl_nav2z::CbWaitTransform::tfBuffer_
std::shared_ptr< tf2_ros::Buffer > tfBuffer_
Definition
cb_wait_transform.hpp:51
cl_nav2z::CbWaitTransform::onOrthogonalAllocation
void onOrthogonalAllocation()
Definition
cb_wait_transform.hpp:42
cl_nav2z::CbWaitTransform::onEntry
void onEntry() override
Definition
cb_wait_transform.cpp:32
cl_nav2z::CbWaitTransform::timeout_
rclcpp::Duration timeout_
Definition
cb_wait_transform.hpp:56
cl_nav2z::CbWaitTransform::targetFrame_
std::string targetFrame_
Definition
cb_wait_transform.hpp:54
cl_nav2z::CbWaitTransform::result_
std::optional< tf2::Stamped< tf2::Transform > > result_
Definition
cb_wait_transform.hpp:58
smacc2::SmaccAsyncClientBehavior
Definition
smacc_asynchronous_client_behavior.hpp:56
cl_nav2z
Definition
backward_global_planner.hpp:28
nav2z_client.hpp
smacc_asynchronous_client_behavior.hpp
Generated by
1.9.8