DART 6.10.1
Loading...
Searching...
No Matches
VskParser.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_VSKPARSER_HPP_
34#define DART_UTILS_VSKPARSER_HPP_
35
37#include "dart/common/Uri.hpp"
40
41namespace dart {
42namespace utils {
43
44namespace VskParser {
49struct Options
50{
53
58 Eigen::Vector3d defaultEllipsoidSize;
59
64
66 double density;
67
70
73
76
79
82
84 Options(
86 const Eigen::Vector3d& defaultEllipsoidSize
87 = Eigen::Vector3d::Constant(0.05),
88 double thicknessRatio = 0.35,
89 double density = 1e+3,
92 double jointDampingCoefficient = 0.1,
93 double jointFriction = 0.0,
94 bool removeEndBodyNodes = false);
95};
96
99 const common::Uri& fileUri, Options options = Options());
100
101} // namespace VskParser
102
103} // namespace utils
104} // namespace dart
105
106#endif // #ifndef DART_UTILS_VSKPARSER_HPP_
VskParser::Options options
Definition VskParser.cpp:67
std::shared_ptr< ResourceRetriever > ResourceRetrieverPtr
Definition ResourceRetriever.hpp:76
std::shared_ptr< Skeleton > SkeletonPtr
Definition SmartPointer.hpp:60
dynamics::SkeletonPtr readSkeleton(const common::Uri &fileUri, Options options=Options())
Read Skeleton from VSK file.
Definition VskParser.cpp:197
Definition BulletCollisionDetector.cpp:65
The Uri struct provides URI parsing and merging functionality based on RFC 3986.
Definition Uri.hpp:87
static constexpr T pi()
Definition Constants.hpp:45
Options struct is additional information that helps building a skeleton that can be used in kinematic...
Definition VskParser.hpp:50
double density
Density of each ellipsoid that are used to compute mass.
Definition VskParser.hpp:66
bool removeEndBodyNodes
Remove end BodyNodes with no Shape segment.
Definition VskParser.hpp:81
double jointDampingCoefficient
Joint damping coefficient.
Definition VskParser.hpp:75
double jointFriction
Joint Coulomb friction.
Definition VskParser.hpp:78
double jointPositionLowerLimit
Lower limit of joint position.
Definition VskParser.hpp:69
Eigen::Vector3d defaultEllipsoidSize
The default shape for body node is ellipsoid.
Definition VskParser.hpp:58
common::ResourceRetrieverPtr retrieverOrNullptr
Resource retriever. LocalResourceRetriever is used if it's nullptr.
Definition VskParser.hpp:52
double jointPositionUpperLimit
Upper limit of joint position.
Definition VskParser.hpp:72
double thicknessRatio
Ratio of shorter radii of each ellipsoid to the longest radius where the longest radius is the distan...
Definition VskParser.hpp:63