Flexiv RDK APIs  1.5.1
work_coord.hpp
Go to the documentation of this file.
1 
6 #ifndef FLEXIV_RDK_WORK_COORD_HPP_
7 #define FLEXIV_RDK_WORK_COORD_HPP_
8 
9 #include "robot.hpp"
10 
11 namespace flexiv {
12 namespace rdk {
13 
20 class WorkCoord
21 {
22 public:
28  WorkCoord(const Robot& robot);
29  virtual ~WorkCoord();
30 
37  const std::vector<std::string> list() const;
38 
46  bool exist(const std::string& name) const;
47 
57  const std::array<double, kPoseSize> pose(const std::string& name) const;
58 
72  void Add(const std::string& name, const std::array<double, kPoseSize>& pose);
73 
87  void Update(const std::string& name, const std::array<double, kPoseSize>& pose);
88 
98  void Remove(const std::string& name);
99 
100 private:
101  class Impl;
102  std::unique_ptr<Impl> pimpl_;
103 };
104 
105 } /* namespace rdk */
106 } /* namespace flexiv */
107 
108 #endif /* FLEXIV_RDK_WORK_COORD_HPP_ */
Main interface with the robot, containing several function categories and background services.
Definition: robot.hpp:25
Interface to online update and interact with the robot's work coordinates. All updates will take effe...
Definition: work_coord.hpp:21
WorkCoord(const Robot &robot)
[Non-blocking] Create an instance and initialize the interface.
void Add(const std::string &name, const std::array< double, kPoseSize > &pose)
[Blocking] Add a new work coordinate with user-specified parameters.
void Update(const std::string &name, const std::array< double, kPoseSize > &pose)
[Blocking] Update the pose of an existing work coordinate.
const std::array< double, kPoseSize > pose(const std::string &name) const
[Blocking] Get pose of an existing work coordinate.
const std::vector< std::string > list() const
[Blocking] Get a name list of all configured work coordinates.
void Remove(const std::string &name)
[Blocking] Remove an existing work coordinate.
bool exist(const std::string &name) const
[Blocking] Whether the specified work coordinate already exists.