Go to the documentation of this file.
21 #ifndef ICUBSIMULATION_FAKELOGICALJOINT_INC
22 #define ICUBSIMULATION_FAKELOGICALJOINT_INC
26 #include <yarp/os/Time.h>
36 last = yarp::os::Time::now();
37 angle = vel = torque = 0;
56 vel = (target-angle)*5;
80 double now = yarp::os::Time::now();
81 angle += vel*(now-last);
virtual double getVelocity()
Get the angular velocity of an associated joint, in ICUB units and sign.
virtual void setPosition(double target)
Drive towards an angle setpoint (in ICUB units/sign).
Abstract class for mapping from "physical" (simulated) joints in the model to control joints in the I...
virtual void controlModeChanged(int cm)
virtual void setVelocity(double target)
Set velocity of joint (in ICUB units/sign).
virtual void setTorque(double target)
Set the reference torque.
virtual double getTorque()
this is just a fake torque interface for now
virtual void setControlParameters(double vel, double acc)
Set velocity and acceleration control parameters.
virtual double getAngle()
Get the angle of an associated joint, in ICUB units and sign.