1 #ifndef ABSTRACT_ROBOT_
2 #define ABSTRACT_ROBOT_
5 #include <tf2/LinearMath/Transform.h>
37 virtual std::string&
name()=0;
38 virtual tf2::Transform&
tf()=0;
39 virtual tf2::Vector3&
size()=0;
40 virtual tf2::Transform&
rootTf()=0;
41 virtual std::vector<tf2::Transform>&
bounds()=0;
48 inline void setTf(tf2::Transform& t) {
tf_ = t;}
49 inline void rotate(
float deg) {tf2::Quaternion rot; rot.setRPY(0,0,deg); tf2::Transform t(rot, tf2::Vector3(0,0,0));
tf_=
tf_* t;}
50 inline void translate(tf2::Vector3 t) {tf2::Transform
tf(tf2::Quaternion(0,0,0,1), t);
tf_*=
tf;}
61 float areaCalculation(tf2::Transform& A, tf2::Transform& B, tf2::Transform& C);