Go to the documentation of this file.
141 name =
new char [strlen(_name) + 1];
144 if(charname) *charname =
'\0';
183 name =
new char [strlen(jdata->
name) + strlen(charname) + 2];
190 name =
new char [strlen(jdata->
name) + 1];
306 name =
new char [strlen(jdata->
name) + 1];
343 cerr <<
"Chain::GetJointNameList - error: cannot be called between BeginCreateChain() and EndCreateChain()" << endl;
370 cerr <<
"Chain::GetJointList - error: cannot be called between BeginCreateChain() and EndCreateChain()" << endl;
403 && !strcmp(mych, charname))
return this;
407 if(!strcmp(
name,
n))
return this;
422 if(
i_joint == _id)
return this;
436 if(ch && !strcmp(ch, charname))
return j;
450 return (ret1 + ret2 +
n_dof);
462 return (ret1 + ret2 + 1);
472 if(!cur)
return false;
473 if(cur == target)
return true;
482 for(p=
this; p; p=p->
parent)
484 if(p == target)
return true;
int t_given
torque or motion controlled
int in_create_chain
true if between BeginCreateChain() and EndCreateChain().
Joint * FindCharacterRoot(const char *charname)
Find the root joint of the character with name charname.
Joint * parent
pointer to the parent joint
static char charname_separator
fVec3 ext_moment
external moment around the local frame
fVec3 abs_pos
absolute position
char * CharName(const char *_name)
Extracts the character name from a joint name.
void SetJointData(JointData *jdata, const char *charname)
void set(const fMat33 &mat)
Copies a matrix.
Joint * root
Chain information.
Joint * find_joint(const char *n, const char *charname)
The class for representing a joint.
void SetFreeJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to free.
int GetJointVel(fVec &vels)
int DescendantNumJoints()
Total number of joints of the descendants (end link side).
char * basename
joint base name (without the character name)
fVec3 axis
joint axis in local frame (for 1DOF joints)
int SetStatus(const fVec &value, const fVec &vel, const fVec &acc)
Set current joint values, velocities, and accelerations.
void clear_scale_object_list()
int SetJointAcc(const fVec &accs)
int i_thrust
index in all motion controlled joints
AxisIndex
Direction of a 1-DOF joint.
JointType j_type
joint type
int n_root_dof
total DOF in the root side
double qd
joint velocity (for 1DOF joints)
int SetJointValue(const fVec &values)
Set all joint values.
fVec3 rel_pos
(initial) position in parent joint's frame (for 0/3/6 DOF joints)
int SaveStatus(fVec &value, fVec &vel, fVec &acc)
Save current joint values, velocities, and accelerations.
int n_thrust
DOF for motion controlled joints.
Joint * child
pointer to the child joint
void SetSlideJointType(const fVec3 &rpos, const fMat33 &ratt, AxisIndex ai)
Set joint type to prismatic.
Temporary storage for basic joint information.
fVec3 init_pos
origin of the joint value (for prismatic joints)
void get_joint_name_list(char **jnames)
fVec3 ext_force
external force
int n_thrust
total DOF of the joints with t_given = false
@ JROTATE
rotational (1DOF)
@ JSPHERE
spherical (3DOF)
int n_dof
degrees of freedom (0/1/3/6)
int isAscendant(Joint *target)
Identifies whether the target joint is a direct ascendant.
int t_given
if true, the joint is torque controlled, otherwise position controlled (high-gain control)
double * j_value_dot[4]
for 4-th order Runge-Kutta
int GetJointAcc(fVec &accs)
void set(double *v)
Set element values from array or three values.
int SetJointVel(const fVec &vels)
Set all joint velocities/accelerations.
int isDescendant(Joint *target)
Identifies whether the target joint is a direct descendant.
fVec3 loc_com_vel
com velocity in local frame
fVec3 loc_com
center of mass in local frame
void SetRotateJointType(const fVec3 &rpos, const fMat33 &ratt, AxisIndex ai)
Set joint type to rotational.
void SetFixedJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to fixed.
double qdd
joint acceleration (for 1DOF joints)
double q
joint value (for 1DOF joints)
fMat33 rel_att
(initial) orientation in parent joint's frame (for 0/3/6 DOF joints)
char * CharName() const
Returns the character name.
int DescendantDOF()
Total DOF of the descendants (end link side).
fVec3 rel_pos
initial position in parent joint's frame
JointType j_type
joint type
int GetJointValue(fVec &values)
Obtain the joint values/velocities/accelerations.
double tau
joint force/torque (for 1DOF joints)
Classes for defining open/closed kinematic chains.
AxisIndex axis_index
direction of the joint axis (only for 1DOF joints)
JointType
Enums for joint types.
fVec3 com
link center of mass in local frame
double ** all_value
Pointers to the integration variables.
int descendant_num_joints()
fMat33 abs_att
absolute orientation
void get_joint_list(Joint **joints)
int i_dof
index in all DOF
int GetJointList(Joint **&joints)
Obtain a list of pointers to all joints.
int i_joint
index of the joint
Joint * real
pointer to the real (connected) joint; for closed chains.
int do_connect
true after Connect() was called; application (or subclass) must reset the flag
void resize(int i)
Change the size.
Joint * FindJoint(const char *jname, const char *charname=0)
Find a joint from name.
void SetSphereJointType(const fVec3 &rpos, const fMat33 &ratt)
Set joint type to spherical.
fMat33 init_att
origin of the joint value (for rotational joints)
fMat33 rel_att
initial orientation in parent joint's frame
int i_value
index in all joint values
fVec3 loc_ang_acc
angular acceleration in local frame
fVec3 loc_lin_vel
linear velocity in local frame
char * name
joint name (including the character name)
fMat33 ratt_real
relative orientation in the real joint frame
void identity()
Identity matrix.
Joint * brother
pointer to the brother joint
char * realname
name of the real joint (for closed chains)
int is_descendant(Joint *cur, Joint *target)
fVec3 loc_com_acc
com acceleration in local frame
fVec3 rpos_real
relative position in the real joint frame
fMat33 inertia
link inertia
fVec3 loc_ang_vel
angular velocity in local frame
void zero()
Creates a zero vector.
int GetJointNameList(char **&jnames)
Obtain a list of joint names.
fVec3 loc_lin_acc
linear acceleration in local frame
virtual void Clear()
Remove all joints and clear all parameters.
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