2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
52 Joint(joint_type_e joint_type);
58 Joint(
bool x_free,
bool y_free,
bool z_free);
64 void setFreeAxes(
bool x_free,
bool y_free,
bool z_free);
72 const clockwerk::Matrix<T, 3, 3>& dependency() {
return _dependency;}
75 clockwerk::joint_type_e
jointType() {
return _joint_type;}
76 void jointType(joint_type_e joint_type) {_joint_type = joint_type;}
78 joint_type_e _joint_type;
82 Matrix<T, 3, 3> _dependency;
87 : _joint_type(FULLY_LOCKED),
88 _freedom({{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}}),
89 _dependency({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}) {}
97 Joint<T>::
Joint(
bool x_free,
bool y_free,
bool z_free)
101 if(x_free && y_free && z_free) {
102 _joint_type = FULLY_FREE;
103 }
else if(!x_free && !y_free && !z_free) {
104 _joint_type = FULLY_LOCKED;
110 template <
typename T>
112 _freedom.set(0, 0, (T)x_free);
113 _freedom.set(1, 1, (T)y_free);
114 _freedom.set(2, 2, (T)z_free);
115 _dependency.set(0, 0, (T)!x_free);
116 _dependency.set(1, 1, (T)!y_free);
117 _dependency.set(2, 2, (T)!z_free);
120 if(x_free && y_free && z_free) {
121 _joint_type = FULLY_FREE;
122 }
else if(!x_free && !y_free && !z_free) {
123 _joint_type = FULLY_LOCKED;
129 template <
typename T>
133 _freedom.set(0, 0, 1.0);
134 _freedom.set(1, 1, 1.0);
135 _freedom.set(2, 2, 1.0);
136 _dependency.set(0, 0, 0.0);
137 _dependency.set(1, 1, 0.0);
138 _dependency.set(2, 2, 0.0);
139 _joint_type = FULLY_FREE;
142 _freedom.set(0, 0, 0.0);
143 _freedom.set(1, 1, 0.0);
144 _freedom.set(2, 2, 0.0);
145 _dependency.set(0, 0, 1.0);
146 _dependency.set(1, 1, 1.0);
147 _dependency.set(2, 2, 1.0);
148 _joint_type = FULLY_LOCKED;
153 _joint_type = NOT_SET;
Joint class defining relationship between frames.
Definition Joint.hpp:44
Joint()
Default constructor for the joint object.
Definition Joint.hpp:86
void setFreeAxes(bool x_free, bool y_free, bool z_free)
Function to set the axes free on this joint.
Definition Joint.hpp:111
Joint(bool x_free, bool y_free, bool z_free)
Constructor to set free axes on the joint for the object.
Definition Joint.hpp:97
void setJointType(joint_type_e joint_type)
Function to set the joint type.
Definition Joint.hpp:130
Matrix< T, 3, 3 > _freedom
Freedom and dependency matrix.
Definition Joint.hpp:81
clockwerk::joint_type_e jointType()
Getter/setter for joint type.
Definition Joint.hpp:75
const clockwerk::Matrix< T, 3, 3 > & freedom()
Functions to return freedom or dependency matrix.
Definition Joint.hpp:71
Joint(joint_type_e joint_type)
Constructor to set joint type.
Definition Joint.hpp:92