6 #ifndef __POSDIRCONTROLTHREAD__
7 #define __POSDIRCONTROLTHREAD__
12 #include <yarp/os/PeriodicThread.h>
13 #include <yarp/os/Bottle.h>
14 #include <yarp/dev/ControlBoardInterfaces.h>
15 #include <yarp/dev/PolyDriver.h>
16 #include <yarp/sig/Vector.h>
17 #include <yarp/os/Time.h>
23 yarp::dev::IPositionDirect *idir;
24 yarp::dev::IControlLimits *ilim;
25 yarp::dev::IPositionControl *ipos;
26 yarp::dev::IEncoders *ienc;
27 yarp::dev::IControlMode *imod;
29 unsigned int part_joints;
30 unsigned int control_joints;
31 int* control_joints_list;
33 yarp::dev::PolyDriver *driver;
35 yarp::sig::Vector min_limits;
36 yarp::sig::Vector max_limits;
37 yarp::sig::Vector encoders;
39 yarp::sig::Vector targets;
40 yarp::sig::Vector prev_targets;
42 yarp::sig::Vector error;
50 yarp::os::BufferedPort<yarp::os::Bottle> command_port;
58 bool init(yarp::dev::PolyDriver *d, std::string moduleName, std::string partName, std::string robotName, yarp::os::Bottle* jointsList);
63 void setVel(
int i,
double vel);
64 void setGain(
int i,
double gain);
void limitSpeed(yarp::sig::Vector &command)
void setVel(int i, double vel)
~positionDirectControlThread()
positionDirectControlThread(int rate)
bool init(yarp::dev::PolyDriver *d, std::string moduleName, std::string partName, std::string robotName, yarp::os::Bottle *jointsList)
void setGain(int i, double gain)