impl/abstract_robot_element.h
Go to the documentation of this file.
1 #ifndef ABSTRACT_ROBOT_ELEMENT_
2 #define ABSTRACT_ROBOT_ELEMENT_
3 
4 #include "ros/ros.h"
5 #include <tf2/LinearMath/Transform.h>
6 #include "visualization_msgs/MarkerArray.h"
7 
8 
10  protected:
11  tf2::Transform relative_tf_;
12  tf2::Transform world_tf_;
13 
14  public:
15  Abstract_robot_element() = default;
16 
17  inline void set_relative_tf(tf2::Transform tf) { relative_tf_= tf;}
18  inline tf2::Transform& relative_tf(){ return relative_tf_;}
19  inline void calc_world_tf(tf2::Transform& tf) {world_tf_= tf * relative_tf_;}
20  inline void set_world_tf(tf2::Transform& tf) { world_tf_ = tf;}
21  inline tf2::Transform& world_tf() { return world_tf_;}
22 
23  virtual void update(tf2::Transform& tf)= 0;
24 };
25 
26 
27 #endif
Abstract_robot_element::set_world_tf
void set_world_tf(tf2::Transform &tf)
Definition: impl/abstract_robot_element.h:20
Abstract_robot_element::relative_tf_
tf2::Transform relative_tf_
Definition: impl/abstract_robot_element.h:11
Abstract_robot_element::Abstract_robot_element
Abstract_robot_element()=default
Abstract_robot_element::world_tf_
tf2::Transform world_tf_
Definition: impl/abstract_robot_element.h:12
Abstract_robot_element::calc_world_tf
void calc_world_tf(tf2::Transform &tf)
Definition: impl/abstract_robot_element.h:19
Abstract_robot_element
Definition: impl/abstract_robot_element.h:9
Abstract_robot_element::set_relative_tf
void set_relative_tf(tf2::Transform tf)
Definition: impl/abstract_robot_element.h:17
Abstract_robot_element::relative_tf
tf2::Transform & relative_tf()
Definition: impl/abstract_robot_element.h:18
Abstract_robot_element::world_tf
tf2::Transform & world_tf()
Definition: impl/abstract_robot_element.h:21
Abstract_robot_element::update
virtual void update(tf2::Transform &tf)=0


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