lebai sdk  1.4.4
lebai c++ sdk with swig to support sereval languages.
gripper.hh
1 
17 #pragma once
18 
19 #include <memory>
20 #include <string>
21 
22 namespace lebai {
23 namespace l_master {
24 
30 class Gripper {
31  public:
37  class GripperImpl;
38 
42  explicit Gripper(const std::string& port_name);
47  virtual ~Gripper();
54  void set_position(unsigned int position);
61  unsigned int get_current_position() const;
68  void set_force(unsigned int force);
75  unsigned int get_current_force() const;
84  void set_velocity(unsigned int velocity, bool persistent);
92  unsigned int get_current_velocity(bool persistent) const;
105  bool is_calibrated() const;
118 
119  protected:
120  std::unique_ptr<GripperImpl> impl_;
121 };
122 
123 } // namespace l_master
124 
125 } // namespace lebai
独立的夹爪的主要接口对象,通过本对象的方法与夹爪进行数据交互.
Definition: gripper.hh:30
void turn_on_auto_calibration()
打开自动校准功能.
Gripper(const std::string &port_name)
构造Gripper对象.
virtual ~Gripper()
析构Robot对象.
bool is_calibrated() const
获取夹爪是否已校准完成状态.
void turn_off_auto_calibration()
关闭自动校准功能.
void set_velocity(unsigned int velocity, bool persistent)
设置夹爪开合速度. 范围为0-100.
std::unique_ptr< GripperImpl > impl_
Definition: gripper.hh:120
void set_position(unsigned int position)
设置夹爪幅度. 范围为0-100.
unsigned int get_current_force() const
获取夹爪当前力道.
unsigned int get_current_velocity(bool persistent) const
获取夹爪当前开合速度.
void do_calibration()
执行夹爪校准动作.
void set_force(unsigned int force)
设置夹爪夹持力道. 范围为0-100.
unsigned int get_current_position() const
获取夹爪当前位置.
Definition: discovery.hh:23