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 getTorque()
this is just a fake torque interface for now
virtual void setPosition(double target)
Drive towards an angle setpoint (in ICUB units/sign).
virtual double getAngle()
Get the angle of an associated joint, in ICUB units and sign.
virtual void setVelocity(double target)
Set velocity of joint (in ICUB units/sign).
virtual double getVelocity()
Get the angular velocity of an associated joint, in ICUB units and sign.
virtual void setTorque(double target)
Set the reference torque.
virtual void controlModeChanged(int cm)
virtual void setControlParameters(double vel, double acc)
Set velocity and acceleration control parameters.
Abstract class for mapping from "physical" (simulated) joints in the model to control joints in the I...