YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeLocalizer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#include <yarp/os/Network.h>
7#include <yarp/os/RFModule.h>
8#include <yarp/os/Time.h>
9#include <yarp/os/Port.h>
10#include <yarp/os/LogStream.h>
11#include <yarp/dev/PolyDriver.h>
12#include <yarp/os/Bottle.h>
13#include <yarp/sig/Vector.h>
17#include <math.h>
18#include <mutex>
19
21
22using namespace yarp::os;
23
49
62{
63public:
65 std::mutex m_mutex;
66
67 virtual bool open(yarp::os::Searchable& config) override;
68
70 virtual ~FakeLocalizer();
71
72 virtual bool close() override;
73
74public:
75 //methods inherited from yarp::dev::Nav2D::ILocalization2D
77 yarp::dev::ReturnValue getEstimatedPoses(std::vector<yarp::dev::Nav2D::Map2DLocation>& poses) override;
85};
define control board standard interfaces
contains the definition of a Vector type
This class is the parameters parser for class FakeLocalizer.
fakeLocalizer Documentation to be added
virtual bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
std::mutex m_mutex
fakeLocalizerThread * locThread
virtual bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
yarp::dev::ReturnValue startLocalizationService() override
Starts the localization service.
yarp::dev::ReturnValue stopLocalizationService() override
Stops the localization service.
virtual ~FakeLocalizer()
yarp::dev::ReturnValue setInitialPose(const yarp::dev::Nav2D::Map2DLocation &loc) override
Sets the initial pose for the localization algorithm which estimates the current position of the robo...
yarp::dev::ReturnValue getEstimatedPoses(std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
Gets a set of pose estimates computed by the localization algorithm.
yarp::dev::ReturnValue getEstimatedOdometry(yarp::dev::OdometryData &odom) override
Gets the estimated odometry the robot, including its velocity expressed in the world and in the local...
yarp::dev::ReturnValue getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
virtual void run() override
Loop function.
yarp::dev::Nav2D::Map2DLocation m_current_loc
virtual bool threadInit() override
Initialization method.
yarp::dev::Nav2D::Map2DLocation m_current_odom
bool getCurrentLoc(yarp::dev::Nav2D::Map2DLocation &loc)
yarp::dev::Nav2D::Map2DLocation m_initial_loc
std::string m_local_name
virtual void threadRelease() override
Release method.
double m_last_statistics_printed
bool initializeLocalization(const yarp::dev::Nav2D::Map2DLocation &loc)
yarp::dev::Nav2D::Map2DLocation m_initial_odom
std::mutex m_mutex_thread
Interface implemented by all device drivers.
ILocalization2D interface.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition Searchable.h:31
A class for a Matrix.
Definition Matrix.h:39
An interface to the operating system, including Port based communication.