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"
9 
11 
12 namespace armarx
13 {
15  {
16  private:
17  struct side_data
18  {
19  std::string name;
20  std::string hand_model_package;
21  std::string hand_model_path;
22  Eigen::Matrix4f tcp_2_hroot;
23  };
24  public:
27  void reset_colors();
28  public:
29  void draw(const armarx::grasping::GraspCandidatePtr& gc, armarx::viz::Layer& l);
31  void draw(const armarx::grasping::GraspCandidatePtr& gc, armarx::viz::Layer& l, const armarx::viz::Color& color);
33  public:
35  float ax_len = 300, float ax_width = 5,
36  const armarx::viz::Color& color_up = {255, 0, 0},
37  const armarx::viz::Color& color_trans = {0, 255, 0});
38  void draw(const std::string& name,
40  float ax_len = 300, float ax_width = 5,
41  const armarx::viz::Color& color_up = {255, 0, 0},
42  const armarx::viz::Color& color_trans = {0, 255, 0});
44  const Eigen::Matrix4f& gpose,
45  float ax_len = 300, float ax_width = 5,
46  const armarx::viz::Color& color_up = {255, 0, 0},
47  const armarx::viz::Color& color_trans = {0, 255, 0});
48  void draw(const std::string& name,
50  const Eigen::Matrix4f& gpose,
51  float ax_len = 300, float ax_width = 5,
52  const armarx::viz::Color& color_up = {255, 0, 0},
53  const armarx::viz::Color& color_trans = {0, 255, 0});
54  private:
55  const side_data& side(const armarx::GraspCandidateHelper& gch);
56 
57  public:
60  float length_approach = 300;
61  float width_approach = 5;
62  private:
63  std::map<std::string, side_data> _sides;
64  std::size_t _color_offset = 0;
65  };
66 }
Client.h
armarx::grasp_candidate_drawer::length_approach
float length_approach
Definition: grasp_candidate_drawer.h:60
armarx::grasp_candidate_drawer::grasp_candidate_drawer
grasp_candidate_drawer(armarx::RobotNameHelperPtr rnh, const VirtualRobot::RobotPtr &robot)
Definition: grasp_candidate_drawer.cpp:11
GraspCandidateHelper.h
armarx::box_to_grasp_candidates::side_data
Definition: box_to_grasp_candidates.h:75
armarx::RobotNameHelperPtr
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
Definition: RobotNameHelper.h:34
armarx::GraspCandidateHelper
Definition: GraspCandidateHelper.h:38
armarx::grasp_candidate_drawer::width_approach
float width_approach
Definition: grasp_candidate_drawer.h:61
armarx::viz::Color
Definition: Color.h:13
armarx::grasp_candidate_drawer::reset_colors
void reset_colors()
Definition: grasp_candidate_drawer.cpp:17
armarx::grasp_candidate_drawer::robot
VirtualRobot::RobotPtr robot
Definition: grasp_candidate_drawer.h:59
armarx::grasp_candidate_drawer::draw
void draw(const armarx::grasping::GraspCandidatePtr &gc, armarx::viz::Layer &l)
Definition: grasp_candidate_drawer.cpp:22
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::grasp_candidate_drawer::rnh
armarx::RobotNameHelperPtr rnh
Definition: grasp_candidate_drawer.h:58
armarx::grasp_candidate_drawer
Definition: grasp_candidate_drawer.h:14
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:28
RobotNameHelper.h
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18