Robot Simulator of the Robotics Group for Self-Organization of Control: TwoAxisServoVel Class Reference

# TwoAxisServoVel Class Reference

general servo motor to achieve position control for 2 axis joints that internally controls the velocity of the motor (much more stable) with centered zero position. More...

`#include <twoaxisservo.h>`

Inherits lpzrobots::TwoAxisServoCentered.

Collaboration diagram for TwoAxisServoVel:
[legend]

List of all members.

## Public Member Functions
| TwoAxisServoVel (const OdeHandle &odeHandle, TwoAxisJoint *joint, double _min1, double _max1, double power1, double _min2, double _max2, double power2, double damp=0.05, double maxVel=10.0, double jointLimit=1.3)
| min and max values are understood as travel bounds.
virtual | ~TwoAxisServoVel ()
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 | getDamping1 ()
| returns the damping of the servo (axis 1)
virtual double | getDamping2 ()
| returns the damping of the servo (axis 2)
virtual void | setDamping1 (double _damp)
| sets the damping of the servo (axis 1)
virtual void | setDamping2 (double _damp)
| sets the damping of the servo (axis 1)
virtual double & | offsetCanceling ()
| offetCanceling does not exist for this type of servo
virtual void | setMaxVel (double maxVel)
| adjusts maximal speed of servo
virtual double | getMaxVel ()
| adjusts maximal speed of servo
virtual void | set (double pos1, double pos2)
| sets the set point of the servo.
## Protected Attributes
AngularMotor2Axis | motor
double | dummy
double | damp
double | power1
double | power2

## Detailed Description

general servo motor to achieve position control for 2 axis joints that internally controls the velocity of the motor (much more stable) with centered zero position.

The amount of body feeling can be adjusted by the damping parameter which is understood as a stiffness parameter

## Constructor & Destructor Documentation

TwoAxisServoVel | ( | const OdeHandle & | odeHandle,
|  | TwoAxisJoint * | joint,
|  | double | _min1,
|  | double | _max1,
|  | double | power1,
|  | double | _min2,
|  | double | _max2,
|  | double | power2,
|  | double | damp = `0.05`,
|  | double | maxVel = `10.0`,
|  | double | jointLimit = `1.3` |
| ) |  |  | `[inline]`

min and max values are understood as travel bounds.

The zero position is (max-min)/2

Parameters:

  | power | is the maximal torque the servo can generate
  | maxVel | is understood as a speed parameter of the servo.
  | damp | adjusts the power of the servo in dependence of the distance to the set point. This regulates the stiffness and the body feeling 0: the servo has no power at the set point (maximal body feeling); 1: is servo has full power at the set point: perfectly damped and stiff.

virtual ~TwoAxisServoVel | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual double getDamping1 | ( |  | ) | `[inline, virtual]`

returns the damping of the servo (axis 1)

Reimplemented from TwoAxisServo.

virtual double getDamping2 | ( |  | ) | `[inline, virtual]`

returns the damping of the servo (axis 2)

Reimplemented from TwoAxisServo.

virtual double getMaxVel | ( |  | ) | `[inline, virtual]`

adjusts maximal speed of servo

Reimplemented from TwoAxisServo.

virtual double getPower1 | ( |  | ) | `[inline, virtual]`

returns the power of the servo

Reimplemented from TwoAxisServo.

virtual double getPower2 | ( |  | ) | `[inline, virtual]`

returns the power of the servo

Reimplemented from TwoAxisServo.

virtual double& offsetCanceling | ( |  | ) | `[inline, virtual]`

offetCanceling does not exist for this type of servo

Reimplemented from TwoAxisServo.

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, however 0 is just in the center of min and max

Reimplemented from TwoAxisServoCentered.

virtual void setDamping1 | ( | double | damp | ) | `[inline, virtual]`

sets the damping of the servo (axis 1)

Reimplemented from TwoAxisServo.

virtual void setDamping2 | ( | double | damp | ) | `[inline, virtual]`

sets the damping of the servo (axis 1)

Reimplemented from TwoAxisServo.

virtual void setMaxVel | ( | double | maxVel | ) | `[inline, virtual]`

adjusts maximal speed of servo

Reimplemented from TwoAxisServo.

virtual void setPower | ( | double | power1,
|  | double | power2 |
| ) |  |  | `[inline, virtual]`

adjusts the power of the servo

Reimplemented from TwoAxisServo.

virtual void setPower1 | ( | double | power1 | ) | `[inline, virtual]`

returns the power of the servo

Reimplemented from TwoAxisServo.

virtual void setPower2 | ( | double | power2 | ) | `[inline, virtual]`

returns the power of the servo

Reimplemented from TwoAxisServo.

## Member Data Documentation

double damp`[protected]`

double dummy`[protected]`

AngularMotor2Axis motor`[protected]`

double power1`[protected]`

double power2`[protected]`

The documentation for this class was generated from the following file:

- twoaxisservo.h