YARP
Yet Another Robot Platform
Localization2D_nwc_yarp.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_LOCALIZATION2D_NWC_YARP_H
7#define YARP_DEV_LOCALIZATION2D_NWC_YARP_H
8
9
10#include <yarp/os/Network.h>
14#include <yarp/sig/Vector.h>
15#include <yarp/os/Semaphore.h>
16#include <yarp/os/Time.h>
17#include <yarp/os/Port.h>
18#include <mutex>
19#include <string>
20#include <yarp/dev/PolyDriver.h>
23#include "ILocalization2DMsgs.h"
24
41{
42protected:
43 std::mutex m_mutex;
45 std::string m_local_name;
46 std::string m_remote_name;
48
49public:
50 /* DeviceDriver methods */
51 bool open(yarp::os::Searchable& config) override;
52 bool close() override;
53
54 /* The following methods belong to ILocalization2D interface */
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_LOCALIZATION2D_NWC_YARP_H
define control board standard interfaces
contains the definition of a Map2DLocation type
contains the definition of a Vector type
Localization2D_nwc_yarp A device which allows a user application retrieve the current position of the...
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.
bool getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
yarp::os::Port m_rpc_port_localization_server
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 close() override
Close the DeviceDriver.
bool startLocalizationService() override
Starts the localization service.
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 getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Interface implemented by all device drivers.
Definition: DeviceDriver.h:30
ILocalization2D interface.
A mini-server for network communication.
Definition: Port.h:46
A base class for nested structures that can be searched.
Definition: Searchable.h:63
A class for a Matrix.
Definition: Matrix.h:39