The Joints class represents a joint position of a robot (robot axes). More...
#include <joints.h>
Public Member Functions | |
| Joints () | |
| Joints. | |
| Joints (int ndofs) | |
| Joints. | |
| Joints (const double *joints, int ndofs=0) | |
| Set joint values given a double array and the number of joint values. | |
| Joints (const float *joints, int ndofs=0) | |
| Set joint values given a float array and the number of joint values. | |
| Joints (const Joints &joints)=default | |
| Create a copy of an object. | |
| Joints & | operator= (const Joints &joints)=default |
| Joints (const legacy::Matrix2D *mat2d, int column=0, int ndofs=-1) | |
| Create joint values given a 2D matrix and the column selecting the desired values. | |
| Joints (const QString &str) | |
| Convert a string to joint values. | |
| const double * | ValuesD () const |
| Joint values. | |
| const float * | ValuesF () const |
| Joint values. | |
| const double * | Values () const |
| Joint values. | |
| double | Compare (const Joints &other) const |
| double * | Data () |
| int | Length () const |
| Number of joint axes of the robot (or degrees of freedom) | |
| void | setLength (int new_length) |
| Set the length of the array (only shrinking the array is allowed) | |
| bool | Valid () |
| Check if the joints are valid. For example, when we request the Inverse kinematics and there is no solution the joints will not be valid. (for example, an invalid result after calling class: IItem::SolveIK returns a non valid joints) | |
| int | GetValues (double *joints) |
| GetValues. | |
| void | SetValues (const double *joints, int ndofs=-1) |
| Set the joint values in deg or mm. You can also important provide the number of degrees of freedom (6 for a 6 axis robot). | |
| void | SetValues (const float *joints, int ndofs=-1) |
| Set the joint values in deg or mm (floats). You can also important provide the number of degrees of freedom (6 for a 6 axis robot). | |
Public Attributes | |
| int | _dofCount |
| number of degrees of freedom | |
| double | _joints [MaximumJoints] |
| joint values (doubles, used to store the joint values) | |
| float | _jointsFloat [MaximumJoints] |
| joint values (floats, used to return a copy as a float pointer) | |
Static Public Attributes | |
| static constexpr int | MaximumJoints = 12 |
The Joints class represents a joint position of a robot (robot axes).
| Joints | ( | ) |
Definition at line 43 of file joints.cpp.
|
explicit |
| ndofs | number of robot joint axes or degrees of freedom |
Definition at line 50 of file joints.cpp.
| Joints | ( | const double * | joints, |
| int | ndofs = 0 ) |
Set joint values given a double array and the number of joint values.
| joints | Pointer to the joint values |
| ndofs | Number of joints |
Definition at line 59 of file joints.cpp.
| Joints | ( | const float * | joints, |
| int | ndofs = 0 ) |
Set joint values given a float array and the number of joint values.
| joints | Pointer to the joint values |
| ndofs | Number of joints |
Definition at line 64 of file joints.cpp.
| Joints | ( | const legacy::Matrix2D * | mat2d, |
| int | column = 0, | ||
| int | ndofs = -1 ) |
Create joint values given a 2D matrix and the column selecting the desired values.
| mat2d | |
| column | |
| ndofs |
Definition at line 76 of file joints.cpp.
| Joints | ( | const QString & | str | ) |
Convert a string to joint values.
| str | Comma separated joint values (spaces or tabs are also accepted) |
Definition at line 92 of file joints.cpp.
| double Compare | ( | const Joints & | other | ) | const |
Definition at line 125 of file joints.cpp.
| double * Data | ( | ) |
Definition at line 135 of file joints.cpp.
| int GetValues | ( | double * | joints | ) |
GetValues.
| joints | joint values in deg or mm |
Definition at line 184 of file joints.cpp.
| int Length | ( | ) | const |
Number of joint axes of the robot (or degrees of freedom)
Definition at line 140 of file joints.cpp.
| void setLength | ( | int | new_length | ) |
Set the length of the array (only shrinking the array is allowed)
Definition at line 145 of file joints.cpp.
| void SetValues | ( | const double * | joints, |
| int | ndofs = -1 ) |
Set the joint values in deg or mm. You can also important provide the number of degrees of freedom (6 for a 6 axis robot).
| joints | joint values in deg or mm |
| ndofs | number of degrees of freedom (number of axes or joints) |
Definition at line 158 of file joints.cpp.
| void SetValues | ( | const float * | joints, |
| int | ndofs = -1 ) |
Set the joint values in deg or mm (floats). You can also important provide the number of degrees of freedom (6 for a 6 axis robot).
| joints | joint values in deg or mm |
| ndofs | number of degrees of freedom (number of axes or joints) |
Definition at line 171 of file joints.cpp.
| bool Valid | ( | ) |
Check if the joints are valid. For example, when we request the Inverse kinematics and there is no solution the joints will not be valid. (for example, an invalid result after calling class: IItem::SolveIK returns a non valid joints)
Definition at line 153 of file joints.cpp.
| const double * Values | ( | ) | const |
Joint values.
Definition at line 119 of file joints.cpp.
| const double * ValuesD | ( | ) | const |
Joint values.
Definition at line 98 of file joints.cpp.
| const float * ValuesF | ( | ) | const |
Joint values.
Definition at line 103 of file joints.cpp.
| double _joints[MaximumJoints] |
|
mutable |