grasp_candidate_drawer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Eigen/Dense>
4 
7 
8 #include "GraspCandidateHelper.h"
10 
11 namespace armarx
12 {
14  {
15  private:
16  struct side_data
17  {
18  std::string name;
19  std::string hand_model_package;
20  std::string hand_model_path;
21  Eigen::Matrix4f tcp_2_hroot;
22  };
23 
24  public:
26  void reset_colors();
27 
28  public:
29  void draw(const armarx::grasping::GraspCandidatePtr& gc, armarx::viz::Layer& l);
31  void draw(const armarx::grasping::GraspCandidatePtr& gc,
33  const armarx::viz::Color& color);
34  void draw(const armarx::GraspCandidateHelper& gch,
36  const armarx::viz::Color& color);
37 
38  public:
41  float ax_len = 300,
42  float ax_width = 5,
43  const armarx::viz::Color& color_up = {255, 0, 0},
44  const armarx::viz::Color& color_trans = {0, 255, 0});
45  void draw(const std::string& name,
48  float ax_len = 300,
49  float ax_width = 5,
50  const armarx::viz::Color& color_up = {255, 0, 0},
51  const armarx::viz::Color& color_trans = {0, 255, 0});
54  const Eigen::Matrix4f& gpose,
55  float ax_len = 300,
56  float ax_width = 5,
57  const armarx::viz::Color& color_up = {255, 0, 0},
58  const armarx::viz::Color& color_trans = {0, 255, 0});
59  void draw(const std::string& name,
62  const Eigen::Matrix4f& gpose,
63  float ax_len = 300,
64  float ax_width = 5,
65  const armarx::viz::Color& color_up = {255, 0, 0},
66  const armarx::viz::Color& color_trans = {0, 255, 0});
67 
68  private:
69  const side_data& side(const armarx::GraspCandidateHelper& gch);
70 
71  public:
74  float length_approach = 300;
75  float width_approach = 5;
76 
77  private:
78  std::map<std::string, side_data> _sides;
79  std::size_t _color_offset = 0;
80  };
81 } // namespace armarx
Client.h
armarx::grasp_candidate_drawer::length_approach
float length_approach
Definition: grasp_candidate_drawer.h:74
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::grasp_candidate_drawer::grasp_candidate_drawer
grasp_candidate_drawer(armarx::RobotNameHelperPtr rnh, const VirtualRobot::RobotPtr &robot)
Definition: grasp_candidate_drawer.cpp:12
GraspCandidateHelper.h
armarx::box_to_grasp_candidates::side_data
Definition: box_to_grasp_candidates.h:93
armarx::RobotNameHelperPtr
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
Definition: RobotNameHelper.h:32
armarx::GraspCandidateHelper
Definition: GraspCandidateHelper.h:37
armarx::grasp_candidate_drawer::width_approach
float width_approach
Definition: grasp_candidate_drawer.h:75
armarx::viz::Color
Definition: Color.h:12
armarx::grasp_candidate_drawer::reset_colors
void reset_colors()
Definition: grasp_candidate_drawer.cpp:19
armarx::grasp_candidate_drawer::robot
VirtualRobot::RobotPtr robot
Definition: grasp_candidate_drawer.h:73
armarx::grasp_candidate_drawer::draw
void draw(const armarx::grasping::GraspCandidatePtr &gc, armarx::viz::Layer &l)
Definition: grasp_candidate_drawer.cpp:25
armarx::grasp_candidate_drawer::rnh
armarx::RobotNameHelperPtr rnh
Definition: grasp_candidate_drawer.h:72
armarx::grasp_candidate_drawer
Definition: grasp_candidate_drawer.h:13
box_to_grasp_candidates.h
armarx::viz::Layer
Definition: Layer.h:12
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
RobotNameHelper.h
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19