YARP
Yet Another Robot Platform

localization2DClient A device which allows a user application retrieve the current position of the robot in the world. More...

#include <localization2DClient/Localization2DClient.h>

+ Inheritance diagram for Localization2DClient:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool getCurrentPosition (yarp::dev::Nav2D::Map2DLocation &loc) override
 Gets the current position of the robot w.r.t world reference frame. More...
 
bool getEstimatedOdometry (yarp::dev::OdometryData &odom) override
 Gets the estimated odometry the robot, including its velocity expressed in the world and in the local reference frame. More...
 
bool setInitialPose (const yarp::dev::Nav2D::Map2DLocation &loc) override
 Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame. More...
 
bool getLocalizationStatus (yarp::dev::Nav2D::LocalizationStatusEnum &status) override
 Gets the current status of the localization task. More...
 
bool getEstimatedPoses (std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
 Gets a set of pose estimates computed by the localization algorithm. More...
 
bool setInitialPose (const yarp::dev::Nav2D::Map2DLocation &loc, const yarp::sig::Matrix &cov) override
 Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame. More...
 
bool getCurrentPosition (yarp::dev::Nav2D::Map2DLocation &loc, yarp::sig::Matrix &cov) override
 Gets the current position of the robot w.r.t world reference frame, plus the covariance. More...
 
bool startLocalizationService () override
 Starts the localization service. More...
 
bool stopLocalizationService () override
 Stops the localization service. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::ILocalization2D
virtual ~ILocalization2D ()
 Destructor. More...
 

Protected Attributes

std::mutex m_mutex
 
yarp::os::Port m_rpc_port_localization_server
 
std::string m_local_name
 
std::string m_remote_name
 

Detailed Description

localization2DClient A device which allows a user application retrieve the current position of the robot in the world.

Localization2DClient

Parameters required by this device are:

Parameter name SubParameter Type Units Default Value Required Description Notes
local - string - - Yes Full port name opened by the Localization2DClient device.
remote - string - - Yes Full port name of the port opened on the server side, to which the Localization2DClient connects to. E.g.(https://github.com/robotology/navigation/src/localizationServer)

Definition at line 52 of file Localization2DClient.h.

Member Function Documentation

◆ close()

bool Localization2DClient::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 372 of file Localization2DClient.cpp.

◆ getCurrentPosition() [1/2]

bool Localization2DClient::getCurrentPosition ( yarp::dev::Nav2D::Map2DLocation loc)
overridevirtual

Gets the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 168 of file Localization2DClient.cpp.

◆ getCurrentPosition() [2/2]

bool Localization2DClient::getCurrentPosition ( yarp::dev::Nav2D::Map2DLocation loc,
yarp::sig::Matrix cov 
)
overridevirtual

Gets the current position of the robot w.r.t world reference frame, plus the covariance.

Parameters
locthe location of the robot
covthe 3x3 covariance matrix
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 201 of file Localization2DClient.cpp.

◆ getEstimatedOdometry()

bool Localization2DClient::getEstimatedOdometry ( yarp::dev::OdometryData odom)
overridevirtual

Gets the estimated odometry the robot, including its velocity expressed in the world and in the local reference frame.

Parameters
locthe estimated odometry.
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 162 of file Localization2DClient.cpp.

◆ getEstimatedPoses()

bool Localization2DClient::getEstimatedPoses ( std::vector< yarp::dev::Nav2D::Map2DLocation > &  poses)
overridevirtual

Gets a set of pose estimates computed by the localization algorithm.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 242 of file Localization2DClient.cpp.

◆ getLocalizationStatus()

bool Localization2DClient::getLocalizationStatus ( yarp::dev::Nav2D::LocalizationStatusEnum status)
overridevirtual

Gets the current status of the localization task.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 292 of file Localization2DClient.cpp.

◆ open()

bool Localization2DClient::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 39 of file Localization2DClient.cpp.

◆ setInitialPose() [1/2]

bool Localization2DClient::setInitialPose ( const yarp::dev::Nav2D::Map2DLocation loc)
overridevirtual

Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 97 of file Localization2DClient.cpp.

◆ setInitialPose() [2/2]

bool Localization2DClient::setInitialPose ( const yarp::dev::Nav2D::Map2DLocation loc,
const yarp::sig::Matrix cov 
)
overridevirtual

Sets the initial pose for the localization algorithm which estimates the current position of the robot w.r.t world reference frame.

Parameters
locthe location of the robot
covthe 3x3 covariance matrix
Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 126 of file Localization2DClient.cpp.

◆ startLocalizationService()

bool Localization2DClient::startLocalizationService ( )
overridevirtual

Starts the localization service.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 322 of file Localization2DClient.cpp.

◆ stopLocalizationService()

bool Localization2DClient::stopLocalizationService ( )
overridevirtual

Stops the localization service.

Returns
true/false

Implements yarp::dev::Nav2D::ILocalization2D.

Definition at line 347 of file Localization2DClient.cpp.

Member Data Documentation

◆ m_local_name

std::string Localization2DClient::m_local_name
protected

Definition at line 59 of file Localization2DClient.h.

◆ m_mutex

std::mutex Localization2DClient::m_mutex
protected

Definition at line 57 of file Localization2DClient.h.

◆ m_remote_name

std::string Localization2DClient::m_remote_name
protected

Definition at line 60 of file Localization2DClient.h.

◆ m_rpc_port_localization_server

yarp::os::Port Localization2DClient::m_rpc_port_localization_server
protected

Definition at line 58 of file Localization2DClient.h.


The documentation for this class was generated from the following files: