1 #ifndef TASK_YARP_INTERFACE_H 2 #define TASK_YARP_INTERFACE_H 12 #include <Eigen/Dense> 14 #include <yarp/os/Network.h> 15 #include <yarp/os/PortReader.h> 16 #include <yarp/os/RpcServer.h> 17 #include <yarp/os/ConnectionReader.h> 18 #include <yarp/os/Port.h> 19 #include <yarp/os/RateThread.h> 20 #include <yarp/os/Log.h> 21 #include <yarp/os/LogStream.h> 183 void setWeight(
const Eigen::VectorXd& weights);
234 virtual bool read(yarp::os::ConnectionReader& connection);
247 yarp::os::Bottle input;
252 virtual bool read(yarp::os::ConnectionReader& connection);
272 void threadRelease();
278 void parseIncomingMessage(yarp::os::Bottle& input, yarp::os::Bottle& reply);
279 std::string printValidMessageTags();
280 bool openControlPorts();
281 bool closeControlPorts();
282 bool parseControlInput(yarp::os::Bottle& input);
290 yarp::os::Network yarp;
291 yarp::os::RpcServer rpcPort;
292 std::string portName;
293 RpcMessageCallback::Ptr rpcCallback;
295 bool controlPortsOpen;
297 yarp::os::Bottle stateInBottle;
298 std::string inputControlPortName;
299 yarp::os::Port inputControlPort;
300 ControlInputCallback::Ptr controlCallback;
302 yarp::os::Bottle stateOutBottle;
303 std::string outputControlPortName;
304 yarp::os::Port outputControlPort;
306 yarp::os::Bottle desiredStateOutBottle;
307 std::string desiredStateOutputPortName;
308 yarp::os::Port desiredStateOutputPort;
313 StateUpdateThread::Ptr stateThread;
314 int numberOfOpenRequests;
323 #endif // TASK_YARP_INTERFACE_H Eigen::Vector3d getTaskFramePosition()
Eigen::VectorXd getWeight()
Eigen::Vector3d getTaskFrameAngularVelocity()
int getTaskHierarchyLevel()
Eigen::Vector3d getTaskFrameLinearVelocity()
void setWeight(double weight)
Eigen::Twistd getTaskFrameAcceleration()
Eigen::Vector3d getTaskFrameLinearAcceleration()
virtual ~TaskYarpInterface()
void setTaskHierarchyLevel(int level)
#define DEFINE_CLASS_POINTER_TYPEDEFS(Class)
void setDesiredTaskState(const TaskState &newDesiredTaskState)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
TaskState getDesiredTaskState()
void setStiffness(double K)
RpcMessageCallback(TaskYarpInterface &tmBaseRef)
double getTaskErrorNorm()
Eigen::Rotation3d getTaskFrameOrientation()
Eigen::MatrixXd getDampingMatrix()
Eigen::VectorXd getTaskError()
Eigen::Twistd getTaskFrameVelocity()
Eigen::MatrixXd getStiffnessMatrix()
TASK_MODE
A basic enumeration for the different types of tasks we can have.
Eigen::Vector3d getTaskFrameAngularAcceleration()
void setDamping(double B)
virtual bool read(yarp::os::ConnectionReader &connection)
Eigen::Displacementd getTaskFrameDisplacement()
void setDesiredTaskStateDirect(const TaskState &newDesiredTaskState)
std::string getPortName()
TaskYarpInterface(Task::Ptr taskPtr)