Public Types | |
enum | ExternalizationType { Input = 1, Output = 2, IO = 3 } |
typedef Int | Attributes |
typedef Int | VisualType |
enum | AttributeFlags { ShowAxes = 1, ShowBounds = 2, ShowCollisions = 4, ShowCollisionModel = 8, ShowCollisionDetection = 16, ShowEdges = 32, ShowNormals = 64, VerticesOnly = 128 } |
Public Member Functions | |
SimulatedBasicEnvironment (ref< base::VFileSystem > fs, ref< base::Cache > cache, const String &name="", bool dynamic=true) | |
SimulatedBasicEnvironment (const SimulatedBasicEnvironment &e) | |
virtual void | setDynamic (bool enabled) |
virtual String | className () const |
virtual Object & | clone () const |
virtual ref< RobotDescription > | newRobotDescription () const |
virtual ref< ToolDescription > | newToolDescription () const |
virtual ref< Robot > | addRobot (ref< const robot::RobotDescription > robotDescription, const base::Point3 &position, const base::Orient &orientation, bool anchored=false) |
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) |
virtual Int | numRobots () const |
virtual ref< Robot > | getRobot (Int i) |
virtual ref< Tool > | addTool (ref< const robot::ToolDescription > toolDescription, const base::Point3 &position, const base::Orient &orientation) |
virtual void | removeTool (ref< Tool > tool) |
virtual Int | numTools () const |
virtual ref< Tool > | getTool (Int i) |
virtual ref< const Tool > | getTool (Int i) const |
virtual void | placeToolInProximity (ref< Tool > tool, ref< Robot > robot, Int manipulatorIndex=0) |
place the specified tool within grasping range of the end-effector of the specified robot manipulator | |
virtual ref< BasicEnvironment::Obstacle > | addBoxObstacle (base::Dimension3 dim, const base::Point3 &position, const base::Orient &orientation, const String &name="") |
virtual ref< BasicEnvironment::Obstacle > | addSphereObstacle (Real radius, const base::Point3 &position, const base::Orient &orientation, const String &name="") |
virtual ref< BasicEnvironment::Obstacle > | addBoxObstacle (base::Dimension3 dim, const base::Point3 &position, const base::Orient &orientation, ref< const physics::Material > material, const String &name="") |
virtual ref< BasicEnvironment::Obstacle > | addSphereObstacle (Real radius, const base::Point3 &position, const base::Orient &orientation, ref< const physics::Material > material, const String &name="") |
virtual void | removeObstacle (ref< BasicEnvironment::Obstacle > obstacle) |
virtual void | setObstacleColor (ref< BasicEnvironment::Obstacle > obstacle, const gfx::Color3 &color) |
virtual void | setObstacleDensity (ref< BasicEnvironment::Obstacle > obstacle, Real density) |
virtual Int | numObstacles () const |
virtual ref< Obstacle > | getObstacle (Int i) |
virtual ref< const Obstacle > | getObstacle (Int i) const |
virtual osg::Node * | createOSGVisual (Visual::Attributes visualAttributes=0) const |
virtual void | preSimulate () |
virtual void | simulateForSimTime (const base::Time &dt) |
virtual bool | formatSupported (const String format, Real version=1.0, ExternalizationType type=IO) const |
query if specific format is supported (for input, output or both) | |
virtual void | externalize (base::Externalizer &e, const String format="", Real version=1.0) |
read or write object state to Externalizer | |
virtual void | removeObstacle (ref< Obstacle > obstacle)=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 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 bool | visualTypeSupported (VisualType type) const |
ref< base::Cache > | cache () const |
ref< base::VFileSystem > | filesystem () const |
virtual void | renderFrame () |
virtual const String & | getName () const |
Static Public Attributes | |
const Real | minSimStepSize |
const Int | OSGVisual = 1 |
Protected Types | |
typedef reflist< robot::sim::SimulatedRobot > | RobotList |
typedef std::list< bool > | RobotAnchoredList |
typedef reflist< Tool > | ToolList |
typedef reflist< SolidObstacle > | ObstacleList |
Protected Member Functions | |
void | construct () |
ref< physics::Solid > | findObstacle (ref< Obstacle > obstacle) |
void | checkTools () |
check each tool for proximity with end-effectors of each robot | |
virtual void | setName (const String &name) |
Protected Attributes | |
bool | dynamic |
true for a dynamic simulation, fasle for static (no force/torque or velocity control, just position control) | |
ref< physics::SolidSystem > | system |
SolidSystem for simulating physical bodies in this environment. | |
ref< physics::CollidableGroup > | collidables |
Collidables for items in the environment. | |
ref< physics::Collidable > | groundCollidable |
Collidable for the ground. | |
ref< physics::CollisionCuller > | collisionCuller |
CollisionCuller registering which Collidables shouldn't be collided. | |
ref< physics::Solid > | ground |
Solid ground (flat). | |
ref< physics::ConstraintGroup > | cgroup |
constraints (e.g. for fixing robots to the ground) | |
RobotList | robots |
list of robots in the environment | |
ToolList | tools |
list of tools in the environment | |
ObstacleList | obstacles |
list of Solid obstacles in the environment | |
RobotAnchoredList | robotsAnchored |
for each robot, is it anchored to the environment? | |
Visual::Attributes | attributes |
osg::ref_ptr< osg::Group > | rootnode |
int | _refCount |
bool | onUnreferenceEnabled |
ref< base::VFileSystem > | vfilesystem |
ref< base::Cache > | theCache |
Definition at line 59 of file SimulatedBasicEnvironment.
|
Definition at line 39 of file Visual. Referenced by gfx::Visual::createOSGVisual(). |
|
Definition at line 211 of file SimulatedBasicEnvironment. |
|
Definition at line 209 of file SimulatedBasicEnvironment. |
|
Definition at line 208 of file SimulatedBasicEnvironment. |
|
Definition at line 210 of file SimulatedBasicEnvironment. |
|
Definition at line 44 of file Visual. Referenced by gfx::Visual::visualTypeSupported(). |
|
|
|
Definition at line 40 of file Externalizable. |
|
Referenced by clone(). |
|
|
|
|
|
Implements robot::sim::BasicEnvironment. |
|
add Robot with the given description to the environment at the specified position/orientation (fixed there if anchored is true)
Implements robot::sim::Environment. |
|
|
|
Implements robot::sim::BasicEnvironment. |
|
Implements robot::sim::BasicEnvironment. |
|
Definition at line 51 of file World. References base::World::theCache. |
|
check each tool for proximity with end-effectors of each robot
|
|
return the name of the object's class type. Must be defined by derived classes. Reimplemented from gfx::OSGWorld. Definition at line 67 of file SimulatedBasicEnvironment. |
|
return a shallow copy, with Object& return type. Must be defined by derived classes. Implements base::Cloneable. Definition at line 69 of file SimulatedBasicEnvironment. References NewObj, and SimulatedBasicEnvironment(). |
|
|
|
Reimplemented from gfx::Visual. |
|
If enabled, each call to unreference() will also call virtual method onUnreference() Definition at line 115 of file Referenced. References base::Referenced::onUnreferenceEnabled. |
|
|
read or write object state to Externalizer
Implements base::Externalizable. |
|
|
|
|
|
query if specific format is supported (for input, output or both)
Implements base::Externalizable. |
|
Definition at line 44 of file Named. References base::String. Referenced by physics::Collidable::findNamed(), physics::operator<<(), robot::ToolDescription::operator=(), robot::RobotDescription::operator=(), robot::PlatformDescription::operator=(), robot::ManipulatorDescription::operator=(), base::Named::operator=(), and robot::ManipulatorDescription::operator==(). |
|
Implements robot::sim::BasicEnvironment. Definition at line 139 of file SimulatedBasicEnvironment. References base::elementAt(), and obstacles. |
|
Implements robot::sim::BasicEnvironment. Definition at line 138 of file SimulatedBasicEnvironment. References base::elementAt(), and obstacles. |
|
Implements robot::sim::Environment. Definition at line 88 of file SimulatedBasicEnvironment. References base::elementAt(), and robots. |
|
Implements robot::sim::BasicEnvironment. Definition at line 101 of file SimulatedBasicEnvironment. References base::elementAt(), and tools. |
|
Implements robot::sim::BasicEnvironment. Definition at line 100 of file SimulatedBasicEnvironment. References base::elementAt(), and tools. |
|
|
|
Definition at line 52 of file ReferencedObject. |
|
|
|
Implements robot::sim::Environment. Definition at line 73 of file SimulatedBasicEnvironment. References NewObj. |
|
Implements robot::sim::BasicEnvironment. Definition at line 76 of file SimulatedBasicEnvironment. References NewObj. |
|
Implements robot::sim::BasicEnvironment. Definition at line 137 of file SimulatedBasicEnvironment. References obstacles, and base::reflist< _Tp, _Alloc >::size(). |
|
Implements robot::sim::Environment. Definition at line 87 of file SimulatedBasicEnvironment. References robots, and base::reflist< _Tp, _Alloc >::size(). |
|
Implements robot::sim::BasicEnvironment. Definition at line 99 of file SimulatedBasicEnvironment. References base::reflist< _Tp, _Alloc >::size(), and tools. |
|
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(). |
|
place the specified tool within grasping range of the end-effector of the specified robot manipulator
Implements robot::sim::BasicEnvironment. |
|
Implements base::Simulatable. |
|
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. |
|
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(). |
|
Implemented in robot::sim::TestBasicEnvironment. |
|
|
|
Implements robot::sim::Environment. |
|
Implements robot::sim::BasicEnvironment. |
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in base::Universe. |
|
Implemented in base::Universe. |
|
|
|
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. |
|
Reimplemented from gfx::Visual. |
|
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(). |
|
Definition at line 218 of file SimulatedBasicEnvironment. |
|
constraints (e.g. for fixing robots to the ground)
Definition at line 206 of file SimulatedBasicEnvironment. |
|
Collidables for items in the environment.
Definition at line 202 of file SimulatedBasicEnvironment. |
|
CollisionCuller registering which Collidables shouldn't be collided.
Definition at line 204 of file SimulatedBasicEnvironment. |
|
true for a dynamic simulation, fasle for static (no force/torque or velocity control, just position control)
Definition at line 199 of file SimulatedBasicEnvironment. |
|
Solid ground (flat).
Definition at line 205 of file SimulatedBasicEnvironment. |
|
Collidable for the ground.
Definition at line 203 of file SimulatedBasicEnvironment. |
|
Definition at line 39 of file Simulatable. |
|
list of Solid obstacles in the environment
Definition at line 215 of file SimulatedBasicEnvironment. Referenced by getObstacle(), and numObstacles(). |
|
Definition at line 137 of file Referenced. Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference(). |
|
|
|
list of robots in the environment
Definition at line 213 of file SimulatedBasicEnvironment. Referenced by getRobot(), and numRobots(). |
|
for each robot, is it anchored to the environment?
Definition at line 216 of file SimulatedBasicEnvironment. |
|
Definition at line 219 of file SimulatedBasicEnvironment. |
|
SolidSystem for simulating physical bodies in this environment.
Definition at line 201 of file SimulatedBasicEnvironment. |
|
Definition at line 58 of file World. Referenced by base::World::cache(), and base::World::World(). |
|
list of tools in the environment
Definition at line 214 of file SimulatedBasicEnvironment. Referenced by getTool(), and numTools(). |
|
|