Bioscara
DALSA's DIY SCARA Robot Arm.
Loading...
Searching...
No Matches
mGripper.h
Go to the documentation of this file.
1
13#ifndef MGRIPPER_H
14#define MGRIPPER_H
18
20{
27 class Gripper : public BaseGripper
28 {
29 public:
35 Gripper(float reduction, float offset, float min, float max, float backup_init_pos);
36
46 err_type_t enable(void) override;
47
56 err_type_t disable(void) override;
57
68 err_type_t setPosition(float width) override;
69
78 err_type_t setServoPosition(float angle);
79
80 protected:
81
83 int _freq = 50;
84
85 private:
86
87 };
88}
89#endif // MGRIPPER_H
Class to create a Pulse Width Modulated (PWM) signal on the Raspberry PI 4 and 5.
Definition uPWM.h:34
Generic base class for gripper control implementations.
Definition mBaseGripper.h:27
Child class implementing control of the hardware gripper.
Definition mGripper.h:28
err_type_t disable(void) override
Deactivates the hardware.
Definition mGripper.cpp:30
err_type_t setServoPosition(float angle)
Sets the servo position of the gripper actuator in degrees.
Definition mGripper.cpp:47
int _freq
PWM frequency in Hz.
Definition mGripper.h:83
err_type_t enable(void) override
Activates the the hardware.
Definition mGripper.cpp:11
err_type_t setPosition(float width) override
Sets the gripper width in m.
Definition mGripper.cpp:38
RPI_PWM _pwm
RPI_PWM object to generate PWM voltage for servo control.
Definition mGripper.h:82
File containing the BaseGripper class.
Definition mBaseJoint.h:19
err_type_t
Enum defining common error types.
Definition uErr.h:23
Defining common return types.
Includes source code for Hardware PWM generation on Raspberry Pi 4.