#include <ATISensor.h>
Inheritance diagram for OSCAR::ATISensor:

Public Methods | |
| ATISensor (unsigned int portNo, OSCARError &err=DUMMY_ERROR(noError)) | |
| ~ATISensor () | |
| virtual bool | Initialize () |
| virtual bool | Read (Vector7Array forces) |
| bool | Read (Vector7 &forces) |
| bool | SendCommand (char *command, String &string) |
| bool | SetSpatialXform (const String &filename) |
| bool | SetSpatialXform (const SpatialXform &spatialxform) |
| bool | GetSpatialXform (SpatialXform &spatialXform) const |
| bool | ApplyTransform (bool aTrans) |
| bool | GetTransformFlag () |
| bool | SetBias (Vector7 bs) |
| bool | GetBias (Vector7 &bs) |
| bool | Close () |
Protected Methods | |
| bool | transformForces (Vector7 &forces) |
Private Attributes | |
| unsigned int | portNum |
| bool | applyTransform |
| SpatialXform | forceTransform |
| Vector7 | bias |
|
||||||||||||
|
Constructor for ATISensor Use this to construct a ATISensor object. The ATI F/T sensor interfaces through the serial port.
|
|
|
Destructor for ATISensor Makes a call to the Close() method if it has not been called.
|
|
|
A method that lets the user set the data member applyTransform applyTransform is a bool which is set to true by default. applyTransform = true implies that the force vector read from the sensor should be operated upon by the spatial transformation forceTransform so that the result is in the EEF/Task frame. In most cases this would be desirable since applications are often written to work with either joint space or EEF/Task space. applyTransform = false implies that the raw readings from the sensor should be output when a call to one of the Read() methods is made.
|
|
|
Overwrites the Close() method in base class. Closes the SCI and deletes the handle/pointer to serial port. A call to this method is made by the destructor.
Reimplemented from OSCAR::Device. |
|
|
|
|
|
Makes forceTransform accessible to the user. Used to obtain the transformation from sensor local frame to the EEF/Task frame.
|
|
|
A method that lets the user query the data member applyTransform applyTransform is a bool which is set to true by default. applyTransform = true implies that the force vector read from the sensor should be operated upon by the spatial transformation forceTransform so that the result is in the EEF/Task frame. In most cases this would be desirable since applications are often written to work with either joint space or EEF/Task space. applyTransform = false implies that the raw readings from the sensor should be output when a call to one of the Read() methods is made.
|
|
|
Initializes the ATI F/T Sensor serial communication interface (SCI) Opens the communication channel and sets up the SCI parameters such as the baudrate,bytesize, parity, stopbits etc. A call to this method is *MANDATORY* before any other method can be called.
Reimplemented from OSCAR::Device. |
|
|
This overloaded method facilitates the storage of ONE force reading in an Vector7 object. For the ATI F/T Sensor the sensor read command is "control T". Hence this method performs a "control T" sensor read, collects the characters read, parses the force vector elements from them and finally multiplies each reading by the const double ConvertFromCounts = 40.0 to convert the readings to lbs and lbs-in units. Checks for sensor errors (Saturation, Tranducer Errors) The final reading is stored in the param passed.
|
|
|
This overloaded method facilitates the storage of a stream of force readings or multiple force readings in an Vector7Array object (This 'type' is defined in this header file as an array of Vector7 objects) Makes multiple calls to the Read(Vector7, unsigned int) method. The number of readings need to be specified in the interface as given below.
|
|
||||||||||||
|
Sends a command to the F/T sensor. This method essentially writes the command to the serial port buffer, reads the acknowledgement and stores it in the String object parameter. Note that this method *CANNOT* be used for query commands "control T" & "control N" and the QS stream return command.
|
|
|
|
|
|
Overloaded method to set the data member forceTransform which is a 6x6 Force Transformation Matrix associated with the spatial force vector, from an input SpatialXform object. The spatial transformation is the one which maps the 6D force vector readings from the sensor's local frame to the end-effector(EEF) or task frame This matrix has the general form X = [R O; pxR R] (Matlab Notation) where R: The rotation matrix from sensor reference frame to EEF frame p: Position vector of origin of sensor reference frame in the EEF frame O: 6 by 6 zero matrix x: The vector cross-product operator.
|
|
|
Overloaded method to set the data member forceTransform which is a 6x6 Force Transformation Matrix associated with the spatial force vector, from a datafile.
|
|
|
A Vector7 object holding entries corresponding to Raw Force Readings in the sensor's local frame is premultiplied by the forceTransform data member of this class to result in the input force vector transformed to the EEF/Task space.
|
|
|
|
|
|
|
|
|
|
|
|
|
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |