YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeOdometry2D.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_FAKEODOMETRY2D_H
7#define YARP_FAKEODOMETRY2D_H
8
10#include <yarp/sig/Vector.h>
13
15
16constexpr double default_period = 0.02;
17
34{
35public:
37
38 // PeriodicThread
39 virtual bool threadInit() override;
40 virtual void threadRelease() override;
41 virtual void run() override;
42
43 // DeviceDriver
44 bool open(yarp::os::Searchable& config) override;
45 bool close() override;
46
47 // IOdometry2D
48 yarp::dev::ReturnValue getOdometry(yarp::dev::OdometryData& odom, double* timestamp=nullptr) override;
50
51private:
52 yarp::dev::OdometryData m_odometryData;
53
54 std::mutex m_odometry_mutex;
55 double m_period;
56 double m_timestamp=0;
57};
58
59#endif // YARP_FAKEODOMETRY2D_H
constexpr double default_period
contains the definition of a Vector type
This class is the parameters parser for class FakeOdometry2D.
fakeOdometry2D: A device for generating a fake odometry. This device will generate the odometry and t...
virtual void threadRelease() override
Release method.
virtual void run() override
Loop function.
yarp::dev::ReturnValue resetOdometry() override
Resets the odometry of the robot to zero.
bool close() override
Close the DeviceDriver.
virtual bool threadInit() override
Initialization method.
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 open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Interface implemented by all device drivers.
IOdometry2D interface.
Definition IOdometry2D.h:23
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition Searchable.h:31