Public Types | |
typedef std::bitset< sizeof(Int)*8 | CollidableFlags ) |
typedef Int | CollidableFlag |
enum | ExternalizationType { Input = 1, Output = 2, IO = 3 } |
Public Member Functions | |
SimulatedKinematicChain (bool dynamic=true) | |
SimulatedKinematicChain (ref< physics::SolidSystem > solidSystem, bool dynamic=true) | |
virtual void | setDynamic (bool enabled) |
virtual void | setSolidSystem (ref< physics::SolidSystem > solidSystem) |
virtual void | setJointForce (Int j, Real f)=0 |
Set the force (torque for revolute joints) of joint j (first joint j=1). | |
virtual void | setJointVel (Int j, Real v, Real maxForce=10.0)=0 |
Set the velocity (ang. velocity for revolute joints) of joint j (first joint j=1). | |
virtual void | setJointPos (Int j, Real p)=0 |
Set the position (angle for revolute joints) of joint j (first joint j=1). | |
virtual Real | getJointPos (Int j) const=0 |
Get the current theta* angle (revolute) or position d (prismatic) of the joint. | |
virtual Real | getJointVel (Int j) const=0 |
Get the current joint velocity (ang. velocity for revolute joints). | |
virtual Real | getClosestObjectDistance (Int link) const=0 |
get distance to closest object detected by proximity sensors on the link | |
virtual Vector3 | getClosestObjectDirection (Int link) const=0 |
get the direction vector to the closest object detected by proximity sensors on the link | |
virtual Real | getClosestObjectSensorPosition (Int link) const=0 |
get the distance along the link x-axis of the proximity sensor that detected the closest object to the link | |
virtual void | setPositionOrientation (const Point3 &pos, const Orient &orient) |
virtual void | setConfiguration (const base::Transform &configuration) |
virtual base::Transform | getConfiguration () const |
virtual void | setPosition2D (const base::Point2 &p, Real theta) |
set the 2D (x,y,theta) position (theta is rot. angle about Z-axis) | |
virtual base::Point2 | getPosition2D () const |
get the 2D (x,y) position | |
Real | getOrientation2D () const |
get the 2D angle theta (rot. angle about Z-axis) | |
virtual void | setPosition (const Point3 &pos)=0 |
virtual Point3 | getPosition () const=0 |
virtual void | setOrientation (const Orient &orient)=0 |
virtual Orient | getOrientation () const=0 |
virtual const String & | getName () const |
virtual bool | isSameKindAs (const ReferencedObject &) const |
virtual bool | isSameKindAs (const Object &) const |
virtual String | className () const=0 |
void | reference () const |
bool | unreference () const |
const int | referenceCount () const |
void | enableOnUnreferenceCall (bool enabled) |
virtual void | onUnreference () const |
virtual ref< Collidable > | createCollidable (CollidableFlags flags=0)=0 |
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) |
Static Public Attributes | |
const Real | maxDist |
Protected Types | |
enum | CollidableClasses { SensorCollidableClass = 1 } |
Protected Member Functions | |
SimulatedKinematicChain (const SimulatedKinematicChain &kc) | |
virtual void | construct (const base::Point3 &initialPosition, const base::Orient &initialOrientation)=0 |
construct an approximation of the manipulator from the D-H parameters (best we can do) | |
virtual array< base::Dimension3 > | computeLinkDimensions (const array< Real > &linkRadii) |
virtual void | createLinks (const array< base::Dimension3 > &linkDims)=0 |
create the Solids for each link and assemble them into a Spatial tree (and add them to solidSystem) | |
virtual void | positionLinks (const TransformInfo &transformInfo)=0 |
position the links | |
virtual void | disableCollisions (const array< ref< physics::Collidable > > &collidables, const array< ref< physics::Collidable > > &proximityCollidables)=0 |
virtual void | attachJoints (const TransformInfo &transformInfo)=0 |
virtual void | handleCollision (ref< physics::CollisionState > collisionState)=0 |
called from ProximityCollisionResponseHandler::handleCollision() | |
virtual void | setName (const String &name) |
Protected Attributes | |
KinematicChain | chain |
ref< physics::SolidSystem > | solidSystem |
bool | dynamic |
true for a dynamic simulation, fasle for static (no force/torque or velocity control, just position control) | |
array< ref< physics::SpatialGroup > > | linkGroups |
a group for each link (which contains the link Solid and the group for the next link) | |
array< ref< physics::Solid > > | links |
Solids for each link. | |
array< ref< physics::Joint > > | joints |
Joint attaching each pair of consecutive links (dynamic simulation only). | |
array< Real > | linkLengths |
Length of each link corresponding with links[]. | |
array< ref< physics::Collidable > > | collidables |
collidables for each link Solid | |
array< ref< physics::Collidable > > | proximityCollidables |
collidables for each link's proximity sensor | |
base::Vector | q |
current joint parameters (static simulation only) | |
ref< physics::CollidableGroup > | proximityCollidableGroup |
array< ProximityData > | linkProximity |
array< Real > | linkProximitySurfPosition |
dist from link axis of proximity sensor (i.e. on link sufrace) | |
int | _refCount |
bool | onUnreferenceEnabled |
Friends | |
class | SimulatedRobot |
class | ProximityCollisionResponseHandler |
Definition at line 51 of file SimulatedKinematicChain.
|
Definition at line 45 of file CollidableProvider. |
|
Definition at line 44 of file CollidableProvider. |
|
Definition at line 177 of file SimulatedKinematicChain. |
|
Definition at line 40 of file Externalizable. |
|
Definition at line 54 of file SimulatedKinematicChain. |
|
Definition at line 56 of file SimulatedKinematicChain. |
|
Definition at line 107 of file SimulatedKinematicChain. References Unimplemented. |
|
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
|
compute the dimensions of each link's Solid based on the KinematicChain and fill in linkLengths[1..dof] Reimplemented in robot::sim::SimulatedSerialManipulator. |
|
construct an approximation of the manipulator from the D-H parameters (best we can do)
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
Implemented in physics::ODESolidSystem, physics::Solid, robot::sim::SimulatedPlatform, robot::sim::SimulatedRobot, robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
create the Solids for each link and assemble them into a Spatial tree (and add them to solidSystem)
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
If enabled, each call to unreference() will also call virtual method onUnreference() Definition at line 115 of file Referenced. References base::Referenced::onUnreferenceEnabled. |
|
|
|
|
get the direction vector to the closest object detected by proximity sensors on the link
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
get distance to closest object detected by proximity sensors on the link
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
get the distance along the link x-axis of the proximity sensor that detected the closest object to the link
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
|
Get the current theta* angle (revolute) or position d (prismatic) of the joint. *NB: the angle is relative to the theta home position. Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
Get the current joint velocity (ang. velocity for revolute joints).
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
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==(). |
|
|
get the 2D angle theta (rot. angle about Z-axis)
|
|
|
get the 2D (x,y) position
Definition at line 72 of file PositionableOrientable. References physics::Positionable::getPosition(), base::Point2, base::Point3, base::Vector3::x, and base::Vector3::y. |
|
called from ProximityCollisionResponseHandler::handleCollision()
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
|
|
Definition at line 52 of file ReferencedObject. |
|
|
|
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(). |
|
position the links
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
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(). |
|
|
|
|
Reimplemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. Definition at line 60 of file SimulatedKinematicChain. |
|
Set the force (torque for revolute joints) of joint j (first joint j=1).
Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
Set the position (angle for revolute joints) of joint j (first joint j=1). NB: This will instantaneously move the joint to the specified angle - which obviously is not physically realistic. Consequently, for dynamic simulations, this can cause large forces in the system and possibly numerical instability in the simulation. It is intended for non-dynamic simulations. NB: the angle is relative to the theta home position. Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
Set the velocity (ang. velocity for revolute joints) of joint j (first joint j=1). NB: As the simulation is force controlled, this will set the target velocity Implemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. |
|
|
|
|
set the 2D (x,y,theta) position (theta is rot. angle about Z-axis)
|
|
Definition at line 48 of file PositionableOrientable. References base::Point3, and physics::PositionableOrientable::setConfiguration(). |
|
Reimplemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. Definition at line 62 of file SimulatedKinematicChain. |
|
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 in robot::sim::SimulatedSerialManipulator. Definition at line 196 of file SimulatedKinematicChain. |
|
Reimplemented in robot::sim::SimulatedSerialManipulator, and robot::sim::SimulatedTool. Definition at line 195 of file SimulatedKinematicChain. |
|
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 109 of file SimulatedKinematicChain. |
|
collidables for each link Solid
Definition at line 150 of file SimulatedKinematicChain. |
|
true for a dynamic simulation, fasle for static (no force/torque or velocity control, just position control)
Definition at line 113 of file SimulatedKinematicChain. |
|
Joint attaching each pair of consecutive links (dynamic simulation only).
Definition at line 148 of file SimulatedKinematicChain. |
|
a group for each link (which contains the link Solid and the group for the next link)
Reimplemented in robot::sim::SimulatedSerialManipulator. Definition at line 145 of file SimulatedKinematicChain. |
|
Length of each link corresponding with links[].
Definition at line 149 of file SimulatedKinematicChain. |
|
Definition at line 191 of file SimulatedKinematicChain. |
|
dist from link axis of proximity sensor (i.e. on link sufrace)
Definition at line 193 of file SimulatedKinematicChain. |
|
Solids for each link.
Definition at line 147 of file SimulatedKinematicChain. |
|
Definition at line 94 of file SimulatedKinematicChain. |
|
Definition at line 137 of file Referenced. Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference(). |
|
Definition at line 179 of file SimulatedKinematicChain. |
|
collidables for each link's proximity sensor
Definition at line 151 of file SimulatedKinematicChain. |
|
current joint parameters (static simulation only)
Definition at line 153 of file SimulatedKinematicChain. |
|
Definition at line 110 of file SimulatedKinematicChain. |