include
robot_element
decorators
abstract_robot_element_decorator.h
Go to the documentation of this file.
1
#ifndef ABSTRACT_ROBOT_ELEMENT_DECORATOR_
2
#define ABSTRACT_ROBOT_ELEMENT_DECORATOR_
3
4
#include "ros/ros.h"
5
#include "
robot_element/abstract_robot_element.h
"
6
7
class
AbstractRobotElementDecorator
:
public
AbstractRobotElement
{
8
protected
:
9
std::shared_ptr<ros::NodeHandle>
nh_
;
10
std::unique_ptr<AbstractRobotElement>
next_
;
11
12
public
:
13
AbstractRobotElementDecorator
(std::unique_ptr<AbstractRobotElement>
next
)
14
:
AbstractRobotElement
(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(0,0,0)),
"Blanc"
, tf2::Vector3(0,0,0))
15
,
next_
(std::move(
next
)){};
16
17
inline
AbstractRobotElement
*
next
(){
return
next_
.get();}
18
19
std::vector<tf2::Transform>&
bounds
()
override
{
return
next_
->bounds();}
20
tf2::Transform&
worldTf
()
override
{
return
next_
->worldTf();}
21
std::string&
name
()
override
{
return
next_
->name();}
22
tf2::Vector3&
size
()
override
{
return
next_
->size();}
23
24
25
virtual
void
inputFilter
()=0;
26
void
update
(tf2::Transform& tf)
override
{
next_
->update(tf);}
27
virtual
void
outputFilter
()=0;
28
};
29
30
31
#endif
AbstractRobotElement
Definition:
abstract_robot_element.h:7
AbstractRobotElementDecorator::bounds
std::vector< tf2::Transform > & bounds() override
Definition:
abstract_robot_element_decorator.h:19
AbstractRobotElementDecorator::outputFilter
virtual void outputFilter()=0
AbstractRobotElementDecorator::update
void update(tf2::Transform &tf) override
Definition:
abstract_robot_element_decorator.h:26
AbstractRobotElementDecorator::AbstractRobotElementDecorator
AbstractRobotElementDecorator(std::unique_ptr< AbstractRobotElement > next)
Definition:
abstract_robot_element_decorator.h:13
AbstractRobotElementDecorator::name
std::string & name() override
Definition:
abstract_robot_element_decorator.h:21
AbstractRobotElementDecorator::nh_
std::shared_ptr< ros::NodeHandle > nh_
Definition:
abstract_robot_element_decorator.h:9
AbstractRobotElementDecorator::size
tf2::Vector3 & size() override
Definition:
abstract_robot_element_decorator.h:22
AbstractRobotElementDecorator::worldTf
tf2::Transform & worldTf() override
Definition:
abstract_robot_element_decorator.h:20
AbstractRobotElementDecorator::inputFilter
virtual void inputFilter()=0
AbstractRobotElementDecorator::next
AbstractRobotElement * next()
Definition:
abstract_robot_element_decorator.h:17
AbstractRobotElementDecorator
Definition:
abstract_robot_element_decorator.h:7
AbstractRobotElementDecorator::next_
std::unique_ptr< AbstractRobotElement > next_
Definition:
abstract_robot_element_decorator.h:10
abstract_robot_element.h
multi_cell_builder
Author(s): Matteo Anedda
autogenerated on Sun Apr 9 2023 23:59:51