grasp_candidate_drawer.h
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Dense>
4
7
10
11namespace 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
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
void draw(const armarx::grasping::GraspCandidatePtr &gc, armarx::viz::Layer &l)
grasp_candidate_drawer(armarx::RobotNameHelperPtr rnh, const VirtualRobot::RobotPtr &robot)