chain.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3  * All rights reserved. This program is made available under the terms of the
4  * Eclipse Public License v1.0 which accompanies this distribution, and is
5  * available at http://www.eclipse.org/legal/epl-v10.html
6  * Contributors:
7  * The University of Tokyo
8  */
9 /*
10  * chain.cpp
11  * Create: Katsu Yamane, Univ. of Tokyo, 03.06.18
12  */
13 
14 #include "chain.h"
15 #include <string.h>
16 
17 char* CharName(const char* _name)
18 {
19  char* ret = (char*)strrchr(_name, charname_separator);
20  if(ret) return ret+1;
21  return 0;
22 }
23 
25 {
26  value.resize(n_value);
27  vel.resize(n_dof);
28  acc.resize(n_dof);
30  GetJointVel(vel);
31  GetJointAcc(acc);
32  return 0;
33 }
34 
35 int Chain::SetStatus(const fVec& values, const fVec& vels, const fVec& accs)
36 {
37  SetJointValue(values);
38  SetJointVel(vels);
39  SetJointAcc(accs);
40  return 0;
41 }
42 
43 /*
44  * constructors and destructors
45  */
47 {
48  root = NULL;
49  n_value = 0;
50  n_dof = 0;
51  n_thrust = 0;
52  n_joint = 0;
53  in_create_chain = false;
54  all_value = 0;
55  all_value_dot = 0;
56  all_vel = 0;
57  all_vel_dot = 0;
58  j_acc_p[0] = j_acc_p[1] = j_acc_p[2] = j_acc_p[3] = 0;
59  j_value_dot[0] = j_value_dot[1] = j_value_dot[2] = j_value_dot[3] = 0;
60  init_value = 0;
61  init_vel = 0;
62  do_connect = false;
63 }
64 
66 {
67  if(root) delete root;
68  if(all_value) delete[] all_value;
69  if(all_value_dot) delete[] all_value_dot;
70  if(all_vel) delete[] all_vel;
71  if(all_vel_dot) delete[] all_vel_dot;
72  if(j_acc_p[0]) delete[] j_acc_p[0];
73  if(j_acc_p[1]) delete[] j_acc_p[1];
74  if(j_acc_p[2]) delete[] j_acc_p[2];
75  if(j_acc_p[3]) delete[] j_acc_p[3];
76  if(j_value_dot[0]) delete[] j_value_dot[0];
77  if(j_value_dot[1]) delete[] j_value_dot[1];
78  if(j_value_dot[2]) delete[] j_value_dot[2];
79  if(j_value_dot[3]) delete[] j_value_dot[3];
80  if(init_value) delete[] init_value;
81  if(init_vel) delete[] init_vel;
82 #ifndef SEGA
84 #endif
85 }
86 
88 {
89  if(root) delete root;
90  root = 0;
91  n_value = 0;
92  n_dof = 0;
93  n_thrust = 0;
94  n_joint = 0;
95  if(all_value) delete[] all_value;
96  all_value = 0;
97  if(all_value_dot) delete[] all_value_dot;
98  all_value_dot = 0;
99  if(all_vel) delete[] all_vel;
100  all_vel = 0;
101  if(all_vel_dot) delete[] all_vel_dot;
102  all_vel_dot = 0;
103  if(j_acc_p[0]) delete[] j_acc_p[0];
104  if(j_acc_p[1]) delete[] j_acc_p[1];
105  if(j_acc_p[2]) delete[] j_acc_p[2];
106  if(j_acc_p[3]) delete[] j_acc_p[3];
107  if(j_value_dot[0]) delete[] j_value_dot[0];
108  if(j_value_dot[1]) delete[] j_value_dot[1];
109  if(j_value_dot[2]) delete[] j_value_dot[2];
110  if(j_value_dot[3]) delete[] j_value_dot[3];
111  if(init_value) delete[] init_value;
112  if(init_vel) delete[] init_vel;
113  j_acc_p[0] = j_acc_p[1] = j_acc_p[2] = j_acc_p[3] = 0;
114  j_value_dot[0] = j_value_dot[1] = j_value_dot[2] = j_value_dot[3] = 0;
115  init_value = 0;
116  init_vel = 0;
117  in_create_chain = false;
118  do_connect = false;
119 }
120 
122 {
123  name = 0;
124  basename = 0;
125  realname = 0;
126  cur_scale = 1.0;
127  clear();
128 }
129 
130 Joint::Joint(const char* _name, JointType jt,
131  const fVec3& rpos, const fMat33& ratt, AxisIndex ai,
132  int _t_given)
133 {
134  name = 0;
135  basename = 0;
136  realname = 0;
137  cur_scale = 1.0;
138  clear();
139  if(_name)
140  {
141  name = new char [strlen(_name) + 1];
142  strcpy(name, _name);
143  char* charname = strrchr(name, charname_separator);
144  if(charname) *charname = '\0';
145  basename = new char [strlen(name) + 1];
146  strcpy(basename, name);
147  if(charname) *charname = charname_separator;
148  }
149  t_given = _t_given;
150  switch(jt)
151  {
152  case JFIXED:
153  SetFixedJointType(rpos, ratt);
154  break;
155  case JROTATE:
156  SetRotateJointType(rpos, ratt, ai);
157  break;
158  case JSLIDE:
159  SetSlideJointType(rpos, ratt, ai);
160  break;
161  case JSPHERE:
162  SetSphereJointType(rpos, ratt);
163  break;
164  case JFREE:
165  SetFreeJointType(rpos, ratt);
166  break;
167  case JUNKNOWN:
168  break;
169  }
170 }
171 
172 Joint::Joint(JointData* jdata, const char* charname)
173 {
174  name = 0;
175  basename = 0;
176  realname = 0;
177  cur_scale = 1.0;
178  clear();
179  if(jdata->name)
180  {
181  if(charname)
182  {
183  name = new char [strlen(jdata->name) + strlen(charname) + 2];
184  sprintf(name, "%s%c%s", jdata->name, charname_separator, charname);
185  basename = new char [strlen(jdata->name) + 1];
186  strcpy(basename, jdata->name);
187  }
188  else
189  {
190  name = new char [strlen(jdata->name) + 1];
191  strcpy(name, jdata->name);
192  // character name included?
193  char* _ch = strrchr(name, charname_separator);
194  if(_ch) *_ch = '\0';
195  basename = new char [strlen(name) + 1];
196  strcpy(basename, name);
197  if(_ch) *_ch = charname_separator;
198  }
199  }
200  mass = jdata->mass;
201  inertia.set(jdata->inertia);
202  loc_com.set(jdata->com);
203  t_given = jdata->t_given;
204  switch(jdata->j_type)
205  {
206  case JFIXED:
207  SetFixedJointType(jdata->rel_pos, jdata->rel_att);
208  break;
209  case JROTATE:
210  SetRotateJointType(jdata->rel_pos, jdata->rel_att, jdata->axis_index);
211  break;
212  case JSLIDE:
213  SetSlideJointType(jdata->rel_pos, jdata->rel_att, jdata->axis_index);
214  break;
215  case JSPHERE:
216  SetSphereJointType(jdata->rel_pos, jdata->rel_att);
217  break;
218  case JFREE:
219  SetFreeJointType(jdata->rel_pos, jdata->rel_att);
220  break;
221  default:
222  break;
223  }
224 }
225 
227 {
228  if(name) delete[] name;
229  if(basename) delete[] basename;
230  if(realname) delete[] realname;
231  name = 0;
232  basename = 0;
233  realname = 0;
234  chain = NULL;
235  parent = NULL;
236  brother = NULL;
237  child = NULL;
238  real = NULL;
239  rpos_real.zero();
241  j_type = JUNKNOWN;
242  t_given = true;
243  n_dof = 0;
244  n_thrust = 0;
245  n_root_dof = 0;
246 
247  q = qd = qdd = 0.0;
248  axis.zero();
249  init_pos.zero();
250  init_att.identity();
251  rel_lin_vel.zero();
252  rel_ang_vel.zero();
253  rel_lin_acc.zero();
254  rel_ang_acc.zero();
255 
256  rel_pos.zero();
257  rel_att.identity();
258  mass = 0.0;
259  inertia.zero();
260  loc_com.zero();
261  gear_ratio = 1.0;
262  rotor_inertia = 0.0;
263  i_value = -1;
264  i_dof = -1;
265  i_thrust = -1;
266  i_joint = -1;
267 
268  abs_pos.zero();
269  abs_att.identity();
270  loc_lin_vel.zero();
271  loc_ang_vel.zero();
272  loc_lin_acc.zero();
273  loc_ang_acc.zero();
274  loc_com_acc.zero();
275  loc_com_vel.zero();
276 
277  p_lin_vel.zero();
278  p_ep_dot.zero();
279  p_ang_vel.zero();
280  p_lin_acc.zero();
281  p_ang_acc.zero();
282 
283  ext_force.zero();
284  ext_moment.zero();
285  joint_f.zero();
286  joint_n.zero();
287 
288  tau=0.0;
289 
290 }
291 
293 {
294  if(name) delete[] name;
295  if(basename) delete[] basename;
296  if(realname) delete[] realname;
297  if(brother) delete brother;
298  if(child) delete child;
299 }
300 
301 void Joint::SetJointData(JointData* jdata, const char* charname)
302 {
303  clear();
304  if(jdata->name)
305  {
306  name = new char [strlen(jdata->name) + 1];
307  strcpy(name, jdata->name);
308  }
309  mass = jdata->mass;
310  inertia.set(jdata->inertia);
311  loc_com.set(jdata->com);
312  t_given = jdata->t_given;
313  switch(jdata->j_type)
314  {
315  case JFIXED:
316  SetFixedJointType(jdata->rel_pos, jdata->rel_att);
317  break;
318  case JROTATE:
319  SetRotateJointType(jdata->rel_pos, jdata->rel_att, jdata->axis_index);
320  break;
321  case JSLIDE:
322  SetSlideJointType(jdata->rel_pos, jdata->rel_att, jdata->axis_index);
323  break;
324  case JSPHERE:
325  SetSphereJointType(jdata->rel_pos, jdata->rel_att);
326  break;
327  case JFREE:
328  SetFreeJointType(jdata->rel_pos, jdata->rel_att);
329  break;
330  default:
331  break;
332  }
333 }
334 
335 /*
336  * utilities
337  */
338 int Chain::GetJointNameList(char**& jnames)
339 {
340  jnames = NULL;
341  if(in_create_chain)
342  {
343  cerr << "Chain::GetJointNameList - error: cannot be called between BeginCreateChain() and EndCreateChain()" << endl;
344  return -1;
345  }
346  if(n_joint > 0)
347  {
348  jnames = new char* [n_joint];
349  root->get_joint_name_list(jnames);
350  }
351  return n_joint;
352 }
353 
354 void Joint::get_joint_name_list(char** jnames)
355 {
356  if(i_joint >= 0)
357  {
358  jnames[i_joint] = new char [strlen(name) + 1];
359  strcpy(jnames[i_joint], name);
360  }
361  child->get_joint_name_list(jnames);
362  brother->get_joint_name_list(jnames);
363 }
364 
366 {
367  joints = NULL;
368  if(in_create_chain)
369  {
370  cerr << "Chain::GetJointList - error: cannot be called between BeginCreateChain() and EndCreateChain()" << endl;
371  return -1;
372  }
373  if(n_joint > 0)
374  {
375  joints = new Joint* [n_joint];
376  root->get_joint_list(joints);
377  }
378  return n_joint;
379 }
380 
382 {
383  if(i_joint >= 0 && !real)
384  {
385  joints[i_joint] = this;
386  }
387  child->get_joint_list(joints);
388  brother->get_joint_list(joints);
389 }
390 
391 Joint* Chain::FindJoint(const char* n, const char* charname)
392 {
393  return root->find_joint(n, charname);
394 }
395 
396 Joint* Joint::find_joint(const char* n, const char* charname)
397 {
398  if(charname)
399  {
400  char* mych = CharName();
401  if(mych
402  && !strcmp(basename, n)
403  && !strcmp(mych, charname)) return this;
404  }
405  else
406  {
407  if(!strcmp(name, n)) return this;
408  }
409  Joint* ret;
410  if((ret = child->find_joint(n, charname))) return ret;
411  if((ret = brother->find_joint(n, charname))) return ret;
412  return NULL;
413 }
414 
416 {
417  return root->find_joint(_id);
418 }
419 
421 {
422  if(i_joint == _id) return this;
423  Joint* ret;
424  if((ret = child->find_joint(_id))) return ret;
425  if((ret = brother->find_joint(_id))) return ret;
426  return NULL;
427 }
428 
429 Joint* Chain::FindCharacterRoot(const char* charname)
430 {
431  if(!root) return 0;
432  Joint* j;
433  for(j=root->child; j; j=j->brother)
434  {
435  char* ch = j->CharName();
436  if(ch && !strcmp(ch, charname)) return j;
437  }
438  return 0;
439 }
440 
442 {
443  return child->descendant_dof();
444 }
445 
447 {
448  int ret1 = brother->descendant_dof();
449  int ret2 = child->descendant_dof();
450  return (ret1 + ret2 + n_dof);
451 }
452 
454 {
455  return (1+child->descendant_num_joints());
456 }
457 
459 {
460  int ret1 = brother->descendant_num_joints();
461  int ret2 = child->descendant_num_joints();
462  return (ret1 + ret2 + 1);
463 }
464 
466 {
467  return is_descendant(child, target);
468 }
469 
470 int Joint::is_descendant(Joint* cur, Joint* target)
471 {
472  if(!cur) return false;
473  if(cur == target) return true;
474  if(is_descendant(cur->brother, target)) return true;
475  if(is_descendant(cur->child, target)) return true;
476  return false;
477 }
478 
480 {
481  Joint* p;
482  for(p=this; p; p=p->parent)
483  {
484  if(p == target) return true;
485  }
486  return false;
487 }
Joint::t_given
int t_given
torque or motion controlled
Definition: chain.h:709
Chain::in_create_chain
int in_create_chain
true if between BeginCreateChain() and EndCreateChain().
Definition: chain.h:473
Joint::cur_scale
double cur_scale
Definition: chain.h:843
fMat33::zero
void zero()
Definition: fMatrix3.cpp:236
Chain::FindCharacterRoot
Joint * FindCharacterRoot(const char *charname)
Find the root joint of the character with name charname.
Definition: chain.cpp:429
Joint::parent
Joint * parent
pointer to the parent joint
Definition: chain.h:683
Joint::inertia
fMat33 inertia
intertia
Definition: chain.h:705
charname_separator
static char charname_separator
Definition: dims_common.h:19
Joint::ext_moment
fVec3 ext_moment
external moment around the local frame
Definition: chain.h:737
Joint::abs_pos
fVec3 abs_pos
absolute position
Definition: chain.h:741
CharName
char * CharName(const char *_name)
Extracts the character name from a joint name.
Definition: chain.cpp:17
Joint::SetJointData
void SetJointData(JointData *jdata, const char *charname)
Definition: chain.cpp:301
fMat33::set
void set(const fMat33 &mat)
Copies a matrix.
Definition: fMatrix3.cpp:623
Chain::root
Joint * root
Chain information.
Definition: chain.h:466
Joint::joint_f
fVec3 joint_f
Definition: chain.h:755
fVec3
3-element vector class.
Definition: fMatrix3.h:206
Joint::find_joint
Joint * find_joint(const char *n, const char *charname)
Definition: chain.cpp:396
Joint::p_lin_acc
fVec3 p_lin_acc
Definition: chain.h:764
Joint::p_ang_vel
fVec3 p_ang_vel
Definition: chain.h:763
Joint::rel_lin_acc
fVec3 rel_lin_acc
Definition: chain.h:730
fVec
Vector of generic size.
Definition: fMatrix.h:491
Joint
The class for representing a joint.
Definition: chain.h:538
Chain::init_value
double * init_value
Definition: chain.h:462
Joint::SetFreeJointType
void SetFreeJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to free.
Definition: joint.cpp:80
Chain::GetJointVel
int GetJointVel(fVec &vels)
Definition: joint.cpp:172
Joint::p_ang_acc
fVec3 p_ang_acc
Definition: chain.h:765
Joint::descendant_dof
int descendant_dof()
Definition: chain.cpp:446
Joint::DescendantNumJoints
int DescendantNumJoints()
Total number of joints of the descendants (end link side).
Definition: chain.cpp:453
Joint::basename
char * basename
joint base name (without the character name)
Definition: chain.h:692
JointData::name
char * name
joint name
Definition: chain.h:128
Joint::axis
fVec3 axis
joint axis in local frame (for 1DOF joints)
Definition: chain.h:696
Chain::SetStatus
int SetStatus(const fVec &value, const fVec &vel, const fVec &acc)
Set current joint values, velocities, and accelerations.
Definition: chain.cpp:35
Chain::clear_scale_object_list
void clear_scale_object_list()
Chain::SetJointAcc
int SetJointAcc(const fVec &accs)
Definition: joint.cpp:497
Joint::i_thrust
int i_thrust
index in all motion controlled joints
Definition: chain.h:721
AxisIndex
AxisIndex
Direction of a 1-DOF joint.
Definition: chain.h:48
autoplay.n
n
Definition: autoplay.py:12
Joint::j_type
JointType j_type
joint type
Definition: chain.h:694
Joint::n_root_dof
int n_root_dof
total DOF in the root side
Definition: chain.h:717
Joint::qd
double qd
joint velocity (for 1DOF joints)
Definition: chain.h:725
Chain::SetJointValue
int SetJointValue(const fVec &values)
Set all joint values.
Definition: joint.cpp:415
Joint::rel_pos
fVec3 rel_pos
(initial) position in parent joint's frame (for 0/3/6 DOF joints)
Definition: chain.h:700
JUNKNOWN
@ JUNKNOWN
Definition: chain.h:39
Chain::SaveStatus
int SaveStatus(fVec &value, fVec &vel, fVec &acc)
Save current joint values, velocities, and accelerations.
Definition: chain.cpp:24
Joint::n_thrust
int n_thrust
DOF for motion controlled joints.
Definition: chain.h:716
Chain::~Chain
virtual ~Chain()
Definition: chain.cpp:65
Joint::~Joint
~Joint()
Definition: chain.cpp:292
JFIXED
@ JFIXED
fixed (0DOF)
Definition: chain.h:40
Joint::child
Joint * child
pointer to the child joint
Definition: chain.h:685
Chain::n_joint
int n_joint
Definition: chain.h:469
Joint::SetSlideJointType
void SetSlideJointType(const fVec3 &rpos, const fMat33 &ratt, AxisIndex ai)
Set joint type to prismatic.
Definition: joint.cpp:43
JointData
Temporary storage for basic joint information.
Definition: chain.h:61
Joint::init_pos
fVec3 init_pos
origin of the joint value (for prismatic joints)
Definition: chain.h:697
Joint::get_joint_name_list
void get_joint_name_list(char **jnames)
Definition: chain.cpp:354
Joint::ext_force
fVec3 ext_force
external force
Definition: chain.h:736
Chain::n_thrust
int n_thrust
total DOF of the joints with t_given = false
Definition: chain.h:470
JROTATE
@ JROTATE
rotational (1DOF)
Definition: chain.h:41
JSPHERE
@ JSPHERE
spherical (3DOF)
Definition: chain.h:43
Joint::n_dof
int n_dof
degrees of freedom (0/1/3/6)
Definition: chain.h:715
fMat33
3x3 matrix class.
Definition: fMatrix3.h:29
Joint::rel_ang_vel
fVec3 rel_ang_vel
Definition: chain.h:729
Joint::isAscendant
int isAscendant(Joint *target)
Identifies whether the target joint is a direct ascendant.
Definition: chain.cpp:479
Joint::chain
Chain * chain
Definition: chain.h:769
JointData::t_given
int t_given
if true, the joint is torque controlled, otherwise position controlled (high-gain control)
Definition: chain.h:137
Chain::j_value_dot
double * j_value_dot[4]
for 4-th order Runge-Kutta
Definition: chain.h:460
Chain::GetJointAcc
int GetJointAcc(fVec &accs)
Definition: joint.cpp:214
fVec3::set
void set(double *v)
Set element values from array or three values.
Definition: fMatrix3.h:314
value
png_voidp int value
Definition: png.h:2110
Chain::SetJointVel
int SetJointVel(const fVec &vels)
Set all joint velocities/accelerations.
Definition: joint.cpp:456
Joint::isDescendant
int isDescendant(Joint *target)
Identifies whether the target joint is a direct descendant.
Definition: chain.cpp:465
Joint::loc_com_vel
fVec3 loc_com_vel
com velocity in local frame
Definition: chain.h:745
Joint::loc_com
fVec3 loc_com
center of mass in local frame
Definition: chain.h:706
Chain::init_vel
double * init_vel
Definition: chain.h:463
Joint::SetRotateJointType
void SetRotateJointType(const fVec3 &rpos, const fMat33 &ratt, AxisIndex ai)
Set joint type to rotational.
Definition: joint.cpp:30
Joint::SetFixedJointType
void SetFixedJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to fixed.
Definition: joint.cpp:56
Joint::Joint
Joint()
Definition: chain.cpp:121
fVec4::zero
void zero()
Definition: fMatrix4.cpp:270
Joint::qdd
double qdd
joint acceleration (for 1DOF joints)
Definition: chain.h:726
Joint::q
double q
joint value (for 1DOF joints)
Definition: chain.h:724
Joint::rel_att
fMat33 rel_att
(initial) orientation in parent joint's frame (for 0/3/6 DOF joints)
Definition: chain.h:701
Chain::n_dof
int n_dof
Definition: chain.h:468
Chain::all_vel_dot
double ** all_vel_dot
Definition: chain.h:458
Joint::CharName
char * CharName() const
Returns the character name.
Definition: chain.h:648
Chain::all_vel
double ** all_vel
Definition: chain.h:457
Joint::DescendantDOF
int DescendantDOF()
Total DOF of the descendants (end link side).
Definition: chain.cpp:441
JointData::rel_pos
fVec3 rel_pos
initial position in parent joint's frame
Definition: chain.h:131
JointData::j_type
JointType j_type
joint type
Definition: chain.h:130
Joint::rel_ang_acc
fVec3 rel_ang_acc
Definition: chain.h:731
Chain::GetJointValue
int GetJointValue(fVec &values)
Obtain the joint values/velocities/accelerations.
Definition: joint.cpp:124
Joint::tau
double tau
joint force/torque (for 1DOF joints)
Definition: chain.h:733
chain.h
Classes for defining open/closed kinematic chains.
Joint::gear_ratio
double gear_ratio
Definition: chain.h:707
JointData::axis_index
AxisIndex axis_index
direction of the joint axis (only for 1DOF joints)
Definition: chain.h:133
JointType
JointType
Enums for joint types.
Definition: chain.h:38
Chain::n_value
int n_value
Definition: chain.h:467
JointData::com
fVec3 com
link center of mass in local frame
Definition: chain.h:136
JointData::mass
double mass
link mass
Definition: chain.h:134
Chain::all_value
double ** all_value
Pointers to the integration variables.
Definition: chain.h:455
Chain::j_acc_p
double * j_acc_p[4]
Definition: chain.h:461
Joint::descendant_num_joints
int descendant_num_joints()
Definition: chain.cpp:458
Joint::p_lin_vel
fVec3 p_lin_vel
Definition: chain.h:761
Joint::abs_att
fMat33 abs_att
absolute orientation
Definition: chain.h:742
JSLIDE
@ JSLIDE
prismatic (1DOF)
Definition: chain.h:42
Joint::get_joint_list
void get_joint_list(Joint **joints)
Definition: chain.cpp:381
Joint::i_dof
int i_dof
index in all DOF
Definition: chain.h:720
Chain::GetJointList
int GetJointList(Joint **&joints)
Obtain a list of pointers to all joints.
Definition: chain.cpp:365
Joint::i_joint
int i_joint
index of the joint
Definition: chain.h:722
Joint::real
Joint * real
pointer to the real (connected) joint; for closed chains.
Definition: chain.h:687
Chain::do_connect
int do_connect
true after Connect() was called; application (or subclass) must reset the flag
Definition: chain.h:476
fVec::resize
void resize(int i)
Change the size.
Definition: fMatrix.h:511
Chain::all_value_dot
double ** all_value_dot
Definition: chain.h:456
Chain::FindJoint
Joint * FindJoint(const char *jname, const char *charname=0)
Find a joint from name.
Definition: chain.cpp:391
Joint::SetSphereJointType
void SetSphereJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to spherical.
Definition: joint.cpp:68
Joint::init_att
fMat33 init_att
origin of the joint value (for rotational joints)
Definition: chain.h:698
JointData::rel_att
fMat33 rel_att
initial orientation in parent joint's frame
Definition: chain.h:132
Joint::i_value
int i_value
index in all joint values
Definition: chain.h:719
Joint::loc_ang_acc
fVec3 loc_ang_acc
angular acceleration in local frame
Definition: chain.h:747
Joint::loc_lin_vel
fVec3 loc_lin_vel
linear velocity in local frame
Definition: chain.h:743
JFREE
@ JFREE
free (6DOF)
Definition: chain.h:44
Joint::clear
void clear()
Definition: chain.cpp:226
Joint::p_ep_dot
fEulerPara p_ep_dot
Definition: chain.h:762
Joint::name
char * name
joint name (including the character name)
Definition: chain.h:691
Joint::ratt_real
fMat33 ratt_real
relative orientation in the real joint frame
Definition: chain.h:689
fMat33::identity
void identity()
Identity matrix.
Definition: fMatrix3.cpp:230
Chain::Chain
Chain()
Definition: chain.cpp:46
Joint::brother
Joint * brother
pointer to the brother joint
Definition: chain.h:684
Joint::rotor_inertia
double rotor_inertia
Definition: chain.h:708
Joint::realname
char * realname
name of the real joint (for closed chains)
Definition: chain.h:693
Joint::mass
double mass
mass
Definition: chain.h:704
Joint::is_descendant
int is_descendant(Joint *cur, Joint *target)
Definition: chain.cpp:470
Joint::loc_com_acc
fVec3 loc_com_acc
com acceleration in local frame
Definition: chain.h:748
Joint::rpos_real
fVec3 rpos_real
relative position in the real joint frame
Definition: chain.h:688
JointData::inertia
fMat33 inertia
link inertia
Definition: chain.h:135
Joint::rel_lin_vel
fVec3 rel_lin_vel
Definition: chain.h:728
Joint::loc_ang_vel
fVec3 loc_ang_vel
angular velocity in local frame
Definition: chain.h:744
fVec3::zero
void zero()
Creates a zero vector.
Definition: fMatrix3.h:283
Chain::GetJointNameList
int GetJointNameList(char **&jnames)
Obtain a list of joint names.
Definition: chain.cpp:338
Joint::loc_lin_acc
fVec3 loc_lin_acc
linear acceleration in local frame
Definition: chain.h:746
Joint::joint_n
fVec3 joint_n
Definition: chain.h:756
Chain::Clear
virtual void Clear()
Remove all joints and clear all parameters.
Definition: chain.cpp:87


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:02