37 #include <yarp/os/all.h>
38 #include <yarp/sig/all.h>
40 #define D4C_DEFAULT_MAXITERATIONS 1000
41 #define D4C_DEFAULT_TS_DISABLED 0.0
102 virtual bool open(
const yarp::os::Property &options) = 0;
107 virtual void close() = 0;
173 virtual bool addItem(
const yarp::os::Property &options,
int &item) = 0;
180 virtual bool eraseItem(
const int item) = 0;
193 virtual bool getItems(yarp::os::Bottle &items) = 0;
202 virtual bool setProperty(
const int item,
const yarp::os::Property &options) = 0;
211 virtual bool getProperty(
const int item, yarp::os::Property &options) = 0;
280 virtual bool setPeriod(
const int period) = 0;
305 virtual bool attachToolFrame(
const yarp::sig::Vector &x,
const yarp::sig::Vector &o) = 0;
316 virtual bool getToolFrame(yarp::sig::Vector &x, yarp::sig::Vector &o) = 0;
338 virtual bool getTool(yarp::sig::Vector &x, yarp::sig::Vector &o) = 0;
352 virtual bool setPointState(
const yarp::sig::Vector &x,
const yarp::sig::Vector &o,
353 const yarp::sig::Vector &xdot,
const yarp::sig::Vector &odot) = 0;
364 virtual bool setPointOrientation(
const yarp::sig::Vector &o,
const yarp::sig::Vector &odot) = 0;
378 virtual bool getPointState(yarp::sig::Vector &x, yarp::sig::Vector &o,
379 yarp::sig::Vector &xdot, yarp::sig::Vector &odot) = 0;
386 virtual bool getField(yarp::sig::Vector &field) = 0;
399 virtual bool getSimulation(yarp::sig::Vector &xhat, yarp::sig::Vector &ohat,
400 yarp::sig::Vector &qhat) = 0;
409 virtual bool getActiveIF(std::string &activeIF) = 0;
417 virtual bool setActiveIF(
const std::string &activeIF) = 0;
432 virtual bool getTrajectory(std::deque<yarp::sig::Vector> &trajPos,
433 std::deque<yarp::sig::Vector> &trajOrien,
434 const unsigned int maxIterations=D4C_DEFAULT_MAXITERATIONS,
435 const double Ts=D4C_DEFAULT_TS_DISABLED) = 0;
447 const std::deque<yarp::sig::Vector> &trajOrien,
448 const double trajTime) = 0;
virtual bool enableSimulation()=0
Enable the simulation of the robot part.
virtual bool getField(yarp::sig::Vector &field)=0
Retrieve the current field as generated by the d4c framework.
virtual bool disableField()=0
Disable the generation of the d4c field.
virtual bool getControlStatus(bool &status)=0
Retrieve the current status of the robot part control.
virtual bool disableControl()=0
Disable the control of the robot part.
virtual bool addItem(const yarp::os::Property &options, int &item)=0
Request for the creation of a new d4c entity which can be either a target or an obstacle.
virtual bool open(const yarp::os::Property &options)=0
Configure the client or the server part of d4c framework.
virtual ~D4C()
Destructor.
virtual bool clearItems()=0
Purge all the items contained in the table.
virtual bool executeTrajectory(const std::deque< yarp::sig::Vector > &trajPos, const std::deque< yarp::sig::Vector > &trajOrien, const double trajTime)=0
Execute the simulated trajectory provided by the user.
virtual bool removeToolFrame()=0
Remove the tool currently attached to the end-effector.
virtual bool getActiveIF(std::string &activeIF)=0
Retrieve the interface currently active that controls the limb.
virtual bool getItems(yarp::os::Bottle &items)=0
Retrieve the list of all available items.
virtual bool getPeriod(int &period)=0
Retrieve the current thread period for d4c field generation.
virtual bool attachToolFrame(const yarp::sig::Vector &x, const yarp::sig::Vector &o)=0
Attach a tool frame to the end-effector.
virtual bool getSimulationStatus(bool &status)=0
Retrieve the current status of the robot part simulation.
virtual bool getPointState(yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::sig::Vector &xdot, yarp::sig::Vector &odot)=0
Retrieve the current trajectory state generated by the d4c framework.
virtual bool getProperty(const int item, yarp::os::Property &options)=0
Retrieve the properties of an existing item.
virtual bool getFieldStatus(bool &status)=0
Retrieve the current status of the d4c field.
virtual void close()=0
Stop the client/server and dispose it.
virtual bool setActiveIF(const std::string &activeIF)=0
Set the active interface for limb control.
virtual bool getToolFrame(yarp::sig::Vector &x, yarp::sig::Vector &o)=0
Retrieve the frame of the tool currently attached to the end-effector.
virtual bool setPointState(const yarp::sig::Vector &x, const yarp::sig::Vector &o, const yarp::sig::Vector &xdot, const yarp::sig::Vector &odot)=0
Allow chainging the trajectory state generated by the d4c framework.
virtual bool enableField()=0
Enable the generation of the d4c field.
virtual bool setPointOrientation(const yarp::sig::Vector &o, const yarp::sig::Vector &odot)=0
Allow changing the orientation state of the trajectory generated by the d4c framework.
virtual bool setPeriod(const int period)=0
Allow changing the thread period for d4c field generation.
virtual bool setProperty(const int item, const yarp::os::Property &options)=0
Allow changing the properties of an existing item.
virtual bool enableControl()=0
Enable the control of the robot part.
virtual bool disableSimulation()=0
Disable the simulation of the robot part.
virtual bool getTool(yarp::sig::Vector &x, yarp::sig::Vector &o)=0
Retrieve the coordinates of the tool currently attached to the end-effector.
virtual bool setPointStateToTool()=0
Allow setting the trajectory state equal to the currently attached tool state (or end-effector state ...
The Definition of the D4C Interface.
virtual bool getTrajectory(std::deque< yarp::sig::Vector > &trajPos, std::deque< yarp::sig::Vector > &trajOrien, const unsigned int maxIterations=D4C_DEFAULT_MAXITERATIONS, const double Ts=D4C_DEFAULT_TS_DISABLED)=0
Retrieve the complete simulated trajectory as evolved from the current state point.
virtual bool eraseItem(const int item)=0
Remove one item from the items table.
virtual bool getSimulation(yarp::sig::Vector &xhat, yarp::sig::Vector &ohat, yarp::sig::Vector &qhat)=0
Sample step by step the trajectory the end-effector will follow as constrained by the d4c field...