6#define _USE_MATH_DEFINES
49 double tmpDT=now-prev;
51 if (
tmpDT > deltaTMax) {
54 if (
tmpDT < deltaTMin) {
59 if (
tmpDT*1000<DATA_TIMEOUT_ms)
83 if ((1000 * (
newStamp.getTime() - lastStamp.
getTime())) < DATA_TIMEOUT_ms)
201 if (timestamp !=
nullptr)
virtual yarp::dev::ReturnValue reset_odometry_RPC()
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
OdometryData2DInputPortProcessor m_inputPort
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
virtual yarp::dev::ReturnValue getOdometry(yarp::dev::OdometryData &odom, double *timestamp=nullptr) override
Gets the odometry of the robot, including its velocity expressed in the world and in the local refere...
bool close() override
Close the DeviceDriver.
virtual yarp::dev::ReturnValue resetOdometry() override
Resets the odometry of the robot to zero.
A mini-server for performing network communication in the background.
bool getEnvelope(PortReader &envelope) override
void close() override
Stop port activity.
void disableCallback() override
Remove a callback set up with useCallback()
BufferedPort()
Constructor.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
void useCallback(TypedReaderCallback< T > &callback) override
Set an object whose onRead method will be called when data is available.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.
double getTime() const
Get the time stamp.
bool isValid() const
Check if this Stamp is valid.
static double nowSystem()
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.