YARP
Yet Another Robot Platform
Localization2DClient.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 #ifndef YARP_DEV_LOCALIZATION2DCLIENT_H
7 #define YARP_DEV_LOCALIZATION2DCLIENT_H
8 
9 
10 #include <yarp/os/Network.h>
11 #include <yarp/os/BufferedPort.h>
15 #include <yarp/sig/Vector.h>
16 #include <yarp/os/Semaphore.h>
17 #include <yarp/os/Time.h>
18 #include <yarp/os/Port.h>
19 #include <mutex>
20 #include <string>
21 #include <yarp/dev/PolyDriver.h>
22 #include <yarp/dev/Map2DLocation.h>
24 
25 
42 {
43 protected:
44  std::mutex m_mutex;
46  std::string m_local_name;
47  std::string m_remote_name;
48 
49 public:
50  /* DeviceDriver methods */
51  bool open(yarp::os::Searchable& config) override;
52  bool close() override;
53 
54  /* The following methods belong to ILocalization2D interface */
56  bool getEstimatedOdometry(yarp::dev::OdometryData& odom) override;
57  bool setInitialPose(const yarp::dev::Nav2D::Map2DLocation& loc) override;
59  bool getEstimatedPoses(std::vector<yarp::dev::Nav2D::Map2DLocation>& poses) override;
60  bool setInitialPose(const yarp::dev::Nav2D::Map2DLocation& loc, const yarp::sig::Matrix& cov) override;
62  bool startLocalizationService() override;
63  bool stopLocalizationService() override;
64 };
65 
66 #endif // YARP_DEV_LOCALIZATION2DCLIENT_H
define control board standard interfaces
contains the definition of a Map2DLocation type
contains the definition of a Vector type
localization2DClient A device which allows a user application retrieve the current position of the ro...
bool getEstimatedOdometry(yarp::dev::OdometryData &odom) override
Gets the estimated odometry the robot, including its velocity expressed in the world and in the local...
bool startLocalizationService() override
Starts the localization service.
bool getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
bool close() override
Close the DeviceDriver.
bool getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
bool setInitialPose(const yarp::dev::Nav2D::Map2DLocation &loc) override
Sets the initial pose for the localization algorithm which estimates the current position of the robo...
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool stopLocalizationService() override
Stops the localization service.
bool getEstimatedPoses(std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
Gets a set of pose estimates computed by the localization algorithm.
yarp::os::Port m_rpc_port_localization_server
Interface implemented by all device drivers.
Definition: DeviceDriver.h:35
ILocalization2D interface.
A mini-server for network communication.
Definition: Port.h:47
A base class for nested structures that can be searched.
Definition: Searchable.h:66
A class for a Matrix.
Definition: Matrix.h:43