User manual

old releases - latest release - trunk

peekabot Namespace Reference


Detailed Description

This file is part of peekabot.

peekabot is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

peekabot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


Classes

class  Action
 Abstract base class for all actions. More...
class  ActionResult
class  ActionMonitor
 Monitors the outcome of an aggregated action and reports it back to the proxy. More...
class  ActionResultContainer
 Stores an ActionResult, of any type that can be serialized, deserialized and constructed by the the ActionResultFactory. More...
class  AddGeneric
class  AddModel
class  AddOccupancyGrid2D
class  AddRobot
class  Assign
class  Bundle
 An action that ensures that all actions added to it are executed in the same frame. More...
class  DeregisterPseudonym
class  GetChildren
 This action fetches the orientation of an object and returns it to the source proxy - it is not intended for usage by components other than the proxy. More...
class  GetOrientation
 This action fetches the orientation of an object and returns it to the source proxy - it is not intended for usage by components other than the proxy. More...
class  GetPosition
 This action fetches the position of an object and returns it to the source proxy - it is not intended for usage by components other than the proxy. More...
class  GetTransformation
 This action fetches the transformation of an object and returns it to the source proxy - it is not intended for usage by components other than the proxy. More...
class  LoadScene
class  MonitorReport
 Contains the outcome of an action executed in the server, which is then reported to back to the source proxy. More...
class  MoveObjectRelative
class  NoOp
 An action that does absolutely nothing. More...
class  PanCamera
class  RearrangeObject
class  RegisterPseudonym
class  RemoveObject
class  RotateCamera
class  RotateObject
class  SetColor
class  SetDOFValue
 Set the value of the given DOF. More...
class  SetFOV
class  SetGridCentralAngle
class  SetGridSegments
class  SetGridType
class  SetLabelAlignment
class  SetLabelText
class  SetLayer
class  SetLineStyle
class  SetLineWidth
class  SetMetaName
class  SetName
class  SetOccupancyGrid2DCells
 This action is used to set the coordinates of a object. More...
class  SetOpacity
class  SetOrientation
 Set the orientation of an object. More...
class  SetOrthographic
class  SetPose
 An action that merges the procedure for setting an object's position and orientation into one easy to use package. More...
class  SetPosition
 Sets the position of an object without affecting its orientation. More...
class  SetRotation
class  SetScale
class  SetSensorData
class  SetTransformation
 Set the model to parent transformation of an object, i.e. set its coordinate system. More...
class  SetVertices
 Action used to set or add coordinates of a vertex-based object. More...
class  SetVisibility
class  SetZoomDistance
class  ViewportMove
class  ViewportRotate
class  Bumper
class  CameraObject
 Class representing cameras in the scene. More...
class  ChunkedBuffer
 A dynamically growing buffer that grows in large chunks. More...
class  DOF
 An interface for providing a robot with a degree of freedom, in a way that's convinient to work with for the the users of both the server and proxy library. More...
class  DefaultFactoryError
 Default error policy for object factories. More...
class  Factory
 A generic and flexible object factory implementation. More...
class  FactoryInformer
class  GenericResult
 An action result class that can be used to transmit basic peekabot types. More...
class  CubeObject
 Class representing the cube geometric primitive. More...
class  CylinderObject
 Class representing the cylinder geometric primitive. More...
class  SphereObject
 Class representing the sphere geometric primitive. More...
class  CircleObject
 Class representing the circle geometric primitive. More...
class  PolyLineObject
 Class representing the polyline geometric primitive. More...
class  PolygonObject
class  GridObject
 A grid object. More...
class  GroupObject
 Class representing a group of other objects. More...
class  HandlerInformer
class  IDAllocator
 Generic ID allocator interface. More...
class  DefaultIDAllocator
class  IDTranslationTable
class  JointDOF
 A rotational joint DOF. More...
class  Label
 A text label primitives, for showing orientable, scalable labels. More...
class  LineBased
 An abstraction of objects in the scene that are scalable. More...
class  LineCloud
 Primitive for efficient representation of line clouds. More...
class  Log
 A class for logging messages to file. More...
class  Matrix4
class  Message
 A message class used to pass around information that's to be shown to the user or logged. Typically carries error or information messages. More...
class  MessageFormatter
 An interface providing methods for formatting messages, i.e. turning a Message object into a string. More...
class  MessageHub
 A facility for subscribing to and publishing messages of various types - debug and client messages, for example. More...
class  ModelObject
 Class representing externally modeled objects in the scene. More...
class  ObjectIDTranslator
class  ObjectVisitor
 Interface for visitors of SceneObject derived classes. More...
class  OccupancyGrid2D
class  PathIdentifier
 PathIdentifier is an auxillary class that provides a single interface for referring to objects in the scene tree, independent of whether the underlying identifier is an ObjectID, a path or a mixture of a path and an object ID. More...
class  PointCloud
 Primitive for efficient representation of point clouds. More...
class  PointSetObject
 Class representing cameras in the scene. More...
class  PrintfFormatter
 A MessageFormatter providing flexible formatting options similar in form and function to what's provided by C's printf function. More...
class  PseudonymCatalog
class  Rangefinder
 A sensor data interpreter class for laser rangefinders. More...
class  RendererRelay
 Traps graphical changes to the scene and forwards the information to the renderer. More...
class  RobotObject
 A SceneObject subtype that models robots. More...
class  ScalableObject
 An abstraction of objects in the scene that are scalable. More...
class  SceneFileLoader
class  SceneObject
 The base object class. More...
class  SceneTree
class  SceneTreePtr
class  TheSceneTree
class  ScopedHandler
 XML input handler class that organizes handler methods by scopes corresponding to the hierarchical levels in the XML document. More...
class  ScopedMap
 Map for storing dynamic variables of arbitrary type, whose value can be overridden in local scopes. More...
class  Sensor
 Represents a sensor data interpreter for a specific type of sensor. More...
class  SensorFactory
class  SensorObject
 Class representing robot sensors. More...
class  DeserializationInterface
 An interface for reading binary data independent of their byte order. It's independent of the underlying data source. More...
class  Serializable
class  SerializableFactory
class  SerializationInterface
 An interface for writing binary data in a format compatible with DeserializationBuffer. It's independent of the underlying data source. More...
struct  Fixture
class  ServerActuator
class  ServerExecutionContext
class  Singleton
class  SnapshotWriter
class  Subscriber
 An interface that can be implemented to gain message recieving capability, as in messages published by a MessageHub. More...
class  TrackDOF
 A linear displacement DOF. More...
struct  SourceID
 Describes the id and type of an Action generator. More...
struct  RGBColor
 A dumb RGB color struct. More...
struct  RGBAColor
struct  Opacity
 The type used to describe opacity for objects throughout the application. More...
class  Vector3
class  Vector4
 A four dimensional vector class. More...
class  Vector2
 A two dimensional vector class. More...
class  VertexObject
class  XercesParser
 An implementation of the XMLParser interface using the Xerces-C++ library. More...
class  XMLHandler
 Base class for handling SAX2 XML parsing events. More...
class  XMLParser
 Interface for SAX2 XML parsers. More...
class  XMLParserFactory

Typedefs

typedef DeserializationInterface DeserializationBuffer
typedef SerializationInterface SerializationBuffer
typedef boost::posix_time::ptime Timestamp
typedef AddGeneric< CameraObjectAddCamera
typedef AddGeneric< CircleObjectAddCircle
typedef AddGeneric< CubeObjectAddCube
typedef AddGeneric
< CylinderObject
AddCylinder
typedef AddGeneric< GridObjectAddGrid
typedef AddGeneric< GroupObjectAddGroup
typedef AddGeneric< LabelAddLabel
typedef AddGeneric< LineCloudAddLineCloud
typedef AddGeneric< PointCloudAddPointCloud
typedef AddGeneric< PolygonObject > AddPolygon
typedef AddGeneric< SphereObjectAddSphere
typedef Assign< CameraObjectAssignCamera
typedef Assign< CircleObjectAssignCircle
typedef Assign< CubeObjectAssignCube
typedef Assign< CylinderObjectAssignCylinder
typedef Assign< DOFAssignDOF
typedef Assign< GridObjectAssignGrid
typedef Assign< GroupObjectAssignGroup
typedef Assign< LabelAssignLabel
typedef Assign< LineBasedAssignLineBased
typedef Assign< LineCloudAssignLineCloud
typedef Assign< ModelObjectAssignModel
typedef Assign< OccupancyGrid2D > AssignOccupancyGrid2D
typedef Assign< PointCloudAssignPointCloud
typedef Assign< PolygonObject > AssignPolygon
typedef Assign< RobotObjectAssignRobot
typedef Assign< ScalableObjectAssignScalable
typedef Assign< SensorObjectAssignSensor
typedef Assign< SphereObjectAssignSphere
typedef Assign< VertexObject > AssignVertexBased
typedef Singleton
< atl::ActionTransporter
TheActionTransporter
typedef Singleton
< conf::Configuration
TheConfiguration
typedef Singleton
< IDTranslationTable > 
TheIDTranslationTable
typedef Matrix4< real_unitMatrix4ru
typedef Matrix4< real32Matrix4f
typedef Matrix4< real64Matrix4d
typedef Matrix4ru Matrix4r
 The Matrix type used internally in the render engine. (deprecated).
typedef Singleton< MessageHubTheMessageHub
 A singleton for accessing a the message hub used by all, as there should be only a single, shared message hub.
typedef Singleton< RendererRelayTheRendererRelay
typedef Singleton< SensorFactory > TheSensorFactory
typedef Singleton
< SerializableFactory > 
TheSerializableFactory
typedef Singleton< ServerActuator > TheServerActuator
typedef float real32
 32 bit real number type.
typedef double real64
 64 bit real number type.
typedef real32 real_unit
 The type used for real numbers throughout the application.
typedef uint32_t ObjectID
 Type for uniquely identifying each object in the scene.
typedef Vector3< real_unitVector3ru
typedef Vector3< real32Vector3f
typedef Vector3< real64Vector3d
typedef Vector3< real_unitVector3r
 The Vector type used internally in the render engine.
typedef Vector4< real_unitVector4ru
typedef Vector4< real32Vector4f
typedef Vector4< real64Vector4d
typedef Vector4< real_unitVector4r
 The Vector type used internally in the render engine.
typedef Vector2< float > Vector2f

Enumerations

enum  MessageType {
  CLIENT_MESSAGE = 0, INFO_MESSAGE = 1, WARNING_MESSAGE = 2, ERROR_MESSAGE = 3,
  DEBUG_MESSAGE = 4, LOG_MESSAGE = 5
}
 Enumerates all the different categories that a message can be of. More...
enum  { INVALID_ID = 0, ROOT_OBJECT_ID = 1, DEFAULT_CAMERA_OBJECT_ID = 2, FIRST_UNRESERVED_ID = 100 }
enum  NameConflictPolicy { FAIL_ON_CONFLICT, AUTO_ENUMERATE_ON_CONFLICT, REPLACE_ON_CONFLICT, ALIAS_ON_CONFLICT }
 The different actions peekabot can take to resolve a name conflict. More...
enum  LineStyle {
  LINE_STYLE_SOLID = 0xFFFF, LINE_STYLE_DOTTED = 0x8888, LINE_STYLE_DASHED = 0xFF80, LINE_STYLE_DASH_DOT = 0xFF88,
  LINE_STYLE_DASH_DOT_DOT = 0xFE44
}
enum  GridType { REGULAR_GRID = 0, RADIAL_GRID = 1, ANGULAR_GRID = 2 }
enum  TextAlignment { ALIGN_LEFT = 0, ALIGN_RIGHT = 1, ALIGN_CENTER = 2 }

Functions

template<class T>
T * switch_byte_order (T *p, const size_t element_count)
 : Converts indata from LE or BE to BE or LE respectively.
const SourceID GUI_SOURCE_ID (SourceID::GUI_ID, SourceID::SERVER)
const SourceID NOBODY_SOURCE_ID (SourceID::NOBODY_ID, SourceID::SERVER)
void init ()
void cleanup ()
template<class T>
std::ostream & operator<< (std::ostream &os, const Matrix4< T > &m)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const Matrix4< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, Matrix4< T > &x)
SerializationInterfaceoperator<< (SerializationInterface &ar, const PathIdentifier &path_ident)
DeserializationInterfaceoperator>> (DeserializationInterface &ar, PathIdentifier &path_ident)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::vector< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::vector< T > &x)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::list< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::list< T > &x)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::set< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::set< T > &x)
template<class K, class V>
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::map< K, V > &x)
template<class K, class V>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::map< K, V > &x)
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::string &str)
template<class U, class V>
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::pair< U, V > &x)
template<class U, class V>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, std::pair< U, V > &x)
SerializationInterfaceoperator<< (SerializationInterface &ar, const std::string &str)
void set_nonblocking (SocketType sock)
void sockets_init ()
void sockets_cleanup ()
std::ostream & operator<< (std::ostream &os, const RGBColor &color)
std::ostream & operator<< (std::ostream &os, const RGBAColor &color)
std::ostream & operator<< (std::ostream &os, const Opacity &x)
SerializationInterfaceoperator<< (SerializationInterface &ar, const RGBColor &x)
DeserializationInterfaceoperator>> (DeserializationInterface &ar, RGBColor &x)
SerializationInterfaceoperator<< (SerializationInterface &ar, const RGBAColor &x)
DeserializationInterfaceoperator>> (DeserializationInterface &ar, RGBAColor &x)
SerializationInterfaceoperator<< (SerializationInterface &ar, const Opacity &x)
DeserializationInterfaceoperator>> (DeserializationInterface &ar, Opacity &x)
template<class T>
Vector3< T > operator* (T scalar, const Vector3< T > &v)
template<class T>
Vector4< T > operator* (T scalar, const Vector4< T > &v)
template<class T>
Vector2< T > operator* (T scalar, const Vector2< T > &v)
template<class T>
std::ostream & operator<< (std::ostream &os, const Vector3< T > &v)
template<class T>
std::ostream & operator<< (std::ostream &os, const Vector4< T > &v)
template<class T>
std::ostream & operator<< (std::ostream &os, const Vector2< T > &v)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const Vector3< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, Vector3< T > &x)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const Vector4< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, Vector4< T > &x)
template<class T>
SerializationInterfaceoperator<< (SerializationInterface &ar, const Vector2< T > &x)
template<class T>
DeserializationInterfaceoperator>> (DeserializationInterface &ar, Vector2< T > &x)

Variables

const SourceID GUI_SOURCE_ID
const SourceID NOBODY_SOURCE_ID
const uint32_t NUMBER_OF_LAYERS = 16
 Constant setting the number of visibility layers supported.


Typedef Documentation

typedef uint32_t ObjectID

Type for uniquely identifying each object in the scene.

Each object is assigned a unique ObjectID upon creation, and keeps it until the object is destroyed, after which the ObjectID may be assigned to another object. There are three reserved ObjectIDs that have special meaning:

  • ObjectID 0 - This simply means no object at all, and is sometimes returned by certain functions to indicate failure.
  • ObjectID 1 - This is the ID of the root of the SceneTree, which is automatically created at startup and can never be deleted.
  • ObjectID 2 - This is the ID of the default camera, which is created along with the root node at startup, and cannot be deleted.


Enumeration Type Documentation

Enumerates all the different categories that a message can be of.

Enumerator:
CLIENT_MESSAGE  Messages that somehow originate from a clients belong to this category.
INFO_MESSAGE  Messages of purely informational nature.

An example could be "GL_ARB_vertex_buffer_object not present, falling back on vertex arrays".

WARNING_MESSAGE  Warning messages.

A notice about an action that failed to execute is a typical example. They shouldn't contain information that is critical to the typical end user and will generally not be read unless actively searching for incorrect or unexpected behaviour.

ERROR_MESSAGE  Error messages.
DEBUG_MESSAGE  Debug messages. Use for debugging print outs only.
LOG_MESSAGE  Messages of purely informational nature, but not intended for display to the user.

An example could be logging the available OpenGL extensions.

The different actions peekabot can take to resolve a name conflict.

Manually ensuring that all paths are globally unique can be quite cumbersome. To make your life easier peekabot can often automatically resolve name conflicts for you if you ask it to - this applies to SceneObject::attach() and all proxy add methods, for example.

Enumerator:
FAIL_ON_CONFLICT  Fail on conflict.

If a name conflict occurs, this mode will cause the offending operation to fail.

AUTO_ENUMERATE_ON_CONFLICT  Auto-enumerate on conflict.

E.g. if an object named test already exists, rename the added object to test1.

REPLACE_ON_CONFLICT  Replace on conflict.

If a name conflict occurs, replace the old object of the same name with the new object.

ALIAS_ON_CONFLICT  Alias on conflict.

If a name conflicting arises when creating a new object, simply return a handle that is an alias of the existing object instead.

If the existing object is of a different type than the object being created, the action will fail.


Function Documentation

T* peekabot::switch_byte_order ( T *  p,
const size_t  element_count 
) [inline]

: Converts indata from LE or BE to BE or LE respectively.

Parameters:
p The array of data to be converted.
element_count The number of elements in the p array.
Returns:
A pointer to the modified array.