Angular motor for OneAxisJoints. More...
#include <angularmotor.h>
Inherits lpzrobots::AngularMotor.
Public Member Functions | |
AngularMotor1Axis (const OdeHandle &odeHandle, OneAxisJoint *joint, double power) | |
Constuct a motor attached to a OneAxisJoint. | |
virtual | ~AngularMotor1Axis () |
virtual int | getNumberOfAxes () |
returns the number of Axis of this Motor | |
virtual void | set (int axisNumber, double velocity) |
sets the desired speed of the motor at the given axis. | |
virtual double | get (int axisNumber) |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range | |
virtual void | setPower (double power) |
sets the maximal force the motor has | |
virtual Joint * | getJoint () |
returns the joint to which this motor is attached | |
Protected Attributes | |
OneAxisJoint * | joint |
Angular motor for OneAxisJoints.
AngularMotor1Axis | ( | const OdeHandle & | odeHandle, | |
OneAxisJoint * | joint, | |||
double | power | |||
) |
Constuct a motor attached to a OneAxisJoint.
It will its axis of course.
power | The maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) turns off the motor. |
virtual ~AngularMotor1Axis | ( | ) | [inline, virtual] |
double get | ( | int | axisNumber | ) | [virtual] |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
axisNumber | is ignored because have only one axis |
Implements AngularMotor.
virtual Joint* getJoint | ( | ) | [inline, virtual] |
returns the joint to which this motor is attached
Implements AngularMotor.
virtual int getNumberOfAxes | ( | ) | [inline, virtual] |
returns the number of Axis of this Motor
Implements AngularMotor.
void set | ( | int | axisNumber, | |
double | velocity | |||
) | [virtual] |
sets the desired speed of the motor at the given axis.
axisNumber | is ignored because have only one axis | |
velocity | Desired motor velocity (this will be an angular or linear velocity). |
Implements AngularMotor.
void setPower | ( | double | power | ) | [virtual] |
sets the maximal force the motor has
Implements AngularMotor.
OneAxisJoint* joint [protected] |