Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

robot::sim::BasicEnvironment Class Reference

Inheritance diagram for robot::sim::BasicEnvironment:

Inheritance graph
[legend]
Collaboration diagram for robot::sim::BasicEnvironment:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }

Public Member Functions

 BasicEnvironment (ref< base::VFileSystem > fs, ref< base::Cache > cache, const String &name="")
 BasicEnvironment (const BasicEnvironment &e)
virtual String className () const
virtual ref< ToolDescriptionnewToolDescription () const=0
virtual ref< TooladdTool (ref< const robot::ToolDescription > toolDescription, const base::Point3 &position, const base::Orient &orientation)=0
virtual void removeTool (ref< Tool > tool)=0
virtual Int numTools () const=0
virtual ref< ToolgetTool (Int i)=0
virtual ref< const ToolgetTool (Int i) const=0
virtual void placeToolInProximity (ref< Tool > tool, ref< Robot > robot, Int manipulatorIndex=0)=0
 place the specified tool within grasping range of the end-effector of the specified robot manipulator

virtual ref< ObstacleaddBoxObstacle (base::Dimension3 dim, const base::Point3 &position, const base::Orient &orientation, const String &name="")=0
virtual ref< ObstacleaddSphereObstacle (Real radius, const base::Point3 &position, const base::Orient &orientation, const String &name="")=0
virtual void removeObstacle (ref< Obstacle > obstacle)=0
virtual Int numObstacles () const=0
virtual ref< ObstaclegetObstacle (Int i)=0
virtual ref< const ObstaclegetObstacle (Int i) const=0
virtual ref< RobotDescriptionnewRobotDescription () const=0
virtual ref< RobotaddRobot (ref< const robot::RobotDescription > robotDescription, const base::Point3 &position, const base::Orient &orientation, bool anchored=false)=0
 add Robot with the given description to the environment at the specified position/orientation (fixed there if anchored is true)

virtual void removeRobot (ref< robot::Robot > robot)=0
virtual Int numRobots () const=0
virtual ref< RobotgetRobot (Int i)=0
virtual void preSimulate ()=0
virtual void simulateForSimTime (const Time &dt)=0
void simulateForRealTime (const Time &dt, Real simTimeStepSize=minSimStepSize)
virtual bool isSameKindAs (const ReferencedObject &) const
virtual bool isSameKindAs (const Object &) const
void reference () const
bool unreference () const
const int referenceCount () const
void enableOnUnreferenceCall (bool enabled)
virtual void onUnreference () const
virtual bool formatSupported (String format, Real version=1.0, ExternalizationType type=IO) const=0
 query if specific format is supported (for input, output or both)

virtual void externalize (Externalizer &e, String format="", Real version=1.0)=0
 read or write object state to Externalizer

virtual void externalize (Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

void load (ref< VFile > archive, const String &format="", Real version=1.0)
void save (ref< VFile > archive, const String &format="", Real version=1.0)
virtual Object & clone () const=0

Static Public Attributes

const Real minSimStepSize

Protected Attributes

int _refCount
bool onUnreferenceEnabled

Detailed Description

An abstract basic 'no-frills' environment for Robots Assumes a flat ground and can contain simple obstacles

Definition at line 40 of file BasicEnvironment.


Member Enumeration Documentation

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.


Constructor & Destructor Documentation

robot::sim::BasicEnvironment::BasicEnvironment ref< base::VFileSystem fs,
ref< base::Cache cache,
const String &  name = ""
[inline]
 

Definition at line 43 of file BasicEnvironment.

robot::sim::BasicEnvironment::BasicEnvironment const BasicEnvironment e  )  [inline]
 

Definition at line 46 of file BasicEnvironment.


Member Function Documentation

virtual ref<Obstacle> robot::sim::BasicEnvironment::addBoxObstacle base::Dimension3  dim,
const base::Point3 position,
const base::Orient orientation,
const String &  name = ""
[pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Robot> robot::sim::Environment::addRobot ref< const robot::RobotDescription robotDescription,
const base::Point3 position,
const base::Orient orientation,
bool  anchored = false
[pure virtual, inherited]
 

add Robot with the given description to the environment at the specified position/orientation (fixed there if anchored is true)

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Obstacle> robot::sim::BasicEnvironment::addSphereObstacle Real  radius,
const base::Point3 position,
const base::Orient orientation,
const String &  name = ""
[pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Tool> robot::sim::BasicEnvironment::addTool ref< const robot::ToolDescription toolDescription,
const base::Point3 position,
const base::Orient orientation
[pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual String robot::sim::BasicEnvironment::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from robot::sim::Environment.

Reimplemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

Definition at line 49 of file BasicEnvironment.

virtual Object& base::Cloneable::clone  )  const [pure virtual, inherited]
 

return a shallow copy, with Object& return type. Must be defined by derived classes.

Implemented in base::LineSegPathRep, base::LineSegTrajectoryRep, base::ParametricPathRep, base::ParametricTrajectoryRep, base::PathComponent, base::PathName, base::WaypointPathRep, base::WaypointTrajectoryRep, gfx::TriangleIteratorState, gfx::VisualTriangles::TriangleArrayIteratorState, physics::ODECollidableBody::BodyState, and robot::sim::SimulatedBasicEnvironment.

void base::Referenced::enableOnUnreferenceCall bool  enabled  )  [inline, inherited]
 

If enabled, each call to unreference() will also call virtual method onUnreference()

Definition at line 115 of file Referenced.

References base::Referenced::onUnreferenceEnabled.

virtual void base::Externalizable::externalize Externalizer e,
String  format = "",
Real  version = 1.0
const [virtual, inherited]
 

write object state to Externalizer (throws if e is in Input)

Reimplemented in physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::PlatformDescription, robot::RobotDescription, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, and robot::ToolDescription.

virtual void base::Externalizable::externalize Externalizer e,
String  format = "",
Real  version = 1.0
[pure virtual, inherited]
 

read or write object state to Externalizer

Implemented in base::Path, base::Trajectory, physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Material, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::ManipulatorJointTrajectory, robot::PlatformDescription, robot::RobotDescription, robot::sim::IKORTest::Test, robot::sim::IKORTest, robot::sim::SimulatedBasicEnvironment, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedPlatform, robot::sim::SimulatedRobot, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, robot::sim::TestBasicEnvironment, robot::sim::VisualIKORTest, and robot::ToolDescription.

virtual bool base::Externalizable::formatSupported String  format,
Real  version = 1.0,
ExternalizationType  type = IO
const [pure virtual, inherited]
 

query if specific format is supported (for input, output or both)

Implemented in base::Path, base::Trajectory, physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Material, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::ManipulatorJointTrajectory, robot::PlatformDescription, robot::RobotDescription, robot::sim::IKORTest::Test, robot::sim::IKORTest, robot::sim::SimulatedBasicEnvironment, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedPlatform, robot::sim::SimulatedRobot, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, robot::sim::TestBasicEnvironment, robot::sim::VisualIKORTest, and robot::ToolDescription.

virtual ref<const Obstacle> robot::sim::BasicEnvironment::getObstacle Int  i  )  const [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Obstacle> robot::sim::BasicEnvironment::getObstacle Int  i  )  [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Robot> robot::sim::Environment::getRobot Int  i  )  [pure virtual, inherited]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<const Tool> robot::sim::BasicEnvironment::getTool Int  i  )  const [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<Tool> robot::sim::BasicEnvironment::getTool Int  i  )  [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

virtual bool base::ReferencedObject::isSameKindAs const ReferencedObject  )  const [inline, virtual, inherited]
 

Definition at line 52 of file ReferencedObject.

void base::Externalizable::load ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

virtual ref<RobotDescription> robot::sim::Environment::newRobotDescription  )  const [pure virtual, inherited]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual ref<ToolDescription> robot::sim::BasicEnvironment::newToolDescription  )  const [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment.

virtual Int robot::sim::BasicEnvironment::numObstacles  )  const [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual Int robot::sim::Environment::numRobots  )  const [pure virtual, inherited]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual Int robot::sim::BasicEnvironment::numTools  )  const [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual void base::Referenced::onUnreference  )  const [inline, virtual, inherited]
 

Called by unreference() if enabled via enableOnUnreferenceCall(true). Typically overridden in subclasses that wish to know about unreference() calls - for example to handle manually breaking cyclic references

Reimplemented in robot::control::ControllableAdaptor::AdaptorControlInterface, and robot::control::ControllableAdaptor.

Definition at line 121 of file Referenced.

Referenced by base::Referenced::unreference().

virtual void robot::sim::BasicEnvironment::placeToolInProximity ref< Tool tool,
ref< Robot robot,
Int  manipulatorIndex = 0
[pure virtual]
 

place the specified tool within grasping range of the end-effector of the specified robot manipulator

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual void base::Simulatable::preSimulate  )  [pure virtual, inherited]
 

Implemented in base::Universe, physics::ODESolidSystem, robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

void base::Referenced::reference  )  const [inline, inherited]
 

Increment the reference count by one, indicating that this object has another pointer which is referencing it.

Definition at line 65 of file Referenced.

References base::Referenced::_refCount.

const int base::Referenced::referenceCount  )  const [inline, inherited]
 

Return the number pointers currently referencing this object.

Definition at line 112 of file Referenced.

References base::Referenced::_refCount.

Referenced by robot::control::ControllableAdaptor::AdaptorControlInterface::onUnreference().

virtual void robot::sim::BasicEnvironment::removeObstacle ref< Obstacle obstacle  )  [pure virtual]
 

Implemented in robot::sim::TestBasicEnvironment.

virtual void robot::sim::Environment::removeRobot ref< robot::Robot robot  )  [pure virtual, inherited]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

virtual void robot::sim::BasicEnvironment::removeTool ref< Tool tool  )  [pure virtual]
 

Implemented in robot::sim::SimulatedBasicEnvironment, and robot::sim::TestBasicEnvironment.

void base::Externalizable::save ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

void base::Simulatable::simulateForRealTime const Time dt,
Real  simTimeStepSize = minSimStepSize
[inherited]
 

Reimplemented in base::Universe.

virtual void base::Simulatable::simulateForSimTime const Time dt  )  [pure virtual, inherited]
 

Implemented in base::Universe.

bool base::Referenced::unreference  )  const [inline, inherited]
 

Decrement the reference count by one, indicating that a pointer to this object is referencing it. If the refence count goes to zero, it is assumed that this object is nolonger referenced and is automatically deleted.

Definition at line 81 of file Referenced.

References base::Referenced::_refCount, Exception, base::Referenced::onUnreference(), and base::Referenced::onUnreferenceEnabled.


Member Data Documentation

int base::Referenced::_refCount [mutable, protected, inherited]
 

Definition at line 136 of file Referenced.

Referenced by base::Referenced::reference(), base::Referenced::referenceCount(), base::Referenced::Referenced(), base::Referenced::unreference(), and base::Referenced::~Referenced().

const Real base::Simulatable::minSimStepSize [static, inherited]
 

Definition at line 39 of file Simulatable.

bool base::Referenced::onUnreferenceEnabled [protected, inherited]
 

Definition at line 137 of file Referenced.

Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference().


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:42:49 2004 for OpenSim by doxygen 1.3.6