DART 6.10.1
Loading...
Searching...
No Matches
JointAttributes.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2021, The DART development contributors
3 * All rights reserved.
4 *
5 * The list of contributors can be found at:
6 * https://github.com/dartsim/dart/blob/master/LICENSE
7 *
8 * This file is provided under the following "BSD-style" License:
9 * Redistribution and use in source and binary forms, with or
10 * without modification, are permitted provided that the following
11 * conditions are met:
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials provided
17 * with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef DART_UTILS_MJCF_DETAIL_JOINTATTRIBUTES_HPP_
34#define DART_UTILS_MJCF_DETAIL_JOINTATTRIBUTES_HPP_
35
36#include <Eigen/Core>
37#include <tinyxml2.h>
38
42
43namespace dart {
44namespace utils {
45namespace MjcfParser {
46namespace detail {
47
48struct JointAttributes final
49{
51
53
54 int mGroup{0};
55
59 Eigen::Vector3d mPos{Eigen::Vector3d::Zero()};
60
64 Eigen::Vector3d mAxis{Eigen::Vector3d::UnitZ()};
65
66 Eigen::Vector2d mSpringDamper{Eigen::Vector2d::Zero()};
67
69 bool mLimited{false};
70
71 double mStiffness{0};
72
74 Eigen::Vector2d mRange{Eigen::Vector2d::Zero()};
75
76 double mMargin{0};
77
78 double mRef{0};
79
80 double mSpringRef{0};
81
82 double mArmature{0};
83
84 double mDamping{0};
85
86 double mFrictionLoss{0};
87
88 Eigen::VectorXd mUser;
89};
90
92 JointAttributes& attributes, tinyxml2::XMLElement* element);
93
94} // namespace detail
95} // namespace MjcfParser
96} // namespace utils
97} // namespace dart
98
99#endif // #ifndef DART_UTILS_MJCF_DETAIL_JOINTATTRIBUTES_HPP_
boost::optional< T > optional
Definition Optional.hpp:50
Errors appendJointAttributes(JointAttributes &attributes, tinyxml2::XMLElement *element)
Definition JointAttributes.cpp:44
JointType
Definition Types.hpp:132
std::vector< Error > Errors
Definition Error.hpp:85
Definition BulletCollisionDetector.cpp:65
Definition JointAttributes.hpp:49
double mArmature
Definition JointAttributes.hpp:82
double mRef
Definition JointAttributes.hpp:78
double mStiffness
Definition JointAttributes.hpp:71
Eigen::Vector3d mAxis
This attribute specifies the axis of rotation for hinge joints and the direction of translation for s...
Definition JointAttributes.hpp:64
Eigen::Vector2d mRange
The joint limits.
Definition JointAttributes.hpp:74
int mGroup
Definition JointAttributes.hpp:54
Eigen::Vector2d mSpringDamper
Definition JointAttributes.hpp:66
double mFrictionLoss
Definition JointAttributes.hpp:86
double mMargin
Definition JointAttributes.hpp:76
double mSpringRef
Definition JointAttributes.hpp:80
bool mLimited
This attribute specifies if the joint has limits.
Definition JointAttributes.hpp:69
JointType mType
Definition JointAttributes.hpp:52
Eigen::VectorXd mUser
Definition JointAttributes.hpp:88
common::optional< std::string > mName
Definition JointAttributes.hpp:50
double mDamping
Definition JointAttributes.hpp:84
Eigen::Vector3d mPos
Position of the joint, specified in local or global coordinates as determined by the coordinate attri...
Definition JointAttributes.hpp:59