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

# Spring Class Reference

`#include <spring.h>`

Inherits lpzrobots::OneAxisServo.

Collaboration diagram for Spring:
[legend]

List of all members.

## Public Member Functions
| Spring (OneAxisJoint *joint, double _min, double _max, double power, double damp=0.2, double integration=0.0, double maxVel=10.0, double jointLimit=1.0)
virtual | ~Spring ()
virtual void | set (double pos)
| sets the set point of the servo.
virtual double | get ()
| returns the position of the slider in ranges [-1, 1] (scaled by min, max)
virtual void | setMinMax (double _min, double _max)

## Constructor & Destructor Documentation

Spring | ( | OneAxisJoint * | joint,
|  | double | _min,
|  | double | _max,
|  | double | power,
|  | double | damp = `0.2`,
|  | double | integration = `0.0`,
|  | double | maxVel = `10.0`,
|  | double | jointLimit = `1.0` |
| ) |  |  | `[inline]`

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

## Member Function Documentation

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

returns the position of the slider in ranges [-1, 1] (scaled by min, max)

Reimplemented from OneAxisServo.

virtual void set | ( | double | pos | ) | `[inline, virtual]`

sets the set point of the servo.

Position is relative to initial position of the two parts connected by the spring

Reimplemented from OneAxisServo.

virtual void setMinMax | ( | double | _min,
|  | double | _max |
| ) |  |  | `[inline, virtual]`

Reimplemented from OneAxisServo.

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

- spring.h