Public Types | |
typedef std::bitset< sizeof(Int)*8 | CollidableFlags ) |
typedef Int | CollidableFlag |
enum | ExternalizationType { Input = 1, Output = 2, IO = 3 } |
Public Member Functions | |
SimulatedSerialManipulator (bool dynamic=true) | |
SimulatedSerialManipulator (ref< physics::SolidSystem > solidSystem, bool dynamic=true) | |
SimulatedSerialManipulator (ref< const robot::ManipulatorDescription > manipulatorDescription, ref< physics::SolidSystem > solidSystem, bool dynamic=true) | |
virtual String | className () const |
virtual void | setDynamic (bool enabled) |
virtual void | setSolidSystem (ref< physics::SolidSystem > solidSystem) |
ref< const SimulatedManipulatorDescription > | getManipulatorDescription () const |
ref< physics::Solid > | getBaseSolid () const |
< get the Solid for the base link | |
void | setJointForce (Int j, Real f) |
Set the force (torque for revolute joints) of joint j (first joint j=1). | |
void | setJointVel (Int j, Real v, Real maxForce=10.0) |
Set the velocity (ang. velocity for revolute joints) of joint j (first joint j=1). | |
void | setJointPos (Int j, Real p) |
Set the position (angle for revolute joints) of joint j (first joint j=1). | |
Real | getJointPos (Int j) const |
Get the current theta* angle (revolute) or position d (prismatic) of the joint. | |
Real | getJointVel (Int j) const |
Get the current joint velocity (ang. velocity for revolute joints). | |
base::Point3 | getEEPosition () const |
end-effector position in WorldFrame | |
base::Orient | getEEOrientation () const |
end-effector orientation in WorldFrame | |
bool | checkProximity (ref< SimulatedTool > tool) |
test if tool is in position to be grasped by the end-effector. | |
ref< SimulatedTool > | getToolInProximity () const |
get the last tool passed to checkProximity() that was in proximity to the end-effector (or 0) | |
bool | isToolGrasped () const |
returns true if a tool is currently being grasped | |
bool | graspTool () |
void | releaseGrasp () |
release grasp | |
Real | getClosestObjectDistance (Int link) const |
get distance to closest object detected by proximity sensors on the link | |
Vector3 | getClosestObjectDirection (Int link) const |
get the direction vector to the closest object detected by proximity sensors on the link | |
Real | getClosestObjectSensorPosition (Int link) const |
get the distance along the link x-axis of the proximity sensor that detected the closest object to the link | |
virtual void | setPosition (const Point3 &pos) |
virtual Point3 | getPosition () const |
virtual void | setOrientation (const Orient &orient) |
virtual Orient | getOrientation () const |
virtual void | setConfiguration (const base::Transform &configuration) |
virtual base::Transform | getConfiguration () const |
virtual ref< physics::Collidable > | createCollidable (CollidableFlags flags=0) |
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 | externalize (base::Externalizer &e, const String format="", Real version=1.0) const |
write object state to Externalizer (throws if e is in Input) | |
virtual void | setPositionOrientation (const Point3 &pos, const Orient &orient) |
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 const String & | getName () const |
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 |
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 | |
SimulatedSerialManipulator (const SimulatedSerialManipulator &sm) | |
void | construct (const base::Point3 &initialPosition, const base::Orient &initialOrientation) |
construct an approximation of the manipulator from the D-H parameters (best we can do) | |
array< base::Dimension3 > | computeLinkDimensions (const array< Real > &linkRadii) |
TransformInfo | computeLinkTransforms (const Transform &mountTransform, const base::Vector &q) const |
compute transform information for chain | |
virtual void | createLinks (const array< base::Dimension3 > &linkDims) |
create the Solids for each link and assemble them into a Spatial tree (and add them to solidSystem) | |
virtual void | positionLinks (const TransformInfo &transformInfo) |
position the links | |
virtual void | disableCollisions (const array< ref< physics::Collidable > > &collidables, const array< ref< physics::Collidable > > &proximityCollidables) |
virtual void | attachJoints (const TransformInfo &transformInfo) |
void | setToolInProximity (ref< SimulatedTool > tool) |
virtual void | handleCollision (ref< physics::CollisionState > collisionState) |
called from ProximityCollisionResponseHandler::handleCollision() | |
virtual void | setName (const String &name) |
Protected Attributes | |
ref< const SimulatedManipulatorDescription > | manipulatorDescr |
Transform | mountConfiguration |
the mount configuration of the manipulator (WorldFrame) | |
Transform | mountToBaseSolid |
transform from mount frame to base Solid frame | |
Transform | eeToEESolid |
transform from ee frame to ee Solid frame | |
ref< physics::Solid > | baseSolid |
Solid for the base link. | |
ref< physics::Solid > | endSolid |
Solid for the end link. | |
array< ref< physics::SpatialGroup > > | linkGroups |
a group for each link (which contains the link Solid and the group for the next link) | |
Real | proximityDistance |
distance between ee and tool below which is considered within grasping proximity | |
Real | proximityAngle |
anglular distance components between ee and tool below which is considered within grasping range | |
ref< SimulatedTool > | proximityTool |
last tool found to be in proximity of the end-effector (by checkProximity()) | |
bool | toolGrasped |
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::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 |
class | base::Serializable::SerializableDerivedInstantiator< SimulatedSerialManipulator > |
Definition at line 53 of file SimulatedSerialManipulator.
|
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 149 of file SimulatedSerialManipulator. References Unimplemented. |
|
Implements robot::sim::SimulatedKinematicChain. |
|
test if tool is in position to be grasped by the end-effector.
|
|
return the name of the object's class type. Must be defined by derived classes. Implements base::Object. Definition at line 60 of file SimulatedSerialManipulator. |
|
compute the dimensions of each link's Solid based on the KinematicChain and fill in linkLengths[] Reimplemented from robot::sim::SimulatedKinematicChain. |
|
compute transform information for chain
|
|
construct an approximation of the manipulator from the D-H parameters (best we can do)
Implements robot::sim::SimulatedKinematicChain. |
|
Implements physics::CollidableProvider. |
|
create the Solids for each link and assemble them into a Spatial tree (and add them to solidSystem)
Implements robot::sim::SimulatedKinematicChain. |
|
Implements robot::sim::SimulatedKinematicChain. |
|
If enabled, each call to unreference() will also call virtual method onUnreference() Definition at line 115 of file Referenced. References base::Referenced::onUnreferenceEnabled. |
|
write object state to Externalizer (throws if e is in Input)
Reimplemented from base::Externalizable. Definition at line 145 of file SimulatedSerialManipulator. |
|
read or write object state to Externalizer
Implements base::Externalizable. |
|
query if specific format is supported (for input, output or both)
Implements base::Externalizable. |
|
< get the Solid for the base link
Definition at line 69 of file SimulatedSerialManipulator. References baseSolid. |
|
get the direction vector to the closest object detected by proximity sensors on the link
Implements robot::sim::SimulatedKinematicChain. |
|
get distance to closest object detected by proximity sensors on the link
Implements robot::sim::SimulatedKinematicChain. |
|
get the distance along the link x-axis of the proximity sensor that detected the closest object to the link
Implements robot::sim::SimulatedKinematicChain. |
|
Reimplemented from physics::PositionableOrientable. |
|
end-effector orientation in WorldFrame
|
|
end-effector position in WorldFrame
|
|
Get the current theta* angle (revolute) or position d (prismatic) of the joint. *NB: the angle is relative to the theta home position. Implements robot::sim::SimulatedKinematicChain. |
|
Get the current joint velocity (ang. velocity for revolute joints).
Implements robot::sim::SimulatedKinematicChain. |
|
Definition at line 67 of file SimulatedSerialManipulator. References manipulatorDescr. |
|
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 physics::Orientable. |
|
get the 2D angle theta (rot. angle about Z-axis)
|
|
Implements physics::Positionable. |
|
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. |
|
get the last tool passed to checkProximity() that was in proximity to the end-effector (or 0)
Definition at line 105 of file SimulatedSerialManipulator. References proximityTool. |
|
grasp tool (if a suitable one is within grasping proximity of the end-effector) returns true if a tool was grasped |
|
called from ProximityCollisionResponseHandler::handleCollision()
Implements robot::sim::SimulatedKinematicChain. |
|
|
|
Definition at line 52 of file ReferencedObject. |
|
returns true if a tool is currently being grasped
Definition at line 108 of file SimulatedSerialManipulator. References toolGrasped. |
|
|
|
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
Implements robot::sim::SimulatedKinematicChain. |
|
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(). |
|
release grasp
|
|
|
|
Reimplemented from physics::PositionableOrientable. |
|
Reimplemented from robot::sim::SimulatedKinematicChain. Definition at line 62 of file SimulatedSerialManipulator. |
|
Set the force (torque for revolute joints) of joint j (first joint j=1).
Implements robot::sim::SimulatedKinematicChain. |
|
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. Implements robot::sim::SimulatedKinematicChain. |
|
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 Implements robot::sim::SimulatedKinematicChain. |
|
|
Implements physics::Orientable. |
|
Implements physics::Positionable. |
|
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 from robot::sim::SimulatedKinematicChain. Definition at line 64 of file SimulatedSerialManipulator. |
|
Definition at line 178 of file SimulatedSerialManipulator. References proximityTool. |
|
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. |
|
Definition at line 202 of file SimulatedSerialManipulator. |
|
Reimplemented from robot::sim::SimulatedKinematicChain. Definition at line 201 of file SimulatedSerialManipulator. |
|
Reimplemented from robot::sim::SimulatedKinematicChain. Definition at line 200 of file SimulatedSerialManipulator. |
|
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(). |
|
Solid for the base link.
Definition at line 187 of file SimulatedSerialManipulator. Referenced by getBaseSolid(). |
|
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. |
|
transform from ee frame to ee Solid frame
Definition at line 185 of file SimulatedSerialManipulator. |
|
Solid for the end link.
Definition at line 188 of file SimulatedSerialManipulator. |
|
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 from robot::sim::SimulatedKinematicChain. Definition at line 190 of file SimulatedSerialManipulator. |
|
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 151 of file SimulatedSerialManipulator. Referenced by getManipulatorDescription(). |
|
Definition at line 94 of file SimulatedKinematicChain. |
|
the mount configuration of the manipulator (WorldFrame)
Definition at line 183 of file SimulatedSerialManipulator. |
|
transform from mount frame to base Solid frame
Definition at line 184 of file SimulatedSerialManipulator. |
|
Definition at line 137 of file Referenced. Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference(). |
|
anglular distance components between ee and tool below which is considered within grasping range
Definition at line 194 of file SimulatedSerialManipulator. |
|
Definition at line 179 of file SimulatedKinematicChain. |
|
collidables for each link's proximity sensor
Definition at line 151 of file SimulatedKinematicChain. |
|
distance between ee and tool below which is considered within grasping proximity
Definition at line 193 of file SimulatedSerialManipulator. |
|
last tool found to be in proximity of the end-effector (by checkProximity())
Definition at line 196 of file SimulatedSerialManipulator. Referenced by getToolInProximity(), and setToolInProximity(). |
|
current joint parameters (static simulation only)
Definition at line 153 of file SimulatedKinematicChain. |
|
Definition at line 110 of file SimulatedKinematicChain. |
|
Definition at line 197 of file SimulatedSerialManipulator. Referenced by isToolGrasped(). |