#include <yarp/dev/Map2DLocation.h>
Public Member Functions | |
Map2DLocation (const std::string &map_name, const double &inX, const double &inY, const double &inT, const std::string &desc="") | |
Constructor. | |
Map2DLocation (const std::string &map_name, const yarp::dev::Nav2D::XYWorld &location, const std::string &desc="") | |
A constructor which accepts a yarp::math::Vec2D, defining the location by its x,y coordinates. | |
Map2DLocation () | |
Default constructor: the map name is empty, coordinates are set to zero. | |
std::string | toString () const |
Returns text representation of the location. | |
bool | operator!= (const Map2DLocation &r) const |
Compares two Map2DLocations. | |
bool | operator== (const Map2DLocation &r) const |
Compares two Map2DLocations. | |
bool | is_near_to (const Map2DLocation &other_loc, double linear_tolerance, double angular_tolerance) const |
Compares two Map2DLocations. | |
bool | read (yarp::os::idl::WireReader &reader) override |
Serialization methods. | |
bool | write (const yarp::os::idl::WireWriter &writer) const override |
bool | read (yarp::os::ConnectionReader &reader) override |
Read this object from a network connection. | |
bool | write (yarp::os::ConnectionWriter &writer) const override |
Write this object to a network connection. | |
Public Member Functions inherited from yarp::dev::Map2DLocationData | |
Map2DLocationData ()=default | |
Map2DLocationData (const std::string &map_id, const double x, const double y, const double theta, const std::string &description) | |
bool | read (yarp::os::idl::WireReader &reader) override |
bool | read (yarp::os::ConnectionReader &connection) override |
Read this object from a network connection. | |
bool | write (const yarp::os::idl::WireWriter &writer) const override |
bool | write (yarp::os::ConnectionWriter &connection) const override |
Write this object to a network connection. | |
std::string | toString () const |
Public Member Functions inherited from yarp::os::idl::WirePortable | |
virtual bool | readBare (yarp::os::ConnectionReader &reader) |
virtual bool | writeBare (yarp::os::ConnectionWriter &writer) const |
virtual bool | readBottle (yarp::os::ConnectionReader &reader) |
virtual bool | writeBottle (yarp::os::ConnectionWriter &writer) const |
Public Member Functions inherited from yarp::os::Portable | |
virtual Type | getType () const |
Public Member Functions inherited from yarp::os::PortReader | |
virtual | ~PortReader () |
Destructor. | |
virtual Type | getReadType () const |
Public Member Functions inherited from yarp::os::PortWriter | |
virtual | ~PortWriter () |
Destructor. | |
virtual void | onCompletion () const |
This is called when the port has finished all writing operations. | |
virtual void | onCommencement () const |
This is called when the port is about to begin writing operations. | |
virtual yarp::os::Type | getWriteType () const |
Additional Inherited Members | |
Public Types inherited from yarp::dev::Map2DLocationData | |
typedef yarp::os::idl::Unwrapped< Map2DLocationData > | unwrapped |
Static Public Member Functions inherited from yarp::os::Portable | |
static bool | copyPortable (const PortWriter &writer, PortReader &reader) |
Copy one portable to another, via writing and reading. | |
Public Attributes inherited from yarp::dev::Map2DLocationData | |
std::string | map_id {} |
name of the map | |
double | x {0.0} |
x position of the location [m], expressed in the map reference frame | |
double | y {0.0} |
y position of the location [m], expressed in the map reference frame | |
double | theta {0.0} |
orientation [deg] in the map reference frame | |
std::string | description {} |
user defined string | |
Definition at line 21 of file Map2DLocation.h.
|
inline |
Constructor.
map_name | the name of the map the location refers to. |
inX | location coordinates w.r.t. map reference frame (expressed in meters) |
inY | location coordinates w.r.t. map reference frame (expressed in meters) |
inT | location orientation w.r.t. map reference frame (expressed in degrees) |
Definition at line 30 of file Map2DLocation.h.
|
inline |
A constructor which accepts a yarp::math::Vec2D, defining the location by its x,y coordinates.
The orientation is set to 0 by default.
map_name | the name of the map the location refers to. |
inX | location coordinates w.r.t. map reference frame (expressed in meters) |
inY | location coordinates w.r.t. map reference frame (expressed in meters) |
inT | location orientation w.r.t. map reference frame (expressed in degrees) |
Definition at line 47 of file Map2DLocation.h.
|
inline |
Default constructor: the map name is empty, coordinates are set to zero.
Definition at line 59 of file Map2DLocation.h.
bool Map2DLocation::is_near_to | ( | const Map2DLocation & | other_loc, |
double | linear_tolerance, | ||
double | angular_tolerance | ||
) | const |
Compares two Map2DLocations.
Definition at line 16 of file Map2DLocation.cpp.
|
inline |
Compares two Map2DLocations.
Definition at line 86 of file Map2DLocation.h.
|
inline |
Compares two Map2DLocations.
Definition at line 99 of file Map2DLocation.h.
|
inlineoverridevirtual |
Read this object from a network connection.
Override this for your particular class.
reader | an interface to the network connection for reading |
Implements yarp::os::Portable.
Definition at line 125 of file Map2DLocation.h.
|
inlineoverridevirtual |
Serialization methods.
Reimplemented from yarp::os::idl::WirePortable.
Definition at line 117 of file Map2DLocation.h.
|
inline |
Returns text representation of the location.
Definition at line 72 of file Map2DLocation.h.
|
inlineoverridevirtual |
Reimplemented from yarp::os::idl::WirePortable.
Definition at line 121 of file Map2DLocation.h.
|
inlineoverridevirtual |
Write this object to a network connection.
Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write
writer | an interface to the network connection for writing |
Implements yarp::os::Portable.
Definition at line 129 of file Map2DLocation.h.