1#ifndef J_SERVO_CONTROLLER_GENTLE_H
2#define J_SERVO_CONTROLLER_GENTLE_H
59 void gripGently(
bool _dirPos,
float _targetForce = NAN,
float _gripSpeed = NAN,
bool _run =
false)
61 if (!isnan(_targetForce))
63 if (!isnan(_gripSpeed))
class for controlling JMotorDriverServoAdvanced, with power reducing option along with standard JServ...
Definition JServoControllerAdvanced.h:10
JServoControllerGentle is an extension of JServoController that uses JServoStallSensing to make a ser...
Definition JServoControllerGentle.h:8
void setAngleSmoothed(float angle, bool _run=true)
Definition JServoControllerGentle.h:86
JServoControllerGentle(JServoControllerAdvanced servo, JServoStallSensing &servoStallSensor, float _targetForce=.05, float _gripSpeed=30)
Constructor for JServoController Gentle (a child class of JServoController)
Definition JServoControllerGentle.h:28
float targetForce
Definition JServoControllerGentle.h:11
void setAngleImmediateInc(float angleDiff, bool _run=true)
Definition JServoControllerGentle.h:81
bool gripDirPos
Definition JServoControllerGentle.h:10
float gripSpeed
Definition JServoControllerGentle.h:12
bool grippingGently
true=gripping, false = other servo movmement set
Definition JServoControllerGentle.h:18
void gripGently(bool _dirPos, float _targetForce=NAN, float _gripSpeed=NAN, bool _run=false)
have the servo move until it is pushing with a set amount of force
Definition JServoControllerGentle.h:59
virtual void run()
call this in your main loop
Definition JServoControllerGentle.h:38
JServoStallSensing & stallSensor
Definition JServoControllerGentle.h:19
void setPosition(float pos, bool _run)
Definition JServoControllerGentle.h:71
void setAngleImmediate(float angle, bool _run=true)
Definition JServoControllerGentle.h:76
class for controlling JMotorDriverServo, with angle calibration and accel and velocity limiting
Definition JServoController.h:12
void setPosition(float pos, bool _run=true)
sets servo position, leaves target where it was
Definition JServoController.h:423
void setAngleSmoothed(float angle, bool _run=true)
set servo angle target, servo will move to target but at limited velocity and acceleration
Definition JServoController.h:164
void setAngleImmediate(float angle, bool _run=true)
set servo angle immediately, without velocity or acceleration limiting
Definition JServoController.h:132
virtual void run()
call this in your main loop
Definition JServoController.h:102
void setAngleImmediateInc(float angleDiff, bool _run=true)
increment servo angle and set immediately, without velocity or acceleration limiting
Definition JServoController.h:148
Derivs_Limiter dL
instance of Derivs_Limiter class used to smoothly move servo
Definition JServoController.h:63
JMotorDriverServo & servo
reference to driver that's a subclass of JMotorDriverServo
Definition JServoController.h:17
defines interface for classes that can measure how hard a servo is working
Definition JServoStallSensing.h:7
virtual float getMeasurement(bool _run=true)=0