Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
Angular motor for Ball Joints with Euler control. More...
#include <angularmotor.h>
Public Member Functions | |
AngularMotor3AxisEuler (const OdeHandle &odeHandle, BallJoint *joint, const Axis &axis1, const Axis &axis3, double power) | |
Constuct a motor attached to a BallJoint. More... | |
virtual void | init (Primitive *own, Joint *joint=0) override |
initialises motor with body of robot More... | |
virtual int | getNumberOfAxes () const override |
returns the number of Axis of this Motor More... | |
virtual void | set (int axisNumber, double velocity) |
sets the desired speed of the motor at the given axis. More... | |
virtual double | get (int axisNumber) const override |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range More... | |
virtual void | setPower (double power) |
sets the maximal force the motor has More... | |
![]() | |
AngularMotor (const OdeHandle &odeHandle, Joint *joint) | |
creates a AMotor attached to the same bodies as the given joint. More... | |
virtual | ~AngularMotor () |
virtual bool | sense (const GlobalData &globaldata) override |
performs sense action More... | |
virtual int | getSensorNumber () const override |
returns the number of sensors values produced by this sensor More... | |
virtual std::list< sensor > | getList () const override |
returns a list of sensor values (usually in the range [-1,1] ) This function should be overloaded. More... | |
virtual int | get (sensor *sensors, int length) const override |
returns the speed (PositionRate) of all axis More... | |
virtual int | getMotorNumber () const override |
return the dimensionality of this motor More... | |
virtual bool | act (GlobalData &globaldata) override |
performs the actions, This is usually called in doInternalStuff() from the robot More... | |
virtual int | set (const motor *values, int length) override |
sends the action commands to the motor. More... | |
virtual double | getPower () |
return the maximal force More... | |
virtual Joint * | getJoint () |
returns the joint to which this motor is attached More... | |
virtual void | setParam (int parameter, double value) |
sets the parameters of the motor More... | |
virtual double | getParam (int parameter) |
return the ODE joint parameter (see ODE manual) More... | |
virtual void | setVelovityFactor (double factor) |
sets factor for velocity More... | |
virtual double | getVelovityFactor (double factor) |
retuns factor for velocity More... | |
![]() | |
Sensor () | |
virtual | ~Sensor () |
virtual std::list < SensorMotorInfo > | getSensorInfos () const |
returns a list of sensor infos ( More... | |
virtual void | update () |
to update any visual appearance More... | |
std::list< sensor > | getListOfArray () const |
helper function for performance implementation of list<> get() based on array-get More... | |
![]() | |
SensorMotorInfoAble () | |
void | setBaseName (const std::string &basename) |
void | setBaseInfo (const SensorMotorInfo &baseinfo) |
SensorMotorInfo | getBaseInfo () |
void | setNamingFunc (const NamingFunction &func) |
NamingFunction | getNamingFunc () const |
void | setNames (const std::vector< std::string > &names) |
set names explicitly (basename is anyway suffixed) More... | |
std::string | getName (int index) const |
returns the name of a single item. Typically called from within Sensor and Motor class. More... | |
std::list< SensorMotorInfo > | getInfos (int number) const |
get all infos. More... | |
![]() | |
Motor () | |
virtual | ~Motor () |
virtual std::list < SensorMotorInfo > | getMotorInfos () const |
returns a list of motor names ( More... | |
Protected Attributes | |
Axis | axis1 |
Axis | axis3 |
double | power |
![]() | |
dJointID | motor |
OdeHandle | odeHandle |
double | velocityFactor |
Joint * | joint |
bool | initialized |
![]() | |
NamingFunction | func |
SensorMotorInfo | baseinfo |
Additional Inherited Members | |
![]() | |
enum | Dimensions { X = 1, Y = 2, Z = 4, XY = X | Y, XZ = X | Z, YZ = Y | Z, XYZ = X | Y | Z } |
defines which dimensions should be sensed. The meaning is sensor specific. More... | |
![]() | |
typedef std::function < std::string(int)> | NamingFunction |
function that returns the name given the index More... | |
![]() | |
static std::list< sensor > | selectrows (const matrix::Matrix &m, short dimensions) |
selects the rows specified by dimensions (X->0, Y->1, Z->2) More... | |
static int | selectrows (sensor *sensors, int length, const matrix::Matrix &m, short dimensions) |
selects the rows specified by dimensions (X->0, Y->1, Z->2) More... | |
static Dimensions | parseSensorDimension (char *str) |
static std::string | dimensions2String (short dimensions) |
![]() | |
static std::string | defaultNameing (int index) |
the default implementation is for index==0: basename, otherwise basename + (index+1) More... | |
Angular motor for Ball Joints with Euler control.
AngularMotor3AxisEuler | ( | const OdeHandle & | odeHandle, |
BallJoint * | joint, | ||
const Axis & | axis1, | ||
const Axis & | axis3, | ||
double | power | ||
) |
Constuct a motor attached to a BallJoint.
axis1 | axis relative to body 1 |
axis3 | axis relative to body 2 (must be perpendicular to axis1 (the axis 2 is calculated automatically) |
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. |
|
overridevirtual |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
Implements AngularMotor.
|
inlineoverridevirtual |
returns the number of Axis of this Motor
Implements AngularMotor.
initialises motor with body of robot
Reimplemented from AngularMotor.
|
virtual |
sets the desired speed of the motor at the given axis.
axisNumber | either 0 or 1 |
velocity | Desired motor velocity (this will be an angular or linear velocity). |
Implements AngularMotor.
|
virtual |
sets the maximal force the motor has
Implements AngularMotor.
|
protected |
|
protected |
|
protected |