#include <twoaxisservo.h>
Inherited by TwoAxisServoCentered.
Inheritance diagram for TwoAxisServo:
Public Member Functions | |
TwoAxisServo (TwoAxisJoint *joint, double _min1, double _max1, double power1, double _min2, double _max2, double power2, double damp=0.2, double integration=2, double maxVel=10.0, double jointLimit=1.3, bool minmaxCheck=true) | |
min and max values are understood as travel bounds. | |
virtual | ~TwoAxisServo () |
virtual void | set (double pos1, double pos2) |
sets the set point of the servo. | |
virtual double | get1 () |
returns the position of the servo (joint) of 1. | |
virtual double | get2 () |
returns the position of the servo (joint) of 2. | |
void | get (double &p1, double &p2) |
returns the positions of the joint in ranges [-1, 1] (scaled by min, max) | |
virtual void | setPower (double power1, double power2) |
adjusts the power of the servo | |
virtual void | setPower1 (double power1) |
returns the power of the servo | |
virtual void | setPower2 (double power2) |
returns the power of the servo | |
virtual double | getPower1 () |
returns the power of the servo | |
virtual double | getPower2 () |
returns the power of the servo | |
virtual double & | damping1 () |
returns the damping of the servo | |
virtual double & | damping2 () |
returns the damping of the servo | |
virtual double & | offsetCanceling () |
returns the damping of the servo | |
virtual void | setMinMax1 (double _min, double _max) |
virtual void | setMinMax2 (double _min, double _max) |
virtual void | setMaxVel (double maxVel) |
adjusts maximal speed of servo | |
virtual double | getMaxVel () |
adjusts maximal speed of servo | |
Protected Attributes | |
TwoAxisJoint * | joint |
double | min1 |
double | max1 |
double | min2 |
double | max2 |
PID | pid1 |
PID | pid2 |
double | maxVel |
double | jointLimit |
TwoAxisServo | ( | TwoAxisJoint * | joint, | |
double | _min1, | |||
double | _max1, | |||
double | power1, | |||
double | _min2, | |||
double | _max2, | |||
double | power2, | |||
double | damp = 0.2 , |
|||
double | integration = 2 , |
|||
double | maxVel = 10.0 , |
|||
double | jointLimit = 1.3 , |
|||
bool | minmaxCheck = true | |||
) | [inline] |
min and max values are understood as travel bounds.
Min should be less than 0.
virtual ~TwoAxisServo | ( | ) | [inline, virtual] |
virtual double& damping1 | ( | ) | [inline, virtual] |
returns the damping of the servo
virtual double& damping2 | ( | ) | [inline, virtual] |
returns the damping of the servo
void get | ( | double & | p1, | |
double & | p2 | |||
) | [inline] |
returns the positions of the joint in ranges [-1, 1] (scaled by min, max)
virtual double get1 | ( | ) | [inline, virtual] |
returns the position of the servo (joint) of 1.
axis in ranges [-1, 1] (scaled by min1, max1)
Reimplemented in TwoAxisServoCentered.
virtual double get2 | ( | ) | [inline, virtual] |
returns the position of the servo (joint) of 2.
axis in ranges [-1, 1] (scaled by min2, max2)
Reimplemented in TwoAxisServoCentered.
virtual double getMaxVel | ( | ) | [inline, virtual] |
virtual double getPower1 | ( | ) | [inline, virtual] |
virtual double getPower2 | ( | ) | [inline, virtual] |
virtual double& offsetCanceling | ( | ) | [inline, virtual] |
virtual void set | ( | double | pos1, | |
double | pos2 | |||
) | [inline, virtual] |
sets the set point of the servo.
Position must be between -1 and 1. It is scaled to fit into min, max
Reimplemented in TwoAxisServoCentered, and TwoAxisServoVel.
virtual void setMaxVel | ( | double | maxVel | ) | [inline, virtual] |
virtual void setMinMax1 | ( | double | _min, | |
double | _max | |||
) | [inline, virtual] |
virtual void setMinMax2 | ( | double | _min, | |
double | _max | |||
) | [inline, virtual] |
virtual void setPower | ( | double | power1, | |
double | power2 | |||
) | [inline, virtual] |
virtual void setPower1 | ( | double | power1 | ) | [inline, virtual] |
virtual void setPower2 | ( | double | power2 | ) | [inline, virtual] |
TwoAxisJoint* joint [protected] |
double jointLimit [protected] |
double max1 [protected] |
double max2 [protected] |
double maxVel [protected] |
double min1 [protected] |
double min2 [protected] |