orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

orcaobj Namespace Reference

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


Object Initialization 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.
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.
void setInit (orca::Time &)
 Sets all fields to zero.
void setInit (orca::Waypoint2d &)
 Sets all fields to zero.
void setInit (orca::WifiInterface &w)
 Sets all fields to zero.
void setInit (orca::BatteryData &)
 Sets all fields to negative numbers.
void setInit (orca::Odometry2dData &)
 Sets all fields to zero and stalled to FALSE.
void setSane (orca::Time &)
 Sets to current time.
void setSane (orca::TimeOfDay &)
 Sets to current time.
void setSane (orca::Date &)
 Sets to current time.
void setSane (orca::CartesianPoint2d &)
 Set to randomized but sane values.
void setSane (orca::CartesianPoint &)
 Set to randomized but sane values.
void setSane (orca::CartesianVelocity2d &)
 Set to randomized but sane values.
void setSane (orca::CartesianVelocity &)
 Set to randomized but sane values.
void setSane (orca::AngularVelocity &)
 Set to randomized but sane values.
void setSane (orca::Frame2d &)
 Set to randomized but sane values.
void setSane (orca::Frame3d &)
 Set to randomized but sane values.
void setSane (orca::Covariance2d &)
 Set to randomized but sane values.
void setSane (orca::Size2d &)
 Set to randomized but sane values.
void setSane (orca::Size3d &)
 Set to randomized but sane values.
void setSane (orca::Odometry2dData &)
 Set to randomized but sane values.
void setSane (orca::Localise2dData &)
 Set to randomized but sane values.
void setSane (orca::GpsData &)
 Set to randomized but sane values.
void setSane (orca::PowerData &, int count=2)
 Set to randomized but sane values.
void setSane (orca::DriveBicycleCommand &)
 Set to randomized but sane values.
void setSane (orca::VelocityControl2dData &)
 Set to randomized but sane values.
void setSane (orca::DriveBicycleData &)
 Set to randomized but sane values.
void setSane (const orca::RangeScanner2dDataPtr &, int numberOfSamples=361)
 Set to randomized but sane values.
void setSane (const orca::LaserScanner2dDataPtr &, int numberOfSamples=361)
 Set to randomized but sane values.
void setSane (orca::OgMapData &, int width=640, int height=480)
 Set to randomized but sane values.
void setSane (orca::PixMapData &, int width=640, int height=480)
 Set to randomized but sane values.
void setSane (orca::CameraData &, int width=640, int height=480)
 Set to randomized but sane values.

Miscellaneous Object Manipulation Functions

void normalise (orca::Localise2dData &obj)
const orca::Pose2dHypothesismlHypothesis (const orca::Localise2dData &obj)
 Returns the reference to max-likelihood hypothesis.
void saveToFile (const orca::FeatureMap2dData &fmap, FILE *f)
 Throws gbxsickacfr::gbxutilacfr::Exception on problems.
void loadFromFile (const std::string &filename, orca::FeatureMap2dData &fmap)
 Throws gbxsickacfr::gbxutilacfr::Exception on problems.
bool isSane (const orca::PathFollower2dData &pathData, std::string &reason)
char displayOgmapCell (unsigned char cell)
double calcAngleIncrement (double fieldOfView, int numReturns)
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.

Property functions

int getPropertyAsStringSeq (const Ice::PropertiesPtr &prop, const ::std::string &key, Ice::StringSeq &value, char delim)
Ice::StringSeq getPropertyAsStringSeqWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const Ice::StringSeq &defaultValue, char delim=':')
 Returns the default value if key is not found or cannot be converted to a string sequence.
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.
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.
int getPropertyAsImageFormat (const Ice::PropertiesPtr &prop, const ::std::string &key, orca::ImageFormat &value)
orca::ImageFormat getPropertyAsImageFormatWithDefault (const Ice::PropertiesPtr &, const ::std::string &key, const orca::ImageFormat &defaultValue)
 Returns the default value if key is not found or cannot be converted to a ImageFormat.

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.

Stringify Data Objects

int toImageFormat (const std::string &s, orca::ImageFormat &obj)
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)
int toIntVector (const std::string &s, std::vector< int > &obj)
int toDoubleVector (const std::string &s, std::vector< double > &obj)
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.
std::string toString (const orca::BinarySwitchData &)
 Converts to string.
std::string toString (const orca::CameraDataSequence &)
 Converts to string.
std::string toString (const orca::CameraDescriptionSequence &)
 Converts to string.
std::string toString (const orca::CpuInfo &)
 Converts to string.
std::string toString (const orca::CpuData &)
 Converts to string.
std::string toString (const orca::DriveBicycleCommand &)
 Converts to string.
std::string toString (const orca::DriveBicycleData &)
 Converts to string.
std::string toString (const orca::EStopData &)
 Converts to string.
std::string toString (const orca::GpsDescription &)
 Converts to string.
std::string toString (const orca::GpsData &)
 Converts to string.
std::string toString (const orca::ImageDataPtr &)
 Converts to string.
std::string toString (const orca::ImageDescriptionPtr &)
 Converts to string.
std::string toString (const orca::Odometry2dData &)
 Converts to string.
std::string toString (const orca::Odometry3dData &)
 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::Twist2d &)
 Converts to string.
std::string toString (const orca::Covariance2d &)
 Converts to string.
std::string toString (const orca::Localise2dData &)
 Converts to string.
std::string toString (const orca::Localise3dData &)
 Converts to string.
std::string toString (const orca::VelocityControl2dData &)
 Converts to string.
std::string toString (const orca::HomeData &)
 Converts to string.
std::string toString (const orca::ImuData &)
 Converts to string.
std::string toString (const orca::LaserScanner2dDataPtr &obj, int skip)
std::string toString (const orca::RangeScanner2dDataPtr &obj, int skip)
std::string toString (const orca::BatteryData &)
 Converts to string.
std::string toString (const orca::BatteriesData &)
 Converts to string.
std::string toString (const orca::PowerData &)
 Converts to string.
std::string toString (const orca::StatusData &)
 Converts to string.
std::string toString (const orca::TracerData &)
 Converts to string.
std::string toString (const orca::RangeScanner2dDescription &)
 Converts to string.
std::string toString (const orca::ImuDescription &)
 Converts to string.
std::string toString (const orca::SinglePolarFeature2dPtr &obj)
 Converts to string.
std::string toString (const orca::PolarFeature2dData &)
 Converts to string.
std::string toString (const orca::OgMapData &)
 Converts to string.
std::string toString (const orca::PixMapData &)
 Converts to string.
std::string toString (const orca::PathFollower2dData &)
 Converts to string.
std::string toString (const orca::Waypoint2d &)
 Converts to string.
std::string toString (const orca::WifiData &)
 Converts to string.
std::string toString (const orca::PropertiesData &)
 Converts to string.
std::string toString (const orca::FeatureMap2dData &)
 Converts to string.
std::string toString (const orca::Feature2d &)
 Converts to string.
std::string toVerboseString (const orca::OgMapData &obj)
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 toVerboseString (const orca::ImuData &)
 Prints out imu raw data.

Functions

CartesianPoint2d rotate2d (const orca::CartesianPoint2d &point, const double &angle)
 Rotate a 2d point by an angle (about Z-axis).
CartesianPoint rotate3dX (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the X axis.
CartesianPoint rotate3dY (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the Y axis.
CartesianPoint rotate3dZ (const orca::CartesianPoint &point, const double &angle)
 Rotate a 3d point by an angle about the Z axis.
CartesianPoint2d convertToFrame2d (const orca::Frame2d &frame, const orca::CartesianPoint2d &point)
 Convert a global point to another, relative to a frame.
CartesianPoint convertToFrame3d (const orca::Frame3d &frame, const orca::CartesianPoint &point)
 Convert a global point to another, relative to a frame.
CartesianPoint2d convertFromFrame2d (const orca::Frame2d &frame, const orca::CartesianPoint2d &point)
 Convert a point relative to a frame back to the global frame.
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.


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::getPropertyAsImageFormat const Ice::PropertiesPtr &  ,
const ::std::string &  key,
orca::ImageFormat value
 

Parses the value into a ImageFormat object assuming ':' delimeters. 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::getPropertyAsStringSeq const Ice::PropertiesPtr &  ,
const ::std::string &  key,
Ice::StringSeq &  value,
char  delim = ':'
 

Parses the value into a sequence of strings using the given delimiter 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 pathData,
std::string &  reason
 

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

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::toDoubleVector const std::string &  ,
std::vector< double > & 
 

Parses string of doubles separated by spaces. Returns: 0 = parsing successful, non-zero = parsing failed.

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.

int orcaobj::toImageFormat const std::string &  ,
orca::ImageFormat
 

Parses result of the ifacestring::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::toIntVector const std::string &  ,
std::vector< int > & 
 

Parses string of ints separated by spaces. Returns: 0 = parsing successful, non-zero = parsing failed.

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::RangeScanner2dDataPtr &  ,
int  skip = -1
 

Converts to string. Parameter skip control verbosity. No ranges are displayed if skip=-1 (default). All ranges are displayed if skip=0 (none are skipped), every second is displayed if skip=1 (1 skipped), etc.

std::string orcaobj::toString const orca::LaserScanner2dDataPtr &  ,
int  skip = -1
 

Converts to string. Parameter skip control verbosity. No ranges are displayed if skip=-1 (default). All ranges are displayed if skip=0 (none are skipped), every second is displayed if skip=1 (1 skipped), etc.

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()

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::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