24 #ifndef __ANGULARMOTOR_H
25 #define __ANGULARMOTOR_H
55 virtual int get(
sensor* sensors,
int length)
const override;
68 virtual int set(
const motor* values,
int length)
override;
75 virtual void set(
int axisNumber,
double velocity) = 0;
77 virtual double get(
int axisNumber)
const = 0;
90 virtual void setParam(
int parameter,
double value);
93 virtual double getParam(
int parameter);
129 virtual void set(
int axisNumber,
double velocity);
133 virtual double get(
int axisNumber)
const override ;
135 virtual void setPower(
double power);
160 virtual void set(
int axisNumber,
double velocity);
161 virtual double get(
int axisNumber)
const override ;
164 virtual void setPower(
double power1,
double power2);
197 virtual void set(
int axisNumber,
double velocity);
199 virtual double get(
int axisNumber)
const override ;
203 virtual void setPower(
double power);
221 std::list<std::pair<double, Axis > >
axis);
233 virtual void set(
int axisNumber,
double velocity);
238 virtual double get(
int axisNumber)
const override ;
242 std::list<std::pair<double, Axis > >
axis;
virtual ~AngularMotor1Axis()
Definition: angularmotor.h:119
Joint * joint
Definition: angularmotor.h:105
double power
Definition: angularmotor.h:137
virtual ~AngularMotor2Axis()
Definition: angularmotor.h:149
virtual void set(int axisNumber, double velocity)
sets the desired speed of the motor at the given axis.
Definition: angularmotor.cpp:400
virtual void setPower(double power)
sets the maximal force the motor has
Definition: angularmotor.cpp:230
Data structure for accessing the ODE.
Definition: odehandle.h:44
virtual void init(Primitive *own, Joint *joint=0) override
initialises motor with body of robot
Definition: angularmotor.cpp:258
virtual void setPower(double power)
sets the maximal force the motor has
Definition: angularmotor.cpp:163
virtual int set(const motor *values, int length) override
sends the action commands to the motor.
Definition: angularmotor.cpp:67
double power(void *c, double x)
returns x the power c (as a double)
Definition: controller_misc.cpp:17
virtual void setPower(double power)
sets the maximal force the motor has
Definition: angularmotor.cpp:347
virtual ~AngularMotor()
Definition: angularmotor.cpp:44
virtual void init(Primitive *own, Joint *joint=0) override
initialises motor with body of robot
Definition: angularmotor.cpp:179
virtual void init(Primitive *own, Joint *joint=0) override
initialises motor with body of robot
Definition: angularmotor.cpp:128
Angular motor for TwoAxisJoints.
Definition: angularmotor.h:141
virtual double getParam(int parameter)
return the ODE joint parameter (see ODE manual)
Definition: angularmotor.cpp:97
virtual int getNumberOfAxes() const override
returns the number of Axis of this Motor
Definition: angularmotor.cpp:299
AngularMotor(const OdeHandle &odeHandle, Joint *joint)
creates a AMotor attached to the same bodies as the given joint.
Definition: angularmotor.cpp:38
Axis axis3
Definition: angularmotor.h:206
virtual void setVelovityFactor(double factor)
sets factor for velocity
Definition: angularmotor.cpp:107
virtual double getPower()
return the maximal force
Definition: angularmotor.cpp:102
double power1
Definition: angularmotor.h:169
double sensor
Definition: types.h:29
virtual Joint * getJoint()
returns the joint to which this motor is attached
Definition: angularmotor.h:87
bool initialized
Definition: angularmotor.h:106
AngularMotor2Axis(const OdeHandle &odeHandle, TwoAxisJoint *joint, double power1, double power2)
Constuct a motor attached to a TwoAxisJoint.
Definition: angularmotor.cpp:174
double power
Definition: angularmotor.h:207
dJointID motor
Definition: angularmotor.h:102
AngularMotor1Axis(const OdeHandle &odeHandle, OneAxisJoint *joint, double power)
Constuct a motor attached to a OneAxisJoint.
Definition: angularmotor.cpp:124
virtual void setPower(double power)
sets the maximal force the motor has
Definition: angularmotor.cpp:435
Abstract class for sensors that can be plugged into a robot.
Definition: sensor.h:43
virtual void init(Primitive *own, Joint *joint=0) override
initialises motor with body of robot
Definition: angularmotor.cpp:379
Angular motor for arbitrary Joints with custom axis (up to 3)
Definition: angularmotor.h:211
Angular motor for Ball Joints with Euler control.
Definition: angularmotor.h:175
virtual bool sense(const GlobalData &globaldata) override
performs sense action
Definition: angularmotor.h:50
virtual void setParam(int parameter, double value)
sets the parameters of the motor
Definition: angularmotor.cpp:90
Abstact base class for attachable motors.
Definition: motor.h:35
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
Abstract angular motor class.
Definition: angularmotor.h:36
double velocityFactor
Definition: angularmotor.h:104
Data structure holding all essential global information.
Definition: globaldata.h:57
virtual int getNumberOfAxes() const override
returns the number of Axis of this Motor
Definition: angularmotor.h:191
virtual void set(int axisNumber, double velocity)
sets the desired speed of the motor at the given axis.
Definition: angularmotor.cpp:308
virtual double getPower2()
return the maximal force
Definition: angularmotor.cpp:240
std::list< std::pair< double, Axis > > axis
Definition: angularmotor.h:242
virtual bool act(GlobalData &globaldata) override
performs the actions, This is usually called in doInternalStuff() from the robot
Definition: angularmotor.h:60
virtual void setPower(double power)=0
sets the maximal force the motor has
virtual std::list< sensor > getList() const override
returns a list of sensor values (usually in the range [-1,1] ) This function should be overloaded...
Definition: angularmotor.h:54
virtual void set(int axisNumber, double velocity)
sets the desired speed of the motor at the given axis.
Definition: angularmotor.cpp:201
virtual void set(int axisNumber, double velocity)
sets the desired speed of the motor at the given axis.
Definition: angularmotor.cpp:146
double motor
Definition: types.h:30
virtual int getMotorNumber() const override
return the dimensionality of this motor
Definition: angularmotor.h:58
virtual int getNumberOfAxes() const override
returns the number of Axis of this Motor
Definition: angularmotor.h:154
virtual int getNumberOfAxes() const override
returns the number of Axis of this Motor
Definition: angularmotor.h:123
Axis axis1
Definition: angularmotor.h:205
virtual void init(Primitive *own, Joint *joint=0) override
initialises motor with body of robot
Definition: angularmotor.cpp:48
virtual double getVelovityFactor(double factor)
retuns factor for velocity
Definition: angularmotor.cpp:112
OdeHandle odeHandle
Definition: angularmotor.h:103
virtual ~AngularMotorNAxis()
Definition: angularmotor.h:223
AngularMotor3AxisEuler(const OdeHandle &odeHandle, BallJoint *joint, const Axis &axis1, const Axis &axis3, double power)
Constuct a motor attached to a BallJoint.
Definition: angularmotor.cpp:374
AngularMotorNAxis(const OdeHandle &odeHandle, Joint *joint, std::list< std::pair< double, Axis > > axis)
Constuct a motor attached to any Joint (not Sliders!).
Definition: angularmotor.cpp:253
virtual int getSensorNumber() const override
returns the number of sensors values produced by this sensor
Definition: angularmotor.h:51
virtual int getNumberOfAxes() const =0
returns the number of Axis of this Motor
Angular motor for OneAxisJoints.
Definition: angularmotor.h:111
std::list< sensor > getListOfArray() const
helper function for performance implementation of list<> get() based on array-get ...
Definition: sensor.h:99
double power2
Definition: angularmotor.h:170