claraty::ME_Joint Class Reference
#include <me_joint.h>
Collaboration diagram for claraty::ME_Joint:

Public Member Functions | |
ME_Joint model setting | |
| void | set_name (std::string name) |
| std::string | get_name () |
| void | set_body (ME_Body *me_body) |
| ME_Body * | get_body () |
| void | set_type (std::string type) |
| void | set_type (short type) |
| std::string | get_type () |
| void | set_actuated (bool actuated) |
| bool | is_actuated () |
| bool | has_limits () |
| void | set_offset (double offset) |
| double & | get_offset () |
| void | set_home (double home) |
| double & | get_home () |
| void | set_value (double value, int dof_index=0) |
| double | get_value (int dof_index=0) |
| void | set_limits (double joint_min, double joint_max, double joint_vmax, double joint_tmin, double joint_tmax) |
| void | get_limits (double &joint_min, double &joint_max, double &joint_vmax, double &joint_tmin, double &joint_tmax) |
| void | set_stiffness (double kx, double ky, double kz) |
| void | get_stiffness (double &kx, double &ky, double &kz) |
| void | set_constraint_expression (std::string expr) |
| std::vector< double > & | get_values_vector () |
| std::string | get_constraint_expression () |
| bool | is_constrained () |
| int | get_number_dofs () |
| void | rotate_joint_axes (const Quaternion< double > &rotation) |
| void | rotate_joint_axes (const RMatrix< double > &rotation) |
| void | set_joint_axes (Vector< double > joint_axis) |
| void | get_joint_axes (Vector< double > &joint_axis) |
| Vector< double > & | get_joint_axis () |
ME_Joint joint algorithms | |
| Transform | get_transform () |
Private Types | |
| enum | JOINT_TYPE { UNDEFINED = -1, PIN = 1, SLIDER = 2, FULL6DOF = 3, STATIC = 10 } |
Private Member Functions | |
ME_Joint model querying | |
| int | _resolve_type (std::string joint_type_str) |
| std::string | _unresolve_type (int joint_type) |
Private Attributes | |
| unsigned int | _index |
| bool | _limited |
| bool | _actuated |
| short | _type |
| double | _offset |
| double | _home |
| unsigned int | _number_of_dofs |
| Frame * | _parent_frame |
| std::vector< double > | _values |
| bool | _constrained |
| std::string | _name |
| Joint_Limits | _limits |
| Joint_Stiffness * | _stiffness |
| Joint_Constraint * | _constraint |
| ME_Body * | _me_body |
| Vector< double > | _joint_axis |
Friends | |
| std::ostream & | operator<< (std::ostream &os, ME_Joint &me_joint) |
Detailed Description
Definition at line 164 of file me_joint.h.
Member Enumeration Documentation
enum claraty::ME_Joint::JOINT_TYPE [private] |
Enumeration to indicate joint type.
Definition at line 169 of file me_joint.h.
00169 { // All other types can be modeled using types below 00170 UNDEFINED = -1, 00171 PIN = 1, // Models a 1-dof revolute joint 00172 SLIDER = 2, // Models a 1-dof prismatic joint 00173 FULL6DOF = 3, // Models a vehicle body relative to a 00174 // base reference frame 00175 STATIC = 10 // Models a rigid joint 00176 };
Constructor & Destructor Documentation
| claraty::ME_Joint::ME_Joint | ( | ) |
Default Constructor for a ME_Joint object.
Definition at line 182 of file me_joint.cc.
References _joint_axis, _number_of_dofs, _values, and claraty::Vector< T >::resize().
00183 : _limited(false), 00184 _number_of_dofs(1), 00185 _parent_frame(0), 00186 _constrained(false), 00187 _stiffness(0), 00188 _constraint(0) 00189 { 00190 _values.resize(_number_of_dofs); 00191 _joint_axis.resize(3); 00192 _joint_axis(0) = 0.0; 00193 _joint_axis(1) = 0.0; 00194 _joint_axis(2) = 1.0; 00195 }
Here is the call graph for this function:

| claraty::ME_Joint::ME_Joint | ( | ME_Joint & | me_joint | ) |
Copy Constructor for a ME_Joint object.
- Parameters:
-
[in] me_joint The joint to be copied.
Definition at line 205 of file me_joint.cc.
References _constraint, _joint_axis, _limits, _number_of_dofs, _parent_frame, _stiffness, _type, _values, claraty::Vector< T >::resize(), and set_type().
00206 : _index(me_joint._index), 00207 _limited(me_joint._limited), 00208 _offset(me_joint._offset), 00209 _home(me_joint._home), 00210 _number_of_dofs(me_joint._number_of_dofs), 00211 _parent_frame(me_joint._parent_frame), 00212 _constrained(me_joint._constrained), 00213 _name(me_joint._name), 00214 _limits(me_joint._limits) 00215 00216 { 00217 if (me_joint._parent_frame) 00218 _parent_frame = new Frame(*me_joint._parent_frame); 00219 00220 _limits = me_joint._limits; 00221 if (me_joint._stiffness) 00222 { 00223 _stiffness = new Joint_Stiffness(*me_joint._stiffness); 00224 } 00225 if (me_joint._constraint) 00226 { 00227 _constraint = new Joint_Constraint(*me_joint._constraint); 00228 } 00229 00230 set_type(me_joint._type); 00231 _joint_axis.resize(3); 00232 _joint_axis = me_joint._joint_axis; 00233 _values.resize(_number_of_dofs); 00234 }
Here is the call graph for this function:

| virtual claraty::ME_Joint::~ME_Joint | ( | ) | [inline, virtual] |
| claraty::ME_Joint::ME_Joint | ( | ) |
Default Constructor for a ME_Joint object.
Definition at line 182 of file me_joint.cc.
References _joint_axis, _number_of_dofs, _values, and claraty::Vector< T >::resize().
00183 : _limited(false), 00184 _number_of_dofs(1), 00185 _parent_frame(0), 00186 _constrained(false), 00187 _stiffness(0), 00188 _constraint(0) 00189 { 00190 _values.resize(_number_of_dofs); 00191 _joint_axis.resize(3); 00192 _joint_axis(0) = 0.0; 00193 _joint_axis(1) = 0.0; 00194 _joint_axis(2) = 1.0; 00195 }
Here is the call graph for this function:

| claraty::ME_Joint::ME_Joint | ( | ME_Joint & | me_joint | ) |
Copy Constructor for a ME_Joint object.
- Parameters:
-
[in] me_joint The joint to be copied.
Definition at line 205 of file me_joint.cc.
References _constraint, _joint_axis, _limits, _number_of_dofs, _parent_frame, _stiffness, _type, _values, claraty::Vector< T >::resize(), and set_type().
00206 : _index(me_joint._index), 00207 _limited(me_joint._limited), 00208 _offset(me_joint._offset), 00209 _home(me_joint._home), 00210 _number_of_dofs(me_joint._number_of_dofs), 00211 _parent_frame(me_joint._parent_frame), 00212 _constrained(me_joint._constrained), 00213 _name(me_joint._name), 00214 _limits(me_joint._limits) 00215 00216 { 00217 if (me_joint._parent_frame) 00218 _parent_frame = new Frame(*me_joint._parent_frame); 00219 00220 _limits = me_joint._limits; 00221 if (me_joint._stiffness) 00222 { 00223 _stiffness = new Joint_Stiffness(*me_joint._stiffness); 00224 } 00225 if (me_joint._constraint) 00226 { 00227 _constraint = new Joint_Constraint(*me_joint._constraint); 00228 } 00229 00230 set_type(me_joint._type); 00231 _joint_axis.resize(3); 00232 _joint_axis = me_joint._joint_axis; 00233 _values.resize(_number_of_dofs); 00234 }
Here is the call graph for this function:

| virtual claraty::ME_Joint::~ME_Joint | ( | ) | [inline, virtual] |
Member Function Documentation
| int claraty::ME_Joint::_resolve_type | ( | std::string | joint_type | ) | [private] |
Take the string for a joint type and returns the integer which represents this joint type.
- Parameters:
-
[in] joint_type
- Returns:
- The integer representing the joint type.
Definition at line 620 of file me_joint.cc.
References FULL6DOF, PIN, SLIDER, STATIC, and UNDEFINED.
Referenced by set_type().
00621 { 00622 if (strcmp(joint_type.c_str(), "revolute") == 0) 00623 return PIN; 00624 00625 if (strcmp(joint_type.c_str(), "prismatic") == 0) 00626 return SLIDER; 00627 00628 if (strcmp(joint_type.c_str(), "full6dof") == 0) 00629 return FULL6DOF; 00630 00631 if (strcmp(joint_type.c_str(), "fixed_mount") == 0) 00632 return STATIC; 00633 00634 return UNDEFINED; 00635 }
| std::string claraty::ME_Joint::_unresolve_type | ( | int | joint_type | ) | [private] |
Get joint type as a string, revolute, prismatic, full6dof, or fixed_mount.
- Parameters:
-
[in] joint_type
- Returns:
- String representing the joint type.
Definition at line 594 of file me_joint.cc.
References FULL6DOF, PIN, SLIDER, and STATIC.
Referenced by get_type().
00595 { 00596 if (joint_type == PIN) 00597 return std::string("revolute"); 00598 00599 if (joint_type == SLIDER) 00600 return std::string("prismatic"); 00601 00602 if (joint_type == FULL6DOF) 00603 return std::string("full6dof"); 00604 00605 if (joint_type == STATIC) 00606 return std::string("fixed_mount"); 00607 00608 return std::string(""); 00609 }
| void claraty::ME_Joint::set_name | ( | std::string | name | ) |
Set name.
- Parameters:
-
[in] name
Definition at line 270 of file me_joint.cc.
References _name.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree().
00271 { 00272 _name = name; 00273 }
| std::string claraty::ME_Joint::get_name | ( | ) |
Return the joint name
- Returns:
- joint name string
Definition at line 258 of file me_joint.cc.
References _name.
Referenced by claraty::operator<<().
00259 { 00260 return _name; 00261 }
| void claraty::ME_Joint::set_body | ( | ME_Body * | me_body | ) | [inline] |
Definition at line 195 of file me_joint.h.
References _me_body.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree(), claraty::ME_Body::ME_Body(), and claraty::ME_Body::set_joint().
00195 {_me_body = me_body;};
| ME_Body* claraty::ME_Joint::get_body | ( | ) | [inline] |
| void claraty::ME_Joint::set_type | ( | std::string | type | ) |
Set joint type.
- Parameters:
-
[in] type
Definition at line 415 of file me_joint.cc.
References _number_of_dofs, _resolve_type(), _type, _values, FULL6DOF, PIN, SLIDER, and STATIC.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree(), and ME_Joint().
00416 { 00417 _type = _resolve_type(type); 00418 switch(_type) 00419 { 00420 case PIN: 00421 _number_of_dofs = 1; 00422 break; 00423 case SLIDER: 00424 _number_of_dofs = 1; 00425 break; 00426 case FULL6DOF: 00427 _number_of_dofs = 6; 00428 break; 00429 case STATIC: 00430 _number_of_dofs = 0; 00431 break; 00432 default: 00433 break; 00434 } 00435 _values.resize(_number_of_dofs); 00436 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_type | ( | short | type | ) |
Set joint type.
- Parameters:
-
[in] type
Definition at line 385 of file me_joint.cc.
References _number_of_dofs, _type, _values, FULL6DOF, PIN, SLIDER, and STATIC.
00386 { 00387 _type = type; 00388 switch(_type) 00389 { 00390 case PIN: 00391 _number_of_dofs = 1; 00392 break; 00393 case SLIDER: 00394 _number_of_dofs = 1; 00395 break; 00396 case FULL6DOF: 00397 _number_of_dofs = 6; 00398 break; 00399 case STATIC: 00400 _number_of_dofs = 0; 00401 break; 00402 default: 00403 break; 00404 } 00405 _values.resize(_number_of_dofs); 00406 }
| std::string claraty::ME_Joint::get_type | ( | ) |
Get type.
- Returns:
- Type.
Definition at line 283 of file me_joint.cc.
References _type, and _unresolve_type().
Referenced by claraty::operator<<().
00284 { 00285 return _unresolve_type(_type); 00286 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_actuated | ( | bool | actuated | ) |
Set joint actuated value.
- Parameters:
-
[in] actuated
Definition at line 459 of file me_joint.cc.
References _actuated.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree().
00460 { 00461 _actuated = actuated; 00462 }
| bool claraty::ME_Joint::is_actuated | ( | ) |
Interogate if joing is actuated.
- Returns:
- Ture if actuated, false otherwise.
Definition at line 446 of file me_joint.cc.
References _actuated.
Referenced by claraty::operator<<().
00447 { 00448 return _actuated; 00449 }
| bool claraty::ME_Joint::has_limits | ( | ) | [inline] |
| void claraty::ME_Joint::set_offset | ( | double | offset | ) |
Set joint offset
- Parameters:
-
[in] offset
Definition at line 553 of file me_joint.cc.
References _offset.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree().
00554 { 00555 _offset = offset; 00556 }
| double & claraty::ME_Joint::get_offset | ( | ) |
Get joint offset
- Returns:
- Joint offset.
Definition at line 472 of file me_joint.cc.
References _offset.
Referenced by claraty::operator<<().
00473 { 00474 return _offset; 00475 }
| void claraty::ME_Joint::set_home | ( | double | home | ) |
Set joint home.
- Parameters:
-
[in] home
Definition at line 579 of file me_joint.cc.
References _home.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree().
00580 { 00581 _home = home; 00582 }
| double & claraty::ME_Joint::get_home | ( | ) |
Get joint home.
- Returns:
- Home.
Definition at line 566 of file me_joint.cc.
References _home.
Referenced by claraty::operator<<().
00567 { 00568 return _home; 00569 }
| void claraty::ME_Joint::set_value | ( | double | value, | |
| int | dof_index = 0 | |||
| ) |
Set joint value.
- Parameters:
-
[in] value [in] dof_index
Definition at line 511 of file me_joint.cc.
References _number_of_dofs, and _values.
Referenced by claraty::Mechanism_Model::set_joint_value().
00512 { 00513 if (_number_of_dofs != 0) 00514 _values[dof_index] = value; 00515 }
| double claraty::ME_Joint::get_value | ( | int | dof_index = 0 |
) |
Compute the joint value based on the constraint parameters.
- Parameters:
-
[in] dof_index
- Returns:
- Joint value.
Definition at line 487 of file me_joint.cc.
References _constrained, _constraint, _me_body, _number_of_dofs, _values, claraty::Joint_Constraint::get_dependent_body_name(), claraty::Joint_Constraint::get_dependent_joint_index(), claraty::Joint_Constraint::get_offset(), claraty::Joint_Constraint::get_slope(), and claraty::ME_Body::get_tree_body().
Referenced by claraty::Mechanism_Model::get_joint_value(), and get_values_vector().
00488 { 00489 if (_number_of_dofs == 0) 00490 return 0.0; 00491 if (!_constrained) 00492 return _values[dof_index]; 00493 else // compute the joint joint value based on the constraint parameters 00494 { 00495 return _constraint->get_slope() * 00496 _me_body->get_tree_body( 00497 _constraint->get_dependent_body_name()).get_joint().get_value( 00498 _constraint->get_dependent_joint_index()) 00499 + _constraint->get_offset(); 00500 } 00501 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_limits | ( | double | joint_min, | |
| double | joint_max, | |||
| double | joint_vmax, | |||
| double | joint_tmin, | |||
| double | joint_tmax | |||
| ) |
Set joint limits.
- Parameters:
-
[in] joint_min [in] joint_max [in] joint_vmax [in] joint_tmin [in] joint_tmax
Definition at line 669 of file me_joint.cc.
References _limited, _limits, and claraty::Joint_Limits::set_parameters().
Referenced by claraty::ME_Joint_IO::_joint_limits_attributes().
00672 { 00673 _limits.set_parameters(joint_min, joint_max, joint_vmax, 00674 joint_tmin, joint_tmax); 00675 _limited = true; 00676 }
Here is the call graph for this function:

| void claraty::ME_Joint::get_limits | ( | double & | joint_min, | |
| double & | joint_max, | |||
| double & | joint_vmax, | |||
| double & | joint_tmin, | |||
| double & | joint_tmax | |||
| ) |
Get joint limits.
- Parameters:
-
[out] joint_min [out] joint_max [out] joint_vmax [out] joint_tmin [out] joint_tmax
Definition at line 649 of file me_joint.cc.
References _limits, and claraty::Joint_Limits::get_parameters().
Referenced by claraty::operator<<().
00652 { 00653 _limits.get_parameters(joint_min, joint_max, joint_vmax, 00654 joint_tmin, joint_tmax); 00655 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_stiffness | ( | double | kx, | |
| double | ky, | |||
| double | kz | |||
| ) |
Set joint stiffness.
- Parameters:
-
[in] kx [in] ky [in] kz
Definition at line 706 of file me_joint.cc.
References _stiffness, and claraty::Joint_Stiffness::set_parameters().
Referenced by claraty::ME_Joint_IO::_joint_stiffness_attributes().
00707 { 00708 if (!_stiffness) 00709 _stiffness = new Joint_Stiffness(); 00710 _stiffness->set_parameters(kx, ky, kz); 00711 }
Here is the call graph for this function:

| void claraty::ME_Joint::get_stiffness | ( | double & | kx, | |
| double & | ky, | |||
| double & | kz | |||
| ) |
Get joint stiffness.
- Parameters:
-
[out] kx [out] ky [out] kz
Definition at line 688 of file me_joint.cc.
References _stiffness, and claraty::Joint_Stiffness::get_parameters().
Referenced by claraty::operator<<().
00689 { 00690 if(_stiffness) 00691 _stiffness->get_parameters(kx, ky, kz); 00692 else 00693 kx = 0.0; ky = 0.0; kz = 0.0; 00694 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_constraint_expression | ( | std::string | expr | ) |
Set joint contstraint expression.
- Parameters:
-
[in] expr The joint constraint expression.
Definition at line 736 of file me_joint.cc.
References _constrained, _constraint, claraty::Joint_Constraint::evaluate_constraint_expression(), and claraty::Joint_Constraint::set_parameters().
Referenced by claraty::ME_Joint_IO::_joint_constraint_attributes().
00737 { 00738 if (!_constraint) 00739 _constraint = new Joint_Constraint; 00740 _constraint->set_parameters(expr); 00741 if ((expr.length() > 0) &&(_constraint->evaluate_constraint_expression())) 00742 _constrained = true; 00743 else 00744 { 00745 delete _constraint; 00746 _constraint = NULL; 00747 _constrained = false; 00748 } 00749 00750 }
Here is the call graph for this function:

| vector< double > & claraty::ME_Joint::get_values_vector | ( | ) |
Get vector values.
- Returns:
- Vector.
Definition at line 297 of file me_joint.cc.
References _constrained, _values, and get_value().
Referenced by claraty::Mechanism_Model::rebuild_lists().
00298 { 00299 if (_constrained) 00300 { 00301 _values[0] = get_value(0); 00302 } 00303 return _values; 00304 }
Here is the call graph for this function:

| std::string claraty::ME_Joint::get_constraint_expression | ( | ) |
Get joint constraint expression.
- Returns:
- String of the expression for the constraints.
Definition at line 721 of file me_joint.cc.
References _constraint, and claraty::Joint_Constraint::get_parameters().
Referenced by claraty::operator<<().
00722 { 00723 if (_constraint) 00724 return _constraint->get_parameters(); 00725 else 00726 return (""); 00727 }
Here is the call graph for this function:

| bool claraty::ME_Joint::is_constrained | ( | ) | [inline] |
| int claraty::ME_Joint::get_number_dofs | ( | ) |
Get the number of dofs
- Returns:
- number of dofs
Definition at line 245 of file me_joint.cc.
References _number_of_dofs.
00246 { 00247 return _number_of_dofs; 00248 }
| void claraty::ME_Joint::rotate_joint_axes | ( | const Quaternion< double > & | rotation | ) |
Rotate the joint axis by the specified rotation.
- Parameters:
-
[in] rotation Quaternion specifying rotation
Definition at line 357 of file me_joint.cc.
References _joint_axis, claraty::Quaternion< T >::conjugate(), and set_joint_axes().
Referenced by claraty::ME_Body_IO::extract_from_parse_tree(), and rotate_joint_axes().
00358 { 00359 Quaternion<double> rotation_conjugate(rotation); 00360 rotation_conjugate.conjugate(); 00361 00362 set_joint_axes(rotation_conjugate * Point<double>(_joint_axis)); 00363 }
Here is the call graph for this function:

| void claraty::ME_Joint::rotate_joint_axes | ( | const RMatrix< double > & | rotation | ) |
Rotate the joint axis by the specified rotation.
- Parameters:
-
[in] rotation Quaternion specifying rotation
Definition at line 372 of file me_joint.cc.
References rotate_joint_axes().
00373 { 00374 Quaternion<double> q_rotation(rotation); 00375 rotate_joint_axes(q_rotation); 00376 }
Here is the call graph for this function:

| void claraty::ME_Joint::set_joint_axes | ( | Vector< double > | joint_axis | ) |
Set joint axes.
- Parameters:
-
[in] joint_axis Vector of joint axis.
Definition at line 315 of file me_joint.cc.
References _joint_axis.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree(), and rotate_joint_axes().
00316 { 00317 _joint_axis(0) = joint_axis(0); 00318 _joint_axis(1) = joint_axis(1); 00319 _joint_axis(2) = joint_axis(2); 00320 }
| void claraty::ME_Joint::get_joint_axes | ( | Vector< double > & | joint_axis | ) |
Set joint axes.
- Parameters:
-
[in] joint_axis Vector of joint axis.
Definition at line 330 of file me_joint.cc.
References _joint_axis.
Referenced by claraty::ME_Joint_IO::extract_from_parse_tree().
00331 { 00332 joint_axis(0) = _joint_axis(0); 00333 joint_axis(1) = _joint_axis(1); 00334 joint_axis(2) = _joint_axis(2); 00335 }
| Vector< double > & claraty::ME_Joint::get_joint_axis | ( | ) |
Get joint axis.
- Returns:
- Vector.
Definition at line 345 of file me_joint.cc.
References _joint_axis.
Referenced by claraty::Frame_IO::convert_to_internal_format(), and claraty::Wheel_Locomotor_Model::map_mechanism_model_to_wheel_locomotor_model().
00346 { 00347 return _joint_axis; 00348 }
| Transform claraty::ME_Joint::get_transform | ( | ) |
Get joint transform.
- Returns:
- Transform.
Definition at line 524 of file me_joint.cc.
References _type, _values, FULL6DOF, claraty::Trans< T, Rotation_Type >::identity, PIN, claraty::Trans< T, Rotation_Type >::rotate_z(), claraty::RPY, SLIDER, STATIC, and claraty::Trans< T, Rotation_Type >::translate_z().
Referenced by claraty::ME_Body::get_relative_transform().
00525 { 00526 Transform result; 00527 switch(_type) 00528 { 00529 case PIN: 00530 result = result.rotate_z(_values[0]); 00531 break; 00532 case SLIDER: 00533 result = result.translate_z(_values[0]); 00534 break; 00535 case FULL6DOF: 00536 result = Transform(Point<double>(_values[0], _values[1],_values[2]), 00537 RMatrix<double>(RPY,_values[3], _values[4], _values[5])); 00538 break; 00539 case STATIC: 00540 result = Transform::identity; 00541 } 00542 return result; 00543 }
Here is the call graph for this function:

Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | os, | |
| ME_Joint & | me_joint | |||
| ) | [friend] |
Output to ostream
- Parameters:
-
[out] os ostream to put output on. [in] me_joint ME_Joint object to be output.
- Returns:
- ostream with output on it.
Definition at line 761 of file me_joint.cc.
00762 { 00763 std::string spacing = ""; 00764 std::string child_spacing = ""; 00765 spacing.append(XML_Out::get_indentation_space(), ' '); 00766 child_spacing.append(XML_Out::get_indentation_space() 00767 + XML_Out::get_tab_space(), ' '); 00768 os << spacing; 00769 os << "<ME_Joint "; 00770 os << "name = \"" << me_joint.get_name() << "\" "; 00771 00772 os << "type = \"" << me_joint.get_type() << "\" "; 00773 00774 os << "actuated = \"" << (me_joint.is_actuated() ? "true" : "false") 00775 << "\" " ; 00776 00777 os << "offset = \"" << me_joint.get_offset() << "\" "; 00778 00779 os << "home = \"" << me_joint.get_home() << "\" "; 00780 00781 // Vector<double> joint_axis(3); 00782 // me_joint.get_joint_axes(joint_axis); 00783 // os << "x_axis = \"" << joint_axis(0) << "\" "; 00784 // os << "y_axis = \"" << joint_axis(1) << "\" "; 00785 // os << "z_axis = \"" << joint_axis(2) << "\" "; 00786 00787 os << ">" << endl; 00788 00789 00790 double jmin, jmax, vmax, tmin, tmax; 00791 me_joint.get_limits(jmin, jmax, vmax, tmin, tmax); 00792 os << child_spacing; 00793 os << "<Joint_Limits "; 00794 os << "min = \"" << jmin << "\" "; 00795 os << "max = \"" << jmax << "\" "; 00796 os << "vmax = \"" << vmax << "\" "; 00797 os << "torque_min = \"" << tmin << "\" "; 00798 os << "torque_max = \"" << tmax << "\" "; 00799 os << "/>" << endl; 00800 00801 double kx, ky, kz; 00802 me_joint.get_stiffness(kx, ky, kz); 00803 os << child_spacing; 00804 os << "<Joint_Stiffness "; 00805 os << "kx = \"" << kx << "\" "; 00806 os << "ky = \"" << ky << "\" "; 00807 os << "kz = \"" << kz << "\" "; 00808 os << "/>" << endl; 00809 00810 os << child_spacing; 00811 os << "<Joint_Constraint "; 00812 os << "expr = \"" << me_joint.get_constraint_expression() << "\" "; 00813 os << "/>" << endl; 00814 00815 os << spacing; 00816 os << "</ME_Joint> \n"; 00817 00818 return os; 00819 }
Member Data Documentation
unsigned int claraty::ME_Joint::_index [private] |
Index in Mechanism_Model.
Definition at line 236 of file me_joint.h.
bool claraty::ME_Joint::_limited [private] |
To indicate if joint has limits in range of motion
Definition at line 237 of file me_joint.h.
Referenced by has_limits(), and set_limits().
bool claraty::ME_Joint::_actuated [private] |
True if actuated, false if passive
Definition at line 239 of file me_joint.h.
Referenced by is_actuated(), and set_actuated().
short claraty::ME_Joint::_type [private] |
Joint type. Only PIN or SLIDER are allowed for DH and Homogenous transform input format types
Definition at line 241 of file me_joint.h.
Referenced by get_transform(), get_type(), ME_Joint(), and set_type().
double claraty::ME_Joint::_offset [private] |
Joint offset
Definition at line 244 of file me_joint.h.
Referenced by get_offset(), and set_offset().
double claraty::ME_Joint::_home [private] |
Joint home position
Definition at line 245 of file me_joint.h.
Referenced by get_home(), and set_home().
unsigned int claraty::ME_Joint::_number_of_dofs [private] |
Number of joint degrees of freedom.
Definition at line 246 of file me_joint.h.
Referenced by get_number_dofs(), get_value(), ME_Joint(), set_type(), and set_value().
Frame* claraty::ME_Joint::_parent_frame [private] |
Frame on the parent body associated with this joint.
Definition at line 247 of file me_joint.h.
Referenced by ME_Joint().
std::vector<double> claraty::ME_Joint::_values [private] |
Definition at line 249 of file me_joint.h.
Referenced by get_transform(), get_value(), get_values_vector(), ME_Joint(), set_type(), and set_value().
bool claraty::ME_Joint::_constrained [private] |
Definition at line 250 of file me_joint.h.
Referenced by get_value(), get_values_vector(), is_constrained(), and set_constraint_expression().
std::string claraty::ME_Joint::_name [private] |
Joint_Limits claraty::ME_Joint::_limits [private] |
Joint limits parameters
Definition at line 253 of file me_joint.h.
Referenced by get_limits(), ME_Joint(), and set_limits().
Joint_Stiffness* claraty::ME_Joint::_stiffness [private] |
Joint stiffness parameters
Definition at line 254 of file me_joint.h.
Referenced by get_stiffness(), ME_Joint(), and set_stiffness().
Joint_Constraint* claraty::ME_Joint::_constraint [private] |
Joint constraint description
Definition at line 255 of file me_joint.h.
Referenced by get_constraint_expression(), get_value(), ME_Joint(), and set_constraint_expression().
ME_Body* claraty::ME_Joint::_me_body [private] |
Body that this joint is on
Definition at line 256 of file me_joint.h.
Referenced by get_body(), get_value(), and set_body().
Vector<double> claraty::ME_Joint::_joint_axis [private] |
Joint axes components
Definition at line 257 of file me_joint.h.
Referenced by get_joint_axes(), get_joint_axis(), ME_Joint(), rotate_joint_axes(), and set_joint_axes().
The documentation for this class was generated from the following files: