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"
6 
8  protected:
9  std::shared_ptr<ros::NodeHandle> nh_;
10  std::unique_ptr<Abstract_robot_element> next_;
11 
12 
13  public:
14  Abstract_robot_element_decorator(std::unique_ptr<Abstract_robot_element> next)
15  : Abstract_robot_element(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(0,0,0)), "Blanc", tf2::Vector3(0,0,0))
16  , next_(std::move(next)){};
17 
18  inline Abstract_robot_element* next(){return next_.get();}
19 
20  std::vector<tf2::Transform>& bounds() override {return next_->bounds();}
21  tf2::Transform& world_tf() override {return next_->world_tf();}
22  std::string& name() override {return next_->name();}
23  tf2::Vector3& size() override {return next_->size();}
24 
25 
26  virtual void input_filter()=0;
27  void update(tf2::Transform& tf) override {next_->update(tf);}
28  virtual void output_filter()=0;
29 };
30 
31 
32 #endif
abstract_robot_element.h
Abstract_robot_element_decorator::nh_
std::shared_ptr< ros::NodeHandle > nh_
Definition: robot_element/decorators/abstract_robot_element_decorator.h:9
Abstract_robot_element::name
virtual std::string & name()=0
Abstract_robot_element_decorator::output_filter
virtual void output_filter()=0
Abstract_robot_element_decorator
Definition: impl/abstract_robot_element_decorator.h:7
Abstract_robot_element_decorator::bounds
std::vector< tf2::Transform > & bounds() override
Definition: robot_element/decorators/abstract_robot_element_decorator.h:20
Abstract_robot_element::bounds
virtual std::vector< tf2::Transform > & bounds()=0
Abstract_robot_element::size
virtual tf2::Vector3 & size()=0
Abstract_robot_element_decorator::next
Abstract_robot_element * next()
Definition: robot_element/decorators/abstract_robot_element_decorator.h:18
Abstract_robot_element_decorator::update
void update(tf2::Transform &tf) override
Definition: robot_element/decorators/abstract_robot_element_decorator.h:27
Abstract_robot_element_decorator::Abstract_robot_element_decorator
Abstract_robot_element_decorator(std::unique_ptr< Abstract_robot_element > next)
Definition: robot_element/decorators/abstract_robot_element_decorator.h:14
Abstract_robot_element_decorator::name
std::string & name() override
Definition: robot_element/decorators/abstract_robot_element_decorator.h:22
Abstract_robot_element_decorator::world_tf
tf2::Transform & world_tf() override
Definition: robot_element/decorators/abstract_robot_element_decorator.h:21
Abstract_robot_element
Definition: impl/abstract_robot_element.h:9
Abstract_robot_element_decorator::next_
Abstract_robot_element * next_
Definition: impl/abstract_robot_element_decorator.h:9
Abstract_robot_element_decorator::size
tf2::Vector3 & size() override
Definition: robot_element/decorators/abstract_robot_element_decorator.h:23
Abstract_robot_element::world_tf
tf2::Transform & world_tf()
Definition: impl/abstract_robot_element.h:21
Abstract_robot_element_decorator::input_filter
virtual void input_filter()=0
Abstract_robot_element::update
virtual void update(tf2::Transform &tf)=0
Abstract_robot_element_decorator::next_
std::unique_ptr< Abstract_robot_element > next_
Definition: robot_element/decorators/abstract_robot_element_decorator.h:10


multi_cell_builder
Author(s): MA
autogenerated on Thu Jan 12 2023 23:45:43