INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

orcaobj Namespace Reference

Utilities for initializing and manipulating Orca data objects. More...

Functions

void setInit (orca::Frame2d &, double x=0.0, double y=0.0, double orient=0.0)
 Sets all fields to specified values.
void setInit (orca::Frame3d &, double x=0.0, double y=0.0, double z=0.0, double pitch=0.0, double roll=0.0, double yaw=0.0)
 Sets all fields to specified values.
void setInit (orca::Twist2d &, double vx=0.0, double vy=0.0, double w=0.0)
 Sets all fields to specified values.
void setInit (orca::Twist3d &, double vx=0.0, double vy=0.0, double vz=0.0, double wx=0.0, double wy=0.0, double wz=0.0)
 Sets all fields to specified values.
void setInit (orca::Size2d &, double l=0.0, double w=0.0)
 Sets all fields to specified values.
void setInit (orca::Size3d &, double l=0.0, double w=0.0, double h=0.0)
 Sets all fields to specified values.
void setInit (orca::CartesianPoint2d &, double x=0.0, double y=0.0)
 Sets all fields to specified values.
void setInit (orca::CartesianPoint &, double x=0.0, double y=0.0, double z=0.0)
 Sets all fields to specified values.
std::string toString (const orca::CartesianPoint2d &obj)
int toCartesianPoint2d (const std::string &s, orca::CartesianPoint2d &obj)
std::string toString (const orca::CartesianPoint &obj)
int toCartesianPoint (const std::string &s, orca::CartesianPoint &obj)
std::string toString (const orca::Frame2d &obj)
int toFrame2d (const std::string &s, orca::Frame2d &obj)
std::string toString (const orca::Frame3d &obj)
int toFrame3d (const std::string &s, orca::Frame3d &obj)
std::string toString (const orca::Size2d &obj)
int toSize2d (const std::string &s, orca::Size2d &obj)
std::string toString (const orca::Size3d &obj)
int toSize3d (const std::string &s, orca::Size3d &obj)
std::string toString (const orca::Twist2d &)
 Converts to string.
int getPropertyAsFrame2d (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::Frame2d &value)
orca::Frame2d getPropertyAsFrame2dWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::Frame2d &defaultValue)
 Returns the default value if key is not found or cannot be converted to a Frame2d.
int getPropertyAsFrame3d (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::Frame3d &value)
orca::Frame3d getPropertyAsFrame3dWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::Frame3d &defaultValue)
 Returns the default value if key is not found or cannot be converted to a Frame3d.
int getPropertyAsSize2d (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::Size2d &value)
orca::Size2d getPropertyAsSize2dWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::Size2d &defaultValue)
 Returns the default value if key is not found or cannot be converted to a Size3d.
int getPropertyAsSize3d (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::Size3d &value)
orca::Size3d getPropertyAsSize3dWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::Size3d &defaultValue)
 Returns the default value if key is not found or cannot be converted to a Size3d.
int getPropertyAsCartesianPoint (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::CartesianPoint &value)
orca::CartesianPoint getPropertyAsCartesianPointWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::CartesianPoint &defaultValue)
 Returns the default value if key is not found or cannot be converted to a CartesianPoint.
orca::CartesianPoint2d rotate2d (const orca::CartesianPoint2d &point, const double &angle)
 Rotate a 2d point by an angle (about Z-axis).
orca::CartesianPoint rotate3dX (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the X axis.
orca::CartesianPoint rotate3dY (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the Y axis.
orca::CartesianPoint rotate3dZ (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the Z axis.
orca::CartesianPoint2d convertToFrame2d (const orca::Frame2d &frame, const orca::CartesianPoint2d &point)
 Convert a global point to another, relative to a frame.
orca::CartesianPoint convertToFrame3d (const orca::Frame3d &frame, const orca::CartesianPoint &point)
 Convert a global point to another, relative to a frame.
orca::CartesianPoint2d convertFromFrame2d (const orca::Frame2d &frame, const orca::CartesianPoint2d &point)
 Convert a point relative to a frame back to the global frame.
orca::CartesianPoint convertFromFrame3d (const orca::Frame3d &frame, const orca::CartesianPoint &point)
 Convert a point relative to a frame back to the global frame.
orca::Frame3d zeroFrame3d ()
 Returns a frame 3d filled out with all zeros.
std::string toString (const orca::CameraDescriptionPtr &)
 Converts to string.
std::string toStringDuration (const orca::Time &obj)
int toTimeDuration (const std::string &s, orca::Time &obj)
std::string toString (const orca::Time &obj)
std::string toString (const orca::TimeOfDay &)
 Returns string in format HH:MM:SS.sss.
std::string toString (const orca::Date &)
 Returns string in format YYYY/MM/DD.
int getPropertyAsTimeDuration (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::Time &value)
orca::Time getPropertyAsTimeDurationWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::Time &d)
 Returns the default value if key is not found or cannot be converted to a Time.
bool isSane (const orca::Time &obj, std::string &reason)
std::string toString (const orca::FeatureMap2dData &)
 Converts to string.
std::string toString (const orca::Feature2d &)
 Converts to string.
void saveToFile (const orca::FeatureMap2dData &fmap, FILE *f)
 Throws gbxutilacfr::Exception on problems.
void loadFromFile (const std::string &filename, orca::FeatureMap2dData &fmap)
 Throws gbxutilacfr::Exception on problems.
std::string toString (const orca::ImageDataPtr &)
 Converts to string.
std::string toString (const orca::ImageDescriptionPtr &)
 Converts to string.
void normalise (orca::Localise2dData &obj)
const orca::Pose2dHypothesis & mlHypothesis (const orca::Localise2dData &obj)
 Returns the reference to max-likelihood hypothesis.
std::string toString (const orca::Localise2dData &)
 Converts to string.
const orca::Pose3dHypothesis & mlHypothesis (const orca::Localise3dData &obj)
 Returns the reference to max-likelihood hypothesis.
std::string toString (const orca::Localise3dData &)
 Converts to string.
std::string toString (const orca::MultiCameraDataPtr &)
 Converts to string.
std::string toString (const orca::MultiCameraDescriptionPtr &)
 Converts to string.
char displayOgmapCell (unsigned char cell)
std::string toString (const orca::OgMapData &)
 Converts to string.
std::string toVerboseString (const orca::OgMapData &obj)
unsigned char & gridCell (orca::OgMapData &obj, int indX, int indY)
 Get a reference to a grid cell (no bounds checking is performed).
int gridCellIndex (const orca::OgMapData &obj, int indX, int indY)
 Calculate index of a cell in a grid map based on its row and column.
bool isSane (const orca::Path2d &path, std::string &reason)
bool isSane (const orca::PathFollower2dData &data, std::string &reason)
std::string toString (const orca::PathFollower2dData &)
 Converts to string.
std::string toString (const orca::Waypoint2d &)
 Converts to string.
std::string toVerboseString (const orca::PathFollower2dData &)
 Prints out each waypoint.
std::string toVerboseString (const orca::PathPlanner2dData &)
 Prints out the path and result code.
std::string toVerboseString (const orca::PathPlanner2dTask &)
 Prints out the coarse path given as a task.
std::string toString (const orca::PixMapData &)
 Converts to string.
std::string toString (const orca::RangeScanner2dDescription &)
 Converts to string.
double calcAngleIncrement (double fieldOfView, int numReturns)
void setInit (orca::Covariance2d &, double pxx=0.0, double pxy=0.0, double pyy=0.0, double pxt=0.0, double pyt=0.0, double ptt=0.0)
 Sets all fields to specified values.
std::string toString (const orca::Covariance2d &)
 Converts to string.
std::string toString (const orca::TracerData &)
 Converts to string.
std::string toString (const orca::VehicleDescription &)
 Converts to string.
std::string toString (const orca::VehicleControlDescriptionPtr &)
 Converts to string.
std::string toString (const orca::VehicleGeometryDescriptionPtr &)
 Converts to string.
std::string toString (const orca::VelocityControl2dData &)
 Converts to string.
void setInit (orca::WifiInterface &w)
 Sets all fields to zero.
std::string toString (const orca::WifiData &)
 Converts to string.
Stringify OCM Structures



std::string toString (const orca::FQComponentName &name)
std::string toString (const orca::FQInterfaceName &name)
std::string toString (const orca::FQTopicName &name)
std::string toString (const orca::FQExecutableName &name)
orca::FQComponentName toComponentName (const std::string &s)
orca::FQInterfaceName toInterfaceName (const std::string &s)
std::string toHomeIdentity (const orca::FQComponentName &fqCName)
 Based on the component name, returns the default identity of Home interface.
orca::FQTopicName toStatusTopic (const orca::FQComponentName &fqCName)
 Based on the component name, returns the default topic name for Status interface.
orca::FQTopicName toTracerTopic (const orca::FQComponentName &fqCName)
 Based on the component name, returns the default topic name for Tracer interface.

Detailed Description

Utilities for initializing and manipulating Orca data objects.

This namespace is part of a library.

See also:
libOrcaObjects

Function Documentation

double orcaobj::calcAngleIncrement ( double  fieldOfView,
int  numReturns 
) [inline]

Calculates the angle increment for a range scan. This is in a special function because it's easy to forget the '+1'

char orcaobj::displayOgmapCell ( unsigned char  cell  ) 

Display OG map cell

int orcaobj::getPropertyAsCartesianPoint ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::CartesianPoint &  value 
)

Parses the value into a CartesianPoint object assuming empty space delimeters. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

int orcaobj::getPropertyAsFrame2d ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::Frame2d &  value 
)

Parses the value into a Frame2d object assuming empty space delimeters. The format is assumed to be: x[m] y[m] yaw[deg]. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

int orcaobj::getPropertyAsFrame3d ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::Frame3d &  value 
)

Parses the value into a Frame3d object assuming empty space delimeters. The format is assumed to be: x[m] y[m] z[m] roll[deg] pitch[deg] yaw[deg]. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

int orcaobj::getPropertyAsSize2d ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::Size2d &  value 
)

Parses the value into a Size2d object assuming empty space delimeters. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

int orcaobj::getPropertyAsSize3d ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::Size3d &  value 
)

Parses the value into a Size3d object assuming empty space delimeters. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

int orcaobj::getPropertyAsTimeDuration ( const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::Time &  value 
)

Parses the value into a Time object assuming ':' delimeters. Returns: 0 = property found (and set in value), non-zero = property not found or parsing failed.

bool orcaobj::isSane ( const orca::PathFollower2dData &  data,
std::string &  reason 
)

If there's something wrong with the data structure, returns false and fills out the 'reason' field. If it's OK, returns true.

bool orcaobj::isSane ( const orca::Path2d &  path,
std::string &  reason 
)

If there's something wrong with the path object, returns false and fills out the 'reason' field. If it's OK, returns true.

bool orcaobj::isSane ( const orca::Time &  obj,
std::string &  reason 
)

Checks that both seconds and microseconds are non-negative. Note that calling this function is not always appropriate because negative values are allowed when Time signifies duration and not the absolute time.

void orcaobj::normalise ( orca::Localise2dData &  obj  ) 

Normalise the Mixture of Gaussian that Localise2dDataPtr represents, to ensure that the distribution integrates to one (ie the weights sum to 1) It is an error to give this function a MoG with all zero weights.

int orcaobj::toCartesianPoint ( const std::string &  ,
orca::CartesianPoint &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

int orcaobj::toCartesianPoint2d ( const std::string &  ,
orca::CartesianPoint2d &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

orca::FQComponentName orcaobj::toComponentName ( const std::string &  s  ) 

Parses a string to extract a fully qualified component name (aka Adapter ID) Expects an input string in the form of platform/component A null structure is returned if no delimeter is present. Does not handle the case of multiple delimeters.

int orcaobj::toFrame2d ( const std::string &  ,
orca::Frame2d &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

int orcaobj::toFrame3d ( const std::string &  ,
orca::Frame3d &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

orca::FQInterfaceName orcaobj::toInterfaceName ( const std::string &  s  ) 

Parses a string to extract a fully qualified interface name Expects an input string in the form of interface /component A null structure is returned if either one of the delimeters is absent.

int orcaobj::toSize2d ( const std::string &  ,
orca::Size2d &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

int orcaobj::toSize3d ( const std::string &  ,
orca::Size3d &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed.

std::string orcaobj::toString ( const orca::FQExecutableName &  name  ) 

Converts fully executable name to a string. i.e. executable

std::string orcaobj::toString ( const orca::FQTopicName &   ) 

Converts fully qualified topic name to a string. i.e. interface/topic@platform/component

std::string orcaobj::toString ( const orca::FQInterfaceName &   ) 

Converts fully qualified interface name to a string. e.i. interface@platform/component

See also:
toInterfaceName
std::string orcaobj::toString ( const orca::FQComponentName &   ) 

Converts fully qualified component name (aka Adapter ID) to a string. e.i. platform/component

See also:
toComponentName
std::string orcaobj::toString ( const orca::Time &   ) 

Returns string in human readable format: MM/DD/YY HH:MM:SS.sss.

std::string orcaobj::toString ( const orca::Size3d &   ) 

Converts to string

See also:
toSize3d()
std::string orcaobj::toString ( const orca::Size2d &   ) 

Converts to string

See also:
toSize2d()
std::string orcaobj::toString ( const orca::Frame3d &   ) 

Converts to string

See also:
toFrame3d()
std::string orcaobj::toString ( const orca::Frame2d &   ) 

Converts to string

See also:
toFrame2d()
std::string orcaobj::toString ( const orca::CartesianPoint &   ) 

Converts to string

See also:
toCartesianPoint()
std::string orcaobj::toString ( const orca::CartesianPoint2d &   ) 

Converts to string

See also:
toCartesianPoint2d()

Referenced by toString().

std::string orcaobj::toStringDuration ( const orca::Time &   ) 

For durations less than 24hrs returns string HH:MM:SS.sss. Otherwise, DD:HH:MM:SS.sss Negative times are supported but only if seconds and microseconds are both negative.

int orcaobj::toTimeDuration ( const std::string &  ,
orca::Time &   
)

Parses result of the correspondinng toString(). Returns: 0 = parsing successful, non-zero = parsing failed. Negative durations are supported, but only if the very first character of the string is '-'.

std::string orcaobj::toVerboseString ( const orca::OgMapData &   ) 

Displays the contents of the map on to the console (large maps can be displyed with a small font size)

 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5