SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
cl_rgb
include
cl_rgb
components
cp_transforms.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 <tf2/LinearMath/Transform.h>
18
#include <tf2_ros/buffer.h>
19
#include <tf2_ros/transform_listener.h>
20
#include <rclcpp/rclcpp.hpp>
21
#include <
smacc2/smacc.hpp
>
22
23
#include <memory>
24
#include <optional>
25
#include <string>
26
27
namespace
cl_rgb
28
{
29
30
// The transform tree, shared by the cameras of the client.
31
class
CpTransforms
:
public
smacc2::ISmaccComponent
32
{
33
public
:
34
CpTransforms
();
35
~CpTransforms
()
override
;
36
37
void
onInitialize
()
override
;
38
39
// pose of the source frame in the target frame at the given time; nothing when not known
40
std::optional<tf2::Transform>
lookup
(
41
const
std::string & targetFrame,
const
std::string & sourceFrame,
42
const
rclcpp::Time & stamp)
const
;
43
44
private
:
45
std::shared_ptr<tf2_ros::Buffer>
buffer_
;
46
std::shared_ptr<tf2_ros::TransformListener>
listener_
;
47
};
48
49
}
// namespace cl_rgb
cl_rgb::CpTransforms
Definition
cp_transforms.hpp:32
cl_rgb::CpTransforms::lookup
std::optional< tf2::Transform > lookup(const std::string &targetFrame, const std::string &sourceFrame, const rclcpp::Time &stamp) const
Definition
cp_transforms.cpp:34
cl_rgb::CpTransforms::CpTransforms
CpTransforms()
Definition
cp_transforms.cpp:22
cl_rgb::CpTransforms::~CpTransforms
~CpTransforms() override
Definition
cp_transforms.cpp:24
cl_rgb::CpTransforms::buffer_
std::shared_ptr< tf2_ros::Buffer > buffer_
Definition
cp_transforms.hpp:45
cl_rgb::CpTransforms::onInitialize
void onInitialize() override
Definition
cp_transforms.cpp:26
cl_rgb::CpTransforms::listener_
std::shared_ptr< tf2_ros::TransformListener > listener_
Definition
cp_transforms.hpp:46
smacc2::ISmaccComponent
Definition
component.hpp:30
cl_rgb
Definition
box_fit.hpp:25
smacc.hpp
Generated by
1.12.0