Angular motor for arbitrary Joints with custom axis (up to 3). More...
#include <angularmotor.h>
Inherits lpzrobots::AngularMotor.
Public Member Functions | |
AngularMotorNAxis (const OdeHandle &odeHandle, Joint *joint, std::list< std::pair< double, Axis > > axis) | |
Constuct a motor attached to any Joint (not Sliders!). | |
virtual | ~AngularMotorNAxis () |
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 The problem is, that we don't have actual information available. | |
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 | |
Joint * | joint |
Angular motor for arbitrary Joints with custom axis (up to 3).
AngularMotorNAxis | ( | const OdeHandle & | odeHandle, | |
Joint * | joint, | |||
std::list< std::pair< double, Axis > > | axis | |||
) |
Constuct a motor attached to any Joint (not Sliders!).
The axis have to be provided by the user.
axis | list of axis vector and power If empty then it motor is disabled. Power is 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. |
The axis have to be provided by the user.
axis | list of axis vectors and power. If empty then the motor is disabled. Power is 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 ~AngularMotorNAxis | ( | ) | [inline, virtual] |
double get | ( | int | axisNumber | ) | [virtual] |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range The problem is, that we don't have actual information available.
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
So we return the last set position!.
Implements AngularMotor.
virtual Joint* getJoint | ( | ) | [inline, virtual] |
returns the joint to which this motor is attached
Implements AngularMotor.
int getNumberOfAxes | ( | ) | [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.
velocity | Desired motor velocity (this will be an angular or linear velocity). | |
axisNumber | either 0 or 1 | |
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.