cisstParameterTypes API
cisstParameterTypes (prm) provides standardized data types for
robot state (joint positions, Cartesian poses, forces, etc.) used to enable
“plug and play” component interoperability across cisst/SAW components.
Note
Some parameter types (e.g. prmPositionJointGet, prmPositionCartesianGet)
are typedef specializations of mtsGenericObjectProxy and do not appear as
standalone classes in the Doxygen XML. See the
cisstParameterTypes source headers
for the full list.
Key classes
-
class prmMotionBase : public mtsGenericObject
base class for motion arguments
Subclassed by prmForceCartesianSet, prmVelocityCartesianSet, prmVelocityJointSet
Public Types
-
typedef mtsGenericObject BaseType
Public Functions
-
inline prmMotionBase()
-
inline prmMotionBase(const prmBlocking &blockingFlag, const bool &blendingFactor, const double &timeLimit, const bool &isPreemptable, const bool &isCoordinated, const bool &isGoalOnly)
Set all parameters
- Param :
-
virtual ~prmMotionBase()
destructor
-
inline void SetBaseParameter(const prmBlocking &blockingFlag, const bool &blendingFactor, const double &timeLimit, const bool &isPreemptable, const bool &isCoordinated, const bool &isGoalOnly)
Set all parameters from the base class
- Param :
-
virtual void SerializeRaw(std::ostream &outputStream) const
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream)
Binary deserialization
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(prmBlocking, BlockingFlag)
Set and get methods for blocking flag.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, BlendingFactor)
Set and Get method for the blending parameter. Whether or not to blend motions, and the tolerance (to be implemented later)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(double, TimeLimit)
Set and Get methods for TimeLimit. Describes time allowed or requested for a motion.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsPreemptable)
Set and Get methods for Preemptable parameter. Default is true.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsCoordinated)
Set and Get methods for Coordinated parameter. Force to sync motions between joints or rotation/translation to start and end at the same time by lowering speed on some joints.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsGoalOnly)
Set and Get methods for IsGoalOnly. if True Use current device settings for all except for goal . Eg. Accelerations,Velcities are chosen by the robot, goal and motion base should be set by the user. False by default.
-
typedef mtsGenericObject BaseType
-
class prmForceCartesianGet : public mtsGenericObject
Cartesian force get command argument
Public Types
-
typedef mtsGenericObject BaseType
-
typedef vctFixedSizeConstVectorRef<double, 3, 1> ConstForceType
-
typedef vctFixedSizeVectorRef<double, 3, 1> ForceType
-
typedef ConstForceType ConstTorqueType
Public Functions
-
inline prmForceCartesianGet(void)
default constructor
-
inline prmForceCartesianGet(const vctDouble6 &force)
constructor with all parameters
-
virtual ~prmForceCartesianGet()
destructor
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDouble6, Force)
Set and Get methods for force
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctBool6, Mask)
Set and Get methods for mask
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(std::string, ReferenceFrame)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(std::string, MovingFrame)
-
inline ConstForceType F(void) const
Reference (const) to the first 3 elements (force part) of the “Force” vector.
-
inline ConstTorqueType T(void) const
Reference (const) to the last 3 elements (torque part) of the “Force” vector.
-
inline TorqueType T(void)
Reference to the last 3 elements (torque part) of the “Force” vector.
-
virtual void ToStream(std::ostream &outputStream) const override
Human readable output to stream.
-
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter = ' ', bool headerOnly = false, const std::string &headerPrefix = "") const override
To stream raw data.
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
typedef mtsGenericObject BaseType
-
class prmForceCartesianSet : public prmMotionBase
Cartesian position motion command arguments - default motion is a line between the current position and the goal
Public Types
-
typedef prmMotionBase BaseType
-
typedef vctFixedSizeVector<double, 6> ForceType
-
typedef vctFixedSizeVector<bool, 6> MaskType
Public Functions
-
inline prmForceCartesianSet()
default constructor
-
inline prmForceCartesianSet(const ForceType &force, const MaskType &mask)
constructor with all parameters
-
inline void SetAll(double forceSet, bool mask)
-
virtual ~prmForceCartesianSet()
destructor
-
virtual void ToStream(std::ostream &outputStream) const override
Human readable output to stream.
-
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter = ' ', bool headerOnly = false, const std::string &headerPrefix = "") const override
To stream raw data.
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
typedef prmMotionBase BaseType
-
class prmVelocityJointGet : public mtsGenericObject
motion command arguments for joint angle based motion
Public Types
-
typedef mtsGenericObject BaseType
-
typedef prmVelocityJointGet ThisType
-
typedef unsigned int size_type
Public Functions
-
inline prmVelocityJointGet(void)
default constructor - does nothing for now
-
inline explicit prmVelocityJointGet(const vctDoubleVec &velocity)
constructor with all possible parameters
-
virtual ~prmVelocityJointGet()
destructor
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, Velocity)
Set and Get methods for the the velocity.
-
virtual void ToStream(std::ostream &outputStream) const override
Human readable output to stream.
-
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter = ' ', bool headerOnly = false, const std::string &headerPrefix = "") const override
To stream raw data.
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
typedef mtsGenericObject BaseType
-
class prmVelocityJointSet : public prmMotionBase
motion command arguments for joint angle velocity moves
Public Functions
-
inline prmVelocityJointSet()
default constructor
-
inline prmVelocityJointSet(size_type size)
this constructor sets the size of the vector type members
-
inline prmVelocityJointSet(const vctBoolVec &mask, const vctDoubleVec &guard, const vctDoubleVec &velocity, const vctDoubleVec &acceleration, const vctDoubleVec &deceleration, const bool &isPositionGuarded)
constructor with all parameters
-
virtual ~prmVelocityJointSet()
destructor
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
inline prmVelocityJointSet()
-
class prmVelocityCartesianSet : public prmMotionBase
Cartesian velocity motion command arguments - default motion is a line between the current position and the goal
- Todo:
Review SerializeRaw and DeserializeRaw, they don’t seriliaze the frame pointers.
Public Functions
-
inline prmVelocityCartesianSet()
default constructor
-
inline prmVelocityCartesianSet(const vctDouble3 &velocity, const vctDouble3 &velocityAngular, const vctDouble3 &acceleration, const vctDouble3 &accelerationAngular, const vctBool6 &mask)
constructor with all parameters.
-
virtual ~prmVelocityCartesianSet()
destructor
-
inline void SetGoal(const vctDouble6 &velocities)
Set translation and angular velocities only
- Parameters:
velocities – (3 translational and 3 angular velocities)
- Returns:
void
-
inline void SetTranslationGoal(const vctDouble3 &velocity)
-
inline void SetRotationGoal(const vctDouble3 &velocityAngular)
Set angular velocity only
- Parameters:
velocityAngular – angular velocity
- Returns:
void
-
inline vctDouble3 GetGoal(void) const
Get current goal
- Returns:
vctDouble3 current goal velocity
-
inline void SetVelocity(const vctDouble3 &velocity)
Set the velocity parameter
- Parameters:
velocity – planned velocity
- Returns:
void
-
inline vctDouble3 GetVelocity(void) const
Get the velocity parameter
- Returns:
vctDouble3 current planned velocity
-
inline void SetAngularVelocity(const vctDouble3 &velocityAngular)
Set the angular velocity parameter
- Parameters:
velocityAngular – planned angular velocity
- Returns:
void
-
inline vctDouble3 GetAngularVelocity(void) const
Get the angular velocity parameter
- Returns:
vctDouble3 current planned angular velocity
-
inline void SetAcceleration(const vctDouble3 &acceleration)
Set the acceleration parameters only
- Parameters:
acceleration – target acceleration vector
- Returns:
void
-
inline vctDouble3 GetAcceleration(void) const
Get the current acceleration parameters
- Returns:
vctDouble3 acceleration vector
-
inline void SetAngularAcceleration(const vctDouble3 &accelerationAngular)
Set the deceleration parameters only
- Parameters:
acceleration – target angular acceleration vector
- Returns:
void
-
inline vctDouble3 GetAngularAcceleration(void) const
Get the current angular acceleration parameters
- Returns:
vctDouble3 angular acceleration vector
-
inline void SetMask(const vctBool6 &mask)
Set the mask only
- Parameters:
mask – mask for moves
- Returns:
void
-
inline vctBool6 GetMask(void) const
Get the current mask parameter
- Returns:
prmBoolVec current mask
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
class prmEventButton : public mtsGenericObject
Button event payload
Public Types
-
enum EventType
Values:
-
enumerator PRESSED
-
enumerator RELEASED
-
enumerator CLICKED
-
enumerator DOUBLE_CLICKED
-
enumerator UNDEFINED
-
enumerator PRESSED
-
typedef mtsGenericObject BaseType
Public Functions
-
inline prmEventButton()
Default constructor
-
inline prmEventButton(const prmEventButton &other)
Copy constructor
-
virtual ~prmEventButton()
Destructor
-
inline prmEventButton &operator=(const prmEventButton &other)
Assignment operator
-
virtual void ToStream(std::ostream &outputStream) const override
Overloaded ToStream
-
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter = ' ', bool headerOnly = false, const std::string &headerPrefix = "") const override
To stream raw data.
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
enum EventType
-
class prmActuatorParameters : public mtsGenericObject
So far all the memebers are public for sake of convenience Only use getters unless you know what you are doing.
TODO: add internal size to specify the size of each member in this class so the user does not have to have a this is not a great software engineering approach but for now it might be the most usefull cisst vector of this class caused compilation errors it is possible to resize each memeber so it is better to test each member for size this is by contract but does not have to be so…more discussion required
using mtsVectors here because prm lib does not define Long Vectors galil position is in counts…so
Public Types
-
typedef prmActuatorParameters ThisType
-
typedef mtsGenericObject BaseType
-
typedef unsigned int size_type
Public Functions
-
inline prmActuatorParameters()
default constructor
-
inline virtual ~prmActuatorParameters()
destructor
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, ForwardLimit)
Set and Get methods for actuator settings Can use this in order to reset the position These should be queried only, but for sake of convenience they have setterse here
Set and Get methods for postive limit.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, ReverseLimit)
Set and Get methods for negative limit.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, MaxVelocity)
Set and Get methods for velocity limit, use accelerationMax to accelerate until this limit. Can used this in velocity control mode.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, MaxAcceleration)
Set and Get methods for Acceleration Maximum, this is used as the actual maximum acceleration used for all motion.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, MaxDeceleration)
Set and Get methods for Deceleration Maximum, this is used as the actual maximum acceleration used for all motion.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(mtsLongVec, LimitSwitchDeccelaration)
Set and Get methods for Deceleration Maximum, this is used as the actual maximum acceleration used for all motion.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, Counts_per_mm)
Set and Get methods for counts to mm conversion
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(int, AxisSign)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, Kp)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, Kd)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, Ki)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, IL)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, FV)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, FA)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, TorqueLimit)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, TorqueLimitPeak)
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, TorqueOffset)
-
typedef prmActuatorParameters ThisType
-
class prmRobotState : public mtsGenericObject
motion command arguments for Actuator state , Position, Velocity, etc. TODO: seperate cartesian state and the joint state to 2 different classes.
Public Types
-
typedef prmRobotState ThisType
-
typedef mtsGenericObject BaseType
-
typedef unsigned int size_type
Public Functions
-
prmRobotState()
default constructor - does nothing for now
-
virtual void ToStream(std::ostream &outputStream) const override
Human readable output to stream.
-
inline virtual ~prmRobotState()
constructor with all possible parameters */ inline prmRobotState(const prmPosition & position, const mtsStateIndex & stateIndex): PositionMember(position), StateIndexMember(stateIndex) {}
/*! destructor
-
virtual void SerializeRaw(std::ostream &outputStream) const override
Binary serialization
-
virtual void DeSerializeRaw(std::istream &inputStream) override
Binary deserialization
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDynamicVector<std::string>, JointName)
Set and Get methods for the Joint position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointPosition)
Set and Get methods for the Joint position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointVelocity)
Set and Get methods for the Joint Velocity.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointPositionGoal)
Set and Get methods for goal joint position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointVelocityGoal)
Set and Get methods for goal joint velocity.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointPositionError)
Set and Get methods for error for joint position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, JointVelocityError)
Set and Get methods for error for joint velocity.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(std::string, ReferenceFrame)
Set and Get methods for reference frame.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(std::string, MovingFrame)
Set and Get methods for moving frame.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianPosition)
Set and Get methods for cartesian position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianVelocity)
Set and Get methods for cartesian velocity.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianPositionGoal)
Set and Get methods for gaol cartesian position.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianVelocityGoal)
Set and Get methods for goal cartesian velocity.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianPositionError)
Set and Get methods for cartesian position error.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctDoubleVec, CartesianVelocityError)
Set and Get methods for cartesian velocity error.
-
CMN_DECLARE_MEMBER_AND_ACCESSORS(vctFrm3, EndEffectorFrame)
Set and Get methods for EndEffector Frame wrt base robot frame. Slightly redundant.
-
typedef prmRobotState ThisType