Grasp.hh
Go to the documentation of this file.
1 
8 #ifndef _GRASP_HH_
9 #define _GRASP_HH_
10 
11 // Gazebo
12 #include <gazebo/gazebo_client.hh>
13 // Open YAML config files
14 #include "yaml-cpp/yaml.h"
15 // Debug streams
16 #include "debug.hh"
17 
19 class Grasp
20 {
21  // Public attributes
22 
24  public: std::string name;
26  public: ignition::math::Matrix4d t_gripper_object;
28  public: double metric {false};
29 
31  public: Grasp();
34  public: Grasp(ignition::math::Matrix4d t_gripper_object_);
35 
41  public: static void loadFromYml(
42  const std::string & file_name,
43  const std::string & robot,
44  const std::string & object_name,
45  std::vector<Grasp> & grasps);
46 
52  public: static void writeToYml(
53  const std::string & file_name,
54  const std::string & robot,
55  const std::string & object_name,
56  const std::vector<Grasp> & grasps);
57 };
58 
59 #endif
Grasp()
Deafult constructor.
Definition: Grasp.cc:11
std::string name
Grasp candidate name.
Definition: Grasp.hh:24
double metric
Grasp success metric.
Definition: Grasp.hh:28
static void writeToYml(const std::string &file_name, const std::string &robot, const std::string &object_name, const std::vector< Grasp > &grasps)
Export set of grasps to file.
Definition: Grasp.cc:53
ignition::math::Matrix4d t_gripper_object
Homogenous transform matrix from gripper to object reference frame.
Definition: Grasp.hh:26
static void loadFromYml(const std::string &file_name, const std::string &robot, const std::string &object_name, std::vector< Grasp > &grasps)
Load set of grasps from file.
Definition: Grasp.cc:25
Grasp representation class.
Definition: Grasp.hh:19