6#ifndef YARP_DEV_MAP2DOBJECT_H
7#define YARP_DEV_MAP2DOBJECT_H
31 Map2DObject(
const std::string& map_name,
const double& inX,
const double& inY,
const double& inZ,
const double& inr=0,
const double& inp=0,
const double& iny=0,
const std::string& desc =
"")
84 std::ostringstream stringStream;
85 stringStream.precision(-1);
86 stringStream.width(-1);
87 stringStream << std::string(
"map_id:") << map_id << std::string(
" x:") << x << std::string(
" y:") << y << std::string(
" z:") << z;
88 stringStream << std::string(
" roll:") << roll << std::string(
" pitch:") << pitch << std::string(
" yaw:") << yaw <<
" ";
89 stringStream << std::string(
"desc:") << description;
90 return stringStream.str();
100 map_id != r.
map_id || x != r.
x || y != r.
y || z != r.
z ||
114 map_id == r.
map_id && x == r.
x && y == r.
y && z == r.
z &&
125 bool is_near_to(
const Map2DObject& other_loc,
double linear_tolerance)
const;
126 bool is_near_to(
const Map2DLocation& other_loc,
double linear_tolerance)
const;
133 return Map2DObjectData::read(reader);
137 return Map2DObjectData::write(writer);
141 return Map2DObjectData::read(reader);
145 return Map2DObjectData::write(writer);
contains the definition of a Map2DLocation type
contains definitions for common types used in navigation interfaces
double yaw
orientation [deg] in the map reference frame
double y
y position of the location [m], expressed in the map reference frame
double pitch
orientation [deg] in the map reference frame
double roll
orientation [deg] in the map reference frame
std::string map_id
name of the map
double z
z position of the location [m], expressed in the map reference frame
double x
x position of the location [m], expressed in the map reference frame
An interface for reading from a network connection.
An interface for writing to a network connection.
IDL-friendly connection reader.
IDL-friendly connection writer.
yarp::math::Vec2D< double > XYWorld
bool write(const yarp::os::idl::WireWriter &writer) const override
std::string toString() const
Returns text representation of the object.
bool read(yarp::os::ConnectionReader &reader) override
Read this object from a network connection.
bool read(yarp::os::idl::WireReader &reader) override
Serialization methods.
Map2DObject(const std::string &map_name, const double &inX, const double &inY, const double &inZ, const double &inr=0, const double &inp=0, const double &iny=0, const std::string &desc="")
Constructor.
Map2DObject(const std::string &map_name, const yarp::dev::Nav2D::XYWorld &object, const std::string &desc="")
A constructor which accepts a yarp::math::Vec2D, defining the object by its x,y coordinates.
bool operator!=(const Map2DObject &r) const
Compares two Map2DObjects.
Map2DObject()
Default constructor: the map name is empty, coordinates are set to zero.
bool operator==(const Map2DObject &r) const
Compares two Map2DObjects.
bool write(yarp::os::ConnectionWriter &writer) const override
Write this object to a network connection.