Cardboard Robot SDK
 All Classes Namespaces Functions Enumerations Properties Events
Properties | Public Member Functions | List of all members
CBRobot.DofVector Class Reference

Detailed Description

Represents a vector composed of motor positions (M1, M2, M3), measured in RADIANS, that defines the position or change in position of the robot arm's tip.

When interpreted as a point, the vector (0, 0, 0) generally represents the "home position" of the arm.

Inheritance diagram for CBRobot.DofVector:
CBRobot.Vector

Properties

double M1 [get]
 Gets motor #1's position, in radians.
 
double M2 [get]
 Gets motor #2's position, in radians.
 
double M3 [get]
 Gets motor #3's position, in radians.
 
static DofVector Zero [get]
 Returns the DOF vector (0, 0, 0)
 

Public Member Functions

 DofVector (double m1, double m2, double m3)
 Creates a new DofVector with the specified motor positions (M1, M2, M3).
 
double GetComponent (int componentIndex)
 Returns the value of the component with the given index (0, 1, or 2)
 
DofVector SetComponent (int componentIndex, double value)
 Returns a new vector with the specified component (0, 1, or 2) set to the given value.
 
override DofVector ConvertToDofPoint (Robot robot)
 Interprets this vector as the position of the arm's tip, and returns its DOF (motor position) representation.
 
override string ToString ()
 Returns a string representation of this point.
 
- Public Member Functions inherited from CBRobot.Vector
Vector SetComponent (int componentIndex, double value, CoordinateSystem cs, Robot robot)
 Returns a new vector with the specified component (0 - 2) set to the given value, doing coordinate system conversion as needed.
 
double GetComponent (int componentIndex, CoordinateSystem cs, Robot robot)
 Gets the specified vector component (0 - 2), doing coordinate system conversion as needed.
 

Member Function Documentation

override DofVector CBRobot.DofVector.ConvertToDofPoint ( Robot  robot)
inlinevirtual

Interprets this vector as the position of the arm's tip, and returns its DOF (motor position) representation.

If there is no exact conversion (i.e., the point is outside of the arm's reach), an approximation is returned instead (the closest position that is within reach).

Implements CBRobot.Vector.


The documentation for this class was generated from the following file: