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

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AngularMotor Class Reference

Abstract angular motor class. More...

`#include <angularmotor.h>`

Inherited by AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

Inheritance diagram for AngularMotor:

[legend]
List of all members.

## Public Member Functions
| AngularMotor (const OdeHandle &odeHandle, Joint *joint)
| creates a AMotor attached to the same bodies as the given joint.
virtual | ~AngularMotor ()
virtual int | getNumberOfAxes ()=0
| returns the number of Axis of this Motor
virtual void | set (int axisNumber, double velocity)=0
| sets the desired speed of the motor at the given axis.
virtual double | get (int axisNumber)=0
| returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
virtual void | setPower (double power)=0
| sets the maximal force the motor has
virtual double | getPower ()
| return the maximal force
virtual int | set (const double *velocities, int len)
| sets the desired speed of all motor.
virtual int | get (double *velocities, int len)
| returns the speed (PositionRate) of all axis
virtual Joint * | getJoint ()=0
| returns the joint to which this motor is attached
virtual void | setParam (int parameter, double value)
| sets the parameters of the motor
virtual double | getParam (int parameter)
| gets the parameters of the motor
## Protected Attributes
dJointID | motor

## Detailed Description

Abstract angular motor class.

This is a wrapper for ODE's AMotor.

## Constructor & Destructor Documentation

AngularMotor | ( | const OdeHandle & | odeHandle,
|  | Joint * | joint |
| ) |  |  |

creates a AMotor attached to the same bodies as the given joint.

~AngularMotor | ( |  | ) | `[virtual]`

## Member Function Documentation

int get | ( | double * | velocities,
|  | int | len |
| ) |  |  | `[virtual]`

returns the speed (PositionRate) of all axis

Parameters:

  | velocities | double array to fill in the velocities
  | len | length of the given array

Returns:
  number actually returned velocities

virtual double get | ( | int | axisNumber | ) | `[pure virtual]`

returns the speed (PositionRate) at the given axis, or zero if the axis is out of range

Implemented in AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

virtual Joint* getJoint | ( |  | ) | `[pure virtual]`

returns the joint to which this motor is attached

Implemented in AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

virtual int getNumberOfAxes | ( |  | ) | `[pure virtual]`

returns the number of Axis of this Motor

Implemented in AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

double getParam | ( | int | parameter | ) | `[virtual]`

gets the parameters of the motor

double getPower | ( |  | ) | `[virtual]`

return the maximal force

int set | ( | const double * | velocities,
|  | int | len |
| ) |  |  | `[virtual]`

sets the desired speed of all motor.

Parameters:

  | velocities | double array with desired velocities
  | len | length of the given array

Returns:
  number actually returned velocities

virtual void set | ( | int | axisNumber,
|  | double | velocity |
| ) |  |  | `[pure virtual]`

sets the desired speed of the motor at the given axis.

Parameters:

  | velocity | Desired motor velocity (this will be an angular or linear velocity).

Implemented in AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

void setParam | ( | int | parameter,
|  | double | value |
| ) |  |  | `[virtual]`

sets the parameters of the motor

virtual void setPower | ( | double | power | ) | `[pure virtual]`

sets the maximal force the motor has

Implemented in AngularMotor1Axis, AngularMotor2Axis, AngularMotor3AxisEuler, and AngularMotorNAxis.

## Member Data Documentation

dJointID motor`[protected]`

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

- angularmotor.h
- angularmotor.cpp