qbsofthand2_research_api.h
Go to the documentation of this file.
2 
3 namespace qbrobotics_research_api {
9  public:
10  class Params : public Device::Params {
11  public:
12  Params() = default;
13  ~Params() override = default;
14 
15  void initParams(const std::vector<int8_t> &param_buffer) override;
16 
17  uint8_t hand_side {0};
18  };
19 
20  explicit qbSoftHand2MotorsResearch(std::shared_ptr<Communication> communication, std::string name, std::string serial_port, uint8_t id);
21  explicit qbSoftHand2MotorsResearch(std::shared_ptr<Communication> communication, std::string name, std::string serial_port, uint8_t id, bool init_params);
22  ~qbSoftHand2MotorsResearch() override = default;
23 
24  int setMotorStates(bool motor_state) override;
25 
26  int setParameter(uint16_t param_type, const std::vector<int8_t> &param_data) override;
27  int setParamId(uint8_t id) override;
28  int setParamZeros() override;
29 
30 
36  int getParamHandSide();
37 
45  int getParamHandSide(uint8_t &hand_side);
46 
52  int getParamEncoderOffsets() override;
53 
60  int getParamEncoderOffsets(std::vector<int16_t> &encoder_offsets) override;
61 
68  int getSynergies(std::vector<int16_t> &synergies);
69 
77  int setParamEncoderOffsets(const std::vector<int16_t> &encoder_offsets) override;
78 
86  int setAdditiveSynergiesReferences(int16_t synergy_1, int16_t synergy_2);
87 
95  int setMultiplicativeSynergiesReferences(float synergy_1, float synergy_2);
96 
104  int setParamHandSide(uint8_t hand_side);
105 
112  int setHomePosition();
113  };
114 }
qbrobotics_research_api::qbSoftHand2MotorsResearch::Params::Params
Params()=default
qbrobotics_research_api::qbSoftHand2MotorsResearch::Params::initParams
void initParams(const std::vector< int8_t > &param_buffer) override
Definition: qbsofthand2_research_api.cpp:6
qbrobotics_research_api::qbSoftHand2MotorsResearch::setParamId
int setParamId(uint8_t id) override
Set the ID of the device.
Definition: qbsofthand2_research_api.cpp:42
qbrobotics_research_api::qbSoftHand2MotorsResearch::Params
Definition: qbsofthand2_research_api.h:10
qbrobotics_research_api::qbSoftHand2MotorsResearch::setParamHandSide
int setParamHandSide(uint8_t hand_side)
Set the hand_side parameter for RIGHT or LEFT Hand for SoftHand 2.
Definition: qbsofthand2_research_api.cpp:37
qbrobotics_research_api::qbSoftHand2MotorsResearch::qbSoftHand2MotorsResearch
qbSoftHand2MotorsResearch(std::shared_ptr< Communication > communication, std::string name, std::string serial_port, uint8_t id)
Definition: qbsofthand2_research_api.cpp:14
qbrobotics_research_api::qbSoftHand2MotorsResearch::getSynergies
int getSynergies(std::vector< int16_t > &synergies)
Get the synergies values of the SoftHand 2.
Definition: qbsofthand2_research_api.cpp:96
qbrobotics_research_api::qbSoftHand2MotorsResearch::setMultiplicativeSynergiesReferences
int setMultiplicativeSynergiesReferences(float synergy_1, float synergy_2)
Set the Multiplicative Synergies References to SoftHand 2.
Definition: qbsofthand2_research_api.cpp:120
qbrobotics_research_api
Definition: qbmove_research_api.h:33
qbrobotics_research_api::qbSoftHand2MotorsResearch::getParamHandSide
int getParamHandSide()
Update the SoftHand 2 hand_side parameter in the class variable param_.
Definition: qbsofthand2_research_api.cpp:83
qbrobotics_research_api::Device
General class that allow to get/set parameters from/to qbrobotics devices.
Definition: qbrobotics_research_api.h:268
qbrobotics_research_api.h
qbrobotics_research_api::qbSoftHand2MotorsResearch::setParamZeros
int setParamZeros() override
Set motor(s) zero(s) to actual encoder reading.
Definition: qbsofthand2_research_api.cpp:55
qbrobotics_research_api::qbSoftHand2MotorsResearch::setAdditiveSynergiesReferences
int setAdditiveSynergiesReferences(int16_t synergy_1, int16_t synergy_2)
Set the Additive Synergies References to SoftHand 2.
Definition: qbsofthand2_research_api.cpp:112
qbrobotics_research_api::qbSoftHand2MotorsResearch::getParamEncoderOffsets
int getParamEncoderOffsets() override
Update the SoftHand 2 encoder offsets in the class variable param_.
Definition: qbsofthand2_research_api.cpp:72
qbrobotics_research_api::qbSoftHand2MotorsResearch
SoftHand 2 class that allows to control and get/set parameters.
Definition: qbsofthand2_research_api.h:8
qbrobotics_research_api::qbSoftHand2MotorsResearch::setParameter
int setParameter(uint16_t param_type, const std::vector< int8_t > &param_data) override
Set the Parameter specified by param_type with the values stored in param_data.
Definition: qbsofthand2_research_api.cpp:27
qbrobotics_research_api::Device::Params
Manage qbrobotics devices parameters.
Definition: qbrobotics_research_api.h:274
qbrobotics_research_api::qbSoftHand2MotorsResearch::Params::~Params
~Params() override=default
qbrobotics_research_api::qbSoftHand2MotorsResearch::setHomePosition
int setHomePosition()
Blocking function that moves SoftHand 2 motors to home position.
Definition: qbsofthand2_research_api.cpp:138
qbrobotics_research_api::qbSoftHand2MotorsResearch::~qbSoftHand2MotorsResearch
~qbSoftHand2MotorsResearch() override=default
qbrobotics_research_api::qbSoftHand2MotorsResearch::Params::hand_side
uint8_t hand_side
Definition: qbsofthand2_research_api.h:17
qbrobotics_research_api::qbSoftHand2MotorsResearch::setMotorStates
int setMotorStates(bool motor_state) override
Activate or deactivate the motor(s)
Definition: qbsofthand2_research_api.cpp:21
qbrobotics_research_api::qbSoftHand2MotorsResearch::setParamEncoderOffsets
int setParamEncoderOffsets(const std::vector< int16_t > &encoder_offsets) override
Set the encoder offsets parameters of the SoftHand 2.
Definition: qbsofthand2_research_api.cpp:105


qb_device_driver
Author(s): qbroboticsĀ®
autogenerated on Thu Apr 27 2023 02:36:32