robot/abstract_robot.h
Go to the documentation of this file.
1 #ifndef ABSTRACT_ROBOT_
2 #define ABSTRACT_ROBOT_
3 
4 #include "ros/ros.h"
5 #include <tf2/LinearMath/Transform.h>
6 
8 
10  RML = 7,
11  RM_ = 6,
12  R_L = 5,
13  R__ = 4,
14  _ML = 3,
15  _M_ = 2,
16  __L = 1,
17  ___ = 0
18 };
19 
20 class Abstract_robot {
21  protected:
22  std::string name_;
23  tf2::Vector3 size_;
24  tf2::Transform tf_;
25  tf2::Transform root_tf_;
26  std::vector<tf2::Transform> bounds_;
27  std::vector<tf2::Transform> robot_root_bounds_;
28 
29  public:
30  Abstract_robot(std::string name, tf2::Transform tf, tf2::Vector3 size);
31 
32  virtual std::string& name()=0;
33  virtual tf2::Transform& tf()=0;
34  virtual tf2::Vector3& size()=0;
35  virtual tf2::Transform& root_tf()=0;
36  virtual std::vector<tf2::Transform>& bounds()=0;
37  virtual std::vector<tf2::Transform>& robot_root_bounds()=0;
38 
39  inline void size(tf2::Vector3& s) { size_ = s;}
40  inline void set_tf(tf2::Transform& t) { tf_ = t;}
41  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;}
42  inline void translate(tf2::Vector3 t) {tf2::Transform tf(tf2::Quaternion(0,0,0,1), t); tf_*=tf;}
43  virtual void notify()= 0;
44  virtual bool check_single_object_collision(tf2::Transform& obj, std::string& b)= 0;
45  virtual void workload_checker(std::vector<int>& count_vector, tf2::Transform& obj) =0;
46 
48 
55  float area_calculation(tf2::Transform& A, tf2::Transform& B, tf2::Transform& C);
56 
57 };
58 
59 
60 #endif
abstract_robot_element.h
R_L
@ R_L
Definition: robot/abstract_robot.h:12
Abstract_robot::notify
virtual void notify()=0
_ML
@ _ML
Definition: robot/abstract_robot.h:14
Abstract_robot::root_tf_
tf2::Transform root_tf_
Robot root on table top.
Definition: impl/abstract_robot.h:30
Abstract_robot::rotate
void rotate(float deg)
Definition: robot/abstract_robot.h:41
___
@ ___
Definition: robot/abstract_robot.h:17
Abstract_robot::check_single_object_collision
virtual bool check_single_object_collision(tf2::Transform &obj, std::string &b)=0
Abstract_robot::root_tf
tf2::Transform & root_tf()
Definition: impl/abstract_robot.h:60
__L
@ __L
Definition: robot/abstract_robot.h:16
Abstract_robot::area_calculation
float area_calculation(tf2::Transform &A, tf2::Transform &B, tf2::Transform &C)
Triangle area calculator.
Definition: abstract_robot.cpp:22
Abstract_robot::size
void size(tf2::Vector3 &s)
Definition: robot/abstract_robot.h:39
Abstract_robot::workload_checker
virtual void workload_checker(std::vector< int > &count_vector, tf2::Transform &obj)=0
Abstract_robot::set_tf
void set_tf(tf2::Transform &t)
Definition: robot/abstract_robot.h:40
Abstract_robot::bounds_
std::vector< tf2::Transform > bounds_
Bounds of table top surface.
Definition: impl/abstract_robot.h:31
Abstract_robot::translate
void translate(tf2::Vector3 t)
Definition: robot/abstract_robot.h:42
_M_
@ _M_
Definition: robot/abstract_robot.h:15
Abstract_robot::tf_
tf2::Transform tf_
Pose of table.
Definition: impl/abstract_robot.h:29
Abstract_robot::name
std::string & name()
Definition: impl/abstract_robot.h:57
Abstract_robot::size
tf2::Vector3 & size()
Definition: impl/abstract_robot.h:59
RM_
@ RM_
Definition: robot/abstract_robot.h:11
Abstract_robot::Abstract_robot
Abstract_robot(std::string &name, tf2::Transform tf, tf2::Vector3 size)
Definition: impl/abstract_robot.h:38
RML
@ RML
Definition: robot/abstract_robot.h:10
Abstract_robot::tf
tf2::Transform & tf()
Definition: impl/abstract_robot.h:58
Abstract_robot::name_
std::string name_
Name of robot.
Definition: impl/abstract_robot.h:27
Abstract_robot::size_
tf2::Vector3 size_
Size of table.
Definition: impl/abstract_robot.h:28
Abstract_robot::bounds
std::vector< tf2::Transform > & bounds()
Definition: impl/abstract_robot.h:61
Abstract_robot::robot_root_bounds
std::vector< tf2::Transform > & robot_root_bounds()
Definition: impl/abstract_robot.h:64
R__
@ R__
Definition: robot/abstract_robot.h:13
wing_config
wing_config
Definition: impl/abstract_robot.h:14
Abstract_robot
Definition: impl/abstract_robot.h:25
Abstract_robot::robot_root_bounds_
std::vector< tf2::Transform > robot_root_bounds_
Bounds of robot arm as sub-region of table top.
Definition: impl/abstract_robot.h:32


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