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

robot::TestRobot Class Reference

Inheritance diagram for robot::TestRobot:

Inheritance graph
[legend]
Collaboration diagram for robot::TestRobot:

Collaboration graph
[legend]
List of all members.

Public Types

enum  JointType { Prismatic = KinematicChain::Link::Prismatic, Revolute = KinematicChain::Link::Revolute }
enum  CoordFrame {
  UnknownFrame, EndEffectorFrame, EndEffectorBaseFrame, BaseFrame,
  MountFrame, PlatformFrame, WorldFrame
}

Public Member Functions

 TestRobot ()
 instantiate default robot (fixed platform with a single Puma manipulator)

 TestRobot (ref< base::VFile > robotSpecification, const base::Point3 &initialPosition, const base::Orient &initialOrientation)
 instantiate robot from file specification

 TestRobot (ref< const robot::RobotDescription > robotDescription, const base::Point3 &initialPosition, const base::Orient &initialOrientation)
 instantiate robot from a description

 TestRobot (const base::IVector &jointType, const base::Vector &alpha, const base::Vector &a, const base::Vector &d, const base::Vector &theta)
 instantiate a fixed platform with a single manipulator specified via D-H parameters

virtual String className () const
virtual array< std::pair<
String, String > > 
controlInterfaces () const
virtual ref< ControlInterfacegetControlInterface (String interfaceName="") throw (std::invalid_argument)
virtual bool isDescriptionProvided () const
 is there a description of this robot available?

const base::Point3 getPosition () const
 < get world frame position of robot

const base::Orient getOrientation () const
 < get world frame orientation of robot

void setPosition (const base::Point3 &pos)
void setOrientation (const base::Orient &orient)
void placeToolInProximity (ref< const ToolDescription > toolDescription, Int manipIndex=0)
void removeToolFromProximity (Int manipIndex=0)
 remove any tool from within grasping range of the end-effector

virtual ref< const RobotDescriptiongetRobotDescription () const throw (std::logic_error)
 get a description of the robot, if provided. Throws an exception if no description can be provided.

virtual ref< RobotDescriptionnewRobotDescription () const
virtual ref< PlatformDescriptionnewPlatformDescription () const
virtual ref< ManipulatorDescriptionnewManipulatorDescription () const
virtual ref< ToolDescriptionnewToolDescription () const
base::Matrix4 coordFrameTransform (CoordFrame from, CoordFrame to=PlatformFrame, Int manipulatorIndex=0, const base::Matrix4 &T=base::Matrix4(), const base::Point3 &platformPosition=base::Point3(), const base::Orient &platformOrientation=base::Orient()) 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

Static Public Member Functions

CoordFrame coordFrame (const String &frameString)
 convert String coord. frame specifier to CoordFrame

String coordFrame (CoordFrame coordFrame)
 convert coord. frame specifier to String


Protected Member Functions

void create (String manipName, const base::IVector &jointType, const base::Vector &alpha, const base::Vector &a, const base::Vector &d, const base::Vector &theta)
void initManipulators ()
void setRobotDescription (ref< const RobotDescription > robotDescription)

Protected Attributes

base::Point3 position
 world frame position of robot

base::Orient orientation
 world frame orientation of robot

array< Vectorqa
 joint parameters of manipulators

array< Vectortqa
 joint parameters of tools (index corresponds to manipulators (qa) - i.e. at most one tool per manipulator)

array< bool > toolProximity
 is a tool in proximity of manipulator end-effector?

array< bool > toolGrasped
 is manipulator grasping a tool?

array< ref< const ToolDescription > > tools
 which tool (in proximity and possibly being grasped)

int _refCount
bool onUnreferenceEnabled

Detailed Description

A concrete Robot class that doesn't correspond to any real robot. It is useful for testing. The RobotDescription provided depends on the constructor used for instantiation.

Definition at line 45 of file TestRobot.


Member Enumeration Documentation

enum robot::Robot::CoordFrame [inherited]
 

Enumeration values:
UnknownFrame 
EndEffectorFrame 
EndEffectorBaseFrame 
BaseFrame 
MountFrame 
PlatformFrame 
WorldFrame 

Definition at line 81 of file Robot.

enum robot::TestRobot::JointType
 

Enumeration values:
Prismatic 
Revolute 

Definition at line 48 of file TestRobot.


Constructor & Destructor Documentation

robot::TestRobot::TestRobot  ) 
 

instantiate default robot (fixed platform with a single Puma manipulator)

robot::TestRobot::TestRobot ref< base::VFile robotSpecification,
const base::Point3 initialPosition,
const base::Orient initialOrientation
 

instantiate robot from file specification

robot::TestRobot::TestRobot ref< const robot::RobotDescription robotDescription,
const base::Point3 initialPosition,
const base::Orient initialOrientation
 

instantiate robot from a description

robot::TestRobot::TestRobot const base::IVector jointType,
const base::Vector alpha,
const base::Vector a,
const base::Vector d,
const base::Vector theta
 

instantiate a fixed platform with a single manipulator specified via D-H parameters


Member Function Documentation

virtual String robot::TestRobot::className  )  const [inline, virtual]
 

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

Implements base::Object.

Definition at line 66 of file TestRobot.

virtual array<std::pair<String,String> > robot::TestRobot::controlInterfaces  )  const [virtual]
 

A Robot provides a number of ControlInterfaces for various parts, such as its drive platform, manipulators and other sensors etc. Refer to documentation for specific concrete Robot implementation for specific ControlInterface names and descriptions. This method enumerates the ControlInterface names and their types. The interfaces can be obtained by passing the name to the getControlInterface() method.

Reimplemented from robot::Robot.

String robot::Robot::coordFrame CoordFrame  coordFrame  )  [static, inherited]
 

convert coord. frame specifier to String

CoordFrame robot::Robot::coordFrame const String &  frameString  )  [static, inherited]
 

convert String coord. frame specifier to CoordFrame

base::Matrix4 robot::Robot::coordFrameTransform CoordFrame  from,
CoordFrame  to = PlatformFrame,
Int  manipulatorIndex = 0,
const base::Matrix4 T = base::Matrix4(),
const base::Point3 platformPosition = base::Point3(),
const base::Orient platformOrientation = base::Orient()
const [inherited]
 

Obtain transformation that will transform between coordinate frames Some transformations will require further information, such as specifying the forward kinematics transform from the base frame to the end-effector frame, or which manipulator (EndEffector[Base]Frame, BaseFrame & MountFrame) Transformations involving the WorldFrame require the platform position and orientation.

void robot::TestRobot::create String  manipName,
const base::IVector jointType,
const base::Vector alpha,
const base::Vector a,
const base::Vector d,
const base::Vector theta
[protected]
 

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 ref<ControlInterface> robot::TestRobot::getControlInterface String  interfaceName = ""  )  throw (std::invalid_argument) [virtual]
 

TestRobot provides the following ControlInterfaces (name:type):

platformPosition:PlatformPositionControl

  • outputs control the x,y and angle of the platform w.r.t to the world coordinate frame. The angle is clockwise relative to the x-axis (about z).

manipulatorPositionN:JointPositionControl

  • outputs control the position of a manipulators joints (angle for revolute joints and extension for prismatic joints)

manipulatorProximityN:LinkProximitySensors

  • Inputs provide proximity sensor information.

manipulatorToolGripN:ToolGripControl

  • single scalar input represents tool proximity to tool grip mechanism. 0 => not in range to be grasped, 1 => in range to be grasped (or currently grasped) single scalar output controls tool gripper latch 1 => grasp/latch tool, 0 => ungrasp/unlatch tool

toolPositionN:JointPositionControl

  • joint position for tool joints (if any). Note that the inputSize() and outputSize() change dynamically depending on which tool is grasped (0 when no tool is grasped)

Implements robot::Robot.

const base::Orient robot::TestRobot::getOrientation  )  const [inline]
 

< get world frame orientation of robot

Definition at line 101 of file TestRobot.

const base::Point3 robot::TestRobot::getPosition  )  const [inline]
 

< get world frame position of robot

Definition at line 99 of file TestRobot.

References base::Point3.

virtual ref<const RobotDescription> robot::Robot::getRobotDescription  )  const throw (std::logic_error) [inline, virtual, inherited]
 

get a description of the robot, if provided. Throws an exception if no description can be provided.

Definition at line 64 of file Robot.

References Exception, and robot::Robot::isDescriptionProvided().

void robot::TestRobot::initManipulators  )  [protected]
 

virtual bool robot::TestRobot::isDescriptionProvided  )  const [inline, virtual]
 

is there a description of this robot available?

Reimplemented from robot::Robot.

Definition at line 97 of file TestRobot.

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.

virtual ref<ManipulatorDescription> robot::Robot::newManipulatorDescription  )  const [inline, virtual, inherited]
 

Reimplemented in robot::sim::SimulatedRobot.

Definition at line 76 of file Robot.

References NewObj.

virtual ref<PlatformDescription> robot::Robot::newPlatformDescription  )  const [inline, virtual, inherited]
 

Reimplemented in robot::sim::SimulatedRobot.

Definition at line 75 of file Robot.

References NewObj.

virtual ref<RobotDescription> robot::Robot::newRobotDescription  )  const [inline, virtual, inherited]
 

Definition at line 74 of file Robot.

References NewObj.

virtual ref<ToolDescription> robot::Robot::newToolDescription  )  const [inline, virtual, inherited]
 

Definition at line 77 of file Robot.

References NewObj.

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().

void robot::TestRobot::placeToolInProximity ref< const ToolDescription toolDescription,
Int  manipIndex = 0
 

because tools are not physically simulated, we can 'magically' indicate that a tool is within grasping range of the end-effector

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().

void robot::TestRobot::removeToolFromProximity Int  manipIndex = 0  ) 
 

remove any tool from within grasping range of the end-effector

void robot::TestRobot::setOrientation const base::Orient orient  )  [inline]
 

Parameters:
orient  set world frame orientation of robot

Definition at line 105 of file TestRobot.

void robot::TestRobot::setPosition const base::Point3 pos  )  [inline]
 

Parameters:
pos  set world frame position of robot

Definition at line 103 of file TestRobot.

References base::Point3.

void robot::Robot::setRobotDescription ref< const RobotDescription robotDescription  )  [inline, protected, inherited]
 

Definition at line 115 of file Robot.

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().

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().

base::Orient robot::TestRobot::orientation [protected]
 

world frame orientation of robot

Definition at line 121 of file TestRobot.

base::Point3 robot::TestRobot::position [protected]
 

world frame position of robot

Definition at line 120 of file TestRobot.

array<Vector> robot::TestRobot::qa [protected]
 

joint parameters of manipulators

Definition at line 123 of file TestRobot.

array<bool> robot::TestRobot::toolGrasped [protected]
 

is manipulator grasping a tool?

Definition at line 127 of file TestRobot.

array<bool> robot::TestRobot::toolProximity [protected]
 

is a tool in proximity of manipulator end-effector?

Definition at line 126 of file TestRobot.

array<ref<const ToolDescription> > robot::TestRobot::tools [protected]
 

which tool (in proximity and possibly being grasped)

Definition at line 128 of file TestRobot.

array<Vector> robot::TestRobot::tqa [protected]
 

joint parameters of tools (index corresponds to manipulators (qa) - i.e. at most one tool per manipulator)

Definition at line 124 of file TestRobot.


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