include
robot_element
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
7
class
AbstractRobotElement
{
8
protected
:
9
std::string
name_
;
10
tf2::Transform
relative_tf_
;
11
tf2::Transform
world_tf_
;
12
tf2::Vector3
size_
;
13
14
std::vector<tf2::Transform>
bounds_
;
15
16
public
:
17
AbstractRobotElement
(tf2::Transform tf, std::string
name
, tf2::Vector3
size
)
18
:
relative_tf_
(tf)
19
,
name_
(
name
)
20
,
size_
(
size
)
21
,
world_tf_
(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(0,0,0))) {}
22
23
24
inline
tf2::Transform&
relativeTf
(){
return
relative_tf_
;}
25
inline
void
setRelativeTf
(tf2::Transform tf) {
relative_tf_
= tf;}
26
27
inline
void
calcWorldTf
(tf2::Transform& tf) {
world_tf_
= tf *
relative_tf_
;}
28
inline
void
setWorldTf
(tf2::Transform& tf) {
world_tf_
= tf;}
29
30
31
virtual
std::vector<tf2::Transform>&
bounds
()=0;
32
virtual
tf2::Transform&
worldTf
()=0;
33
virtual
tf2::Vector3&
size
()=0;
34
virtual
std::string&
name
()=0;
35
36
37
virtual
void
update
(tf2::Transform& tf)= 0;
38
};
39
40
41
#endif
AbstractRobotElement::name_
std::string name_
Definition:
abstract_robot_element.h:9
AbstractRobotElement
Definition:
abstract_robot_element.h:7
AbstractRobotElement::relative_tf_
tf2::Transform relative_tf_
Definition:
abstract_robot_element.h:10
AbstractRobotElement::bounds_
std::vector< tf2::Transform > bounds_
Definition:
abstract_robot_element.h:14
AbstractRobotElement::size
virtual tf2::Vector3 & size()=0
AbstractRobotElement::setWorldTf
void setWorldTf(tf2::Transform &tf)
Definition:
abstract_robot_element.h:28
AbstractRobotElement::world_tf_
tf2::Transform world_tf_
Definition:
abstract_robot_element.h:11
AbstractRobotElement::worldTf
virtual tf2::Transform & worldTf()=0
AbstractRobotElement::AbstractRobotElement
AbstractRobotElement(tf2::Transform tf, std::string name, tf2::Vector3 size)
Definition:
abstract_robot_element.h:17
AbstractRobotElement::setRelativeTf
void setRelativeTf(tf2::Transform tf)
Definition:
abstract_robot_element.h:25
AbstractRobotElement::relativeTf
tf2::Transform & relativeTf()
Definition:
abstract_robot_element.h:24
AbstractRobotElement::calcWorldTf
void calcWorldTf(tf2::Transform &tf)
Definition:
abstract_robot_element.h:27
AbstractRobotElement::update
virtual void update(tf2::Transform &tf)=0
AbstractRobotElement::bounds
virtual std::vector< tf2::Transform > & bounds()=0
AbstractRobotElement::name
virtual std::string & name()=0
AbstractRobotElement::size_
tf2::Vector3 size_
Definition:
abstract_robot_element.h:12
multi_cell_builder
Author(s): Matteo Anedda
autogenerated on Sun Apr 9 2023 23:59:51