Generic base class for gripper control implementations.
More...
#include <mBaseGripper.h>
|
| float | _reduction = 1 |
| | gripper width to actuator reduction ratio
|
| |
| float | _offset = 0 |
| | gripper width position offset
|
| |
| float | _min = 0 |
| | gripper width lower limit
|
| |
| float | _max = 0 |
| | gripper width upper limit
|
| |
| float | _backup_init_pos = 0.0 |
| | Initial position assumed if none can be retrieved from the buffer file.
|
| |
| float | _pos = _backup_init_pos |
| | stored position
|
| |
| float | _pos_get = _pos |
| | reported position
|
| |
|
| std::chrono::_V2::system_clock::time_point | _new_cmd_time = std::chrono::_V2::system_clock::time_point() |
| |
Generic base class for gripper control implementations.
This class is a wrapper function to interact with the robot gripper either through a MockGripper or hardware Gripper object.
◆ BaseGripper()
| bioscara_hardware_drivers::BaseGripper::BaseGripper |
( |
float |
reduction, |
|
|
float |
offset, |
|
|
float |
min, |
|
|
float |
max, |
|
|
float |
backup_init_pos |
|
) |
| |
◆ ~BaseGripper()
| bioscara_hardware_drivers::BaseGripper::~BaseGripper |
( |
void |
| ) |
|
◆ deinit()
| err_type_t bioscara_hardware_drivers::BaseGripper::deinit |
( |
void |
| ) |
|
|
virtual |
◆ disable()
| err_type_t bioscara_hardware_drivers::BaseGripper::disable |
( |
void |
| ) |
|
|
virtual |
◆ enable()
| err_type_t bioscara_hardware_drivers::BaseGripper::enable |
( |
void |
| ) |
|
|
virtual |
◆ getPosition()
| err_type_t bioscara_hardware_drivers::BaseGripper::getPosition |
( |
float & |
width | ) |
|
|
virtual |
Gets the gripper width.
- Note
- Since the PWM servo has no position feedback, the latest position command is returned.
- Parameters
-
- Returns
- err_type_t::OK
◆ init()
| err_type_t bioscara_hardware_drivers::BaseGripper::init |
( |
void |
| ) |
|
|
virtual |
◆ retrieve_last_position()
| err_type_t bioscara_hardware_drivers::BaseGripper::retrieve_last_position |
( |
float & |
pos | ) |
|
|
protected |
Retrieves the stored position from the buffer file.
- Parameters
-
| pos | position value that is retrieved |
- Returns
- err_type_t::OK on success, err_type_t::ERROR if parsing buffer file fails.
◆ save_last_position()
| err_type_t bioscara_hardware_drivers::BaseGripper::save_last_position |
( |
float |
pos | ) |
|
|
protected |
Stores the latest position to the buffer file.
- Parameters
-
| pos | position value to store |
- Returns
- err_type_t::OK on success, err_type_t::ERROR if writing buffer file fails.
◆ setOffset()
| void bioscara_hardware_drivers::BaseGripper::setOffset |
( |
float |
offset | ) |
|
|
virtual |
◆ setPosition()
| err_type_t bioscara_hardware_drivers::BaseGripper::setPosition |
( |
float |
width | ) |
|
|
virtual |
◆ setReduction()
| void bioscara_hardware_drivers::BaseGripper::setReduction |
( |
float |
reduction | ) |
|
|
virtual |
Manually set reduction.
- Parameters
-
◆ _backup_init_pos
| float bioscara_hardware_drivers::BaseGripper::_backup_init_pos = 0.0 |
|
protected |
Initial position assumed if none can be retrieved from the buffer file.
◆ _max
| float bioscara_hardware_drivers::BaseGripper::_max = 0 |
|
protected |
gripper width upper limit
◆ _min
| float bioscara_hardware_drivers::BaseGripper::_min = 0 |
|
protected |
gripper width lower limit
◆ _new_cmd_time
| std::chrono::_V2::system_clock::time_point bioscara_hardware_drivers::BaseGripper::_new_cmd_time = std::chrono::_V2::system_clock::time_point() |
|
private |
◆ _offset
| float bioscara_hardware_drivers::BaseGripper::_offset = 0 |
|
protected |
gripper width position offset
◆ _pos
◆ _pos_get
| float bioscara_hardware_drivers::BaseGripper::_pos_get = _pos |
|
protected |
◆ _reduction
| float bioscara_hardware_drivers::BaseGripper::_reduction = 1 |
|
protected |
gripper width to actuator reduction ratio
The documentation for this class was generated from the following files:
- lib/ros2_ws/src/dalsa_bioscara_grippers/bioscara_gripper_hardware_driver/include/bioscara_gripper_hardware_driver/mBaseGripper.h
- lib/ros2_ws/src/dalsa_bioscara_grippers/bioscara_gripper_hardware_driver/src/mBaseGripper.cpp