Skip to content

Commit eb597ab

Browse files
committed
Merge remote-tracking branch 'opensim-org/master'
2 parents 51ef274 + 711a6f1 commit eb597ab

File tree

489 files changed

+80462
-7314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

489 files changed

+80462
-7314
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ Fixes issue #<issue_number>
99
### CHANGELOG.md (choose one)
1010

1111
- no need to update because...
12-
- updated...
13-
14-
The Doxygen for this PR can be viewed at http://myosin.sourceforge.net/?C=N;O=D; click the folder whose name is this PR's number.
12+
- updated.

.github/workflows/continuous_integration.yml

Lines changed: 269 additions & 64 deletions
Large diffs are not rendered by default.

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ addons:
8686
# python3 as linux and osx are still on python2
8787
- python3
8888
- python3-pip
89+
- python3-numpy
8990
# To avoid being prompted when ssh'ing into sourceforge.
9091
ssh_known_hosts:
9192
# For uploading doxygen.
@@ -191,7 +192,7 @@ before_install:
191192
# Run superbuild to download, configure, build and install dependencies.
192193
- mkdir $OPENSIM_DEPENDENCIES_BUILD_DIR
193194
- cd $OPENSIM_DEPENDENCIES_BUILD_DIR
194-
- DEP_CMAKE_ARGS=($TRAVIS_BUILD_DIR/dependencies -DCMAKE_INSTALL_PREFIX=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DCMAKE_BUILD_TYPE=$BTYPE -DSUPERBUILD_simbody=OFF)
195+
- DEP_CMAKE_ARGS=($TRAVIS_BUILD_DIR/dependencies -DCMAKE_INSTALL_PREFIX=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DCMAKE_BUILD_TYPE=$BTYPE -DSUPERBUILD_simbody=OFF -DSUPERBUILD_ezc3d=ON)
195196
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then DEP_CMAKE_ARGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_TARGET); fi
196197

197198
- printf '%s\n' "${DEP_CMAKE_ARGS[@]}"
@@ -220,7 +221,7 @@ install:
220221
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then OSIM_CMAKE_ARGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_TARGET); fi
221222

222223
# Dependencies.
223-
- OSIM_CMAKE_ARGS+=(-DSIMBODY_HOME=~/simbody -DOPENSIM_DEPENDENCIES_DIR=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DWITH_BTK:BOOL=ON)
224+
- OSIM_CMAKE_ARGS+=(-DSIMBODY_HOME=~/simbody -DOPENSIM_DEPENDENCIES_DIR=$OPENSIM_DEPENDENCIES_INSTALL_DIR -DOPENSIM_C3D_PARSER=ezc3d)
224225
# Build applications
225226
- OSIM_CMAKE_ARGS+=(-DOPENSIM_BUILD_INDIVIDUAL_APPS=ON)
226227

Applications/Analyze/analyze.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main(int argc,char **argv)
5858
analyze -S SetupFileName -> opensim-cmd run-tool SetupFileName
5959
analyze -PS -> opensim-cmd print-xml analyze
6060
)";
61-
std::cout << deprecationNotice << std::endl;
61+
log_warn(deprecationNotice);
6262

6363
// PARSE COMMAND LINE
6464
int i;
@@ -88,7 +88,8 @@ int main(int argc,char **argv)
8888
Object::setSerializeAllDefaults(true);
8989
tool->print("default_Setup_Analyze.xml");
9090
Object::setSerializeAllDefaults(false);
91-
cout << "Created file default_Setup_Analyze.xml with default setup" << endl;
91+
log_info("Created file default_Setup_Analyze.xml with default "
92+
"setup");
9293
return(0);
9394

9495
// IDENTIFY SETUP FILE
@@ -117,7 +118,7 @@ int main(int argc,char **argv)
117118

118119
// ERROR CHECK
119120
if(setupFileName=="") {
120-
cout<<"\n\nforward.exe: ERROR- A setup file must be specified.\n";
121+
log_error("analyze.exe: A setup file must be specified.", argv[0]);
121122
PrintUsage(argv[0], cout);
122123
return(-1);
123124
}
@@ -127,29 +128,29 @@ int main(int argc,char **argv)
127128
LoadOpenSimLibrary("osimActuators");
128129

129130
// CONSTRUCT
130-
cout<<"Constructing tool from setup file "<<setupFileName<<".\n\n";
131+
log_info("Constructing tool from setup file {}", setupFileName);
131132
AnalyzeTool analyze(setupFileName);
132133

133134
// PRINT MODEL INFORMATION
134135
// Model& model = analyze.getModel();
135-
cout<<"-----------------------------------------------------------------------\n";
136-
cout<<"Loaded library\n";
137-
cout<<"-----------------------------------------------------------------------\n";
138-
cout<<"-----------------------------------------------------------------------\n\n";
136+
log_info("--------------------------------------------------------------");
137+
log_info("Loaded library");
138+
log_info("--------------------------------------------------------------");
139139

140140
// start timing
141141
std::clock_t startTime = std::clock();
142142

143143
// RUN
144144
analyze.run();
145145

146-
std::cout << "Analyze compute time = " << 1.e3*(std::clock()-startTime)/CLOCKS_PER_SEC << "ms\n" << endl;
146+
auto timeInMilliseconds = 1.e3*(std::clock() - startTime) / CLOCKS_PER_SEC;
147+
log_info("Analyze compute time = {} ms", timeInMilliseconds);
147148

148149
//----------------------------
149150
// Catch any thrown exceptions
150151
//----------------------------
151152
} catch(const std::exception& x) {
152-
cout << "Exception in analyze: " << x.what() << endl;
153+
log_error("Exception in analyze: {}", x.what());
153154
return -1;
154155
}
155156
//----------------------------
Lines changed: 30 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,38 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<OpenSimDocument Version="20201">
3-
<ExternalLoads name="">
2+
<OpenSimDocument Version="40000">
3+
<ExternalLoads name="default">
44
<objects>
5-
<PrescribedForce name="RightForce">
5+
<ExternalForce name="RightForce">
66
<!--Name of the body the force is applied to.-->
7-
<body>calcn_r</body>
8-
<!--Flag indicating whether the point (specified in pointFunctions) is in
9-
global frame-->
10-
<pointIsGlobal>false</pointIsGlobal>
11-
<!--Flag indicating whether the quantities (specified in
12-
force/torqueFunctions) is in global frame-->
13-
<forceIsGlobal>true</forceIsGlobal>
14-
<!--Three functions describing the force to be applied.-->
15-
<FunctionSet name="forceFunctions">
16-
<objects>
17-
<NaturalCubicSpline name="ground_force_vx" />
18-
<NaturalCubicSpline name="ground_force_vy" />
19-
<NaturalCubicSpline name="ground_force_vz" />
20-
</objects>
21-
<groups />
22-
</FunctionSet>
23-
<!--Three functions describing the location at which the force is applied-->
24-
<FunctionSet name="pointFunctions">
25-
<objects>
26-
<NaturalCubicSpline name="ground_force_px" />
27-
<NaturalCubicSpline name="ground_force_py" />
28-
<NaturalCubicSpline name="ground_force_pz" />
29-
</objects>
30-
<groups />
31-
</FunctionSet>
32-
<!--Three functions describing the torque the PrescribedForce applies-->
33-
<FunctionSet name="torqueFunctions">
34-
<objects>
35-
<NaturalCubicSpline name="ground_torque_x" />
36-
<NaturalCubicSpline name="ground_torque_y" />
37-
<NaturalCubicSpline name="ground_torque_z" />
38-
</objects>
39-
<groups />
40-
</FunctionSet>
41-
</PrescribedForce>
42-
<PrescribedForce name="LeftForce">
7+
<applied_to_body>calcn_r</applied_to_body>
8+
<!--Name of the body the force is expressed in (default is ground).-->
9+
<force_expressed_in_body>ground</force_expressed_in_body>
10+
<!--Name of the body the point is expressed in (default is ground).-->
11+
<point_expressed_in_body>ground</point_expressed_in_body>
12+
<!--Identifier (string) to locate the force to be applied in the data source.-->
13+
<force_identifier>ground_force_v</force_identifier>
14+
<!--Identifier (string) to locate the point to be applied in the data source.-->
15+
<point_identifier>ground_force_p</point_identifier>
16+
<!--Identifier (string) to locate the torque to be applied in the data source.-->
17+
<torque_identifier>ground_torque_</torque_identifier>
18+
</ExternalForce>
19+
<ExternalForce name="LeftForce">
4320
<!--Name of the body the force is applied to.-->
44-
<body>calcn_l</body>
45-
<!--Flag indicating whether the point (specified in pointFunctions) is in
46-
global frame-->
47-
<pointIsGlobal>false</pointIsGlobal>
48-
<!--Flag indicating whether the quantities (specified in
49-
force/torqueFunctions) is in global frame-->
50-
<forceIsGlobal>true</forceIsGlobal>
51-
<!--Three functions describing the force to be applied.-->
52-
<FunctionSet name="forceFunctions">
53-
<objects>
54-
<NaturalCubicSpline name="l_ground_force_vx" />
55-
<NaturalCubicSpline name="l_ground_force_vy" />
56-
<NaturalCubicSpline name="l_ground_force_vz" />
57-
</objects>
58-
<groups />
59-
</FunctionSet>
60-
<!--Three functions describing the location at which the force is applied-->
61-
<FunctionSet name="pointFunctions">
62-
<objects>
63-
<NaturalCubicSpline name="l_ground_force_px" />
64-
<NaturalCubicSpline name="l_ground_force_py" />
65-
<NaturalCubicSpline name="l_ground_force_pz" />
66-
</objects>
67-
<groups />
68-
</FunctionSet>
69-
<!--Three functions describing the torque the PrescribedForce applies-->
70-
<FunctionSet name="torqueFunctions">
71-
<objects>
72-
<NaturalCubicSpline name="l_ground_torque_x" />
73-
<NaturalCubicSpline name="l_ground_torque_y" />
74-
<NaturalCubicSpline name="l_ground_torque_z" />
75-
</objects>
76-
<groups />
77-
</FunctionSet>
78-
</PrescribedForce>
21+
<applied_to_body>calcn_l</applied_to_body>
22+
<!--Name of the body the force is expressed in (default is ground).-->
23+
<force_expressed_in_body>ground</force_expressed_in_body>
24+
<!--Name of the body the point is expressed in (default is ground).-->
25+
<point_expressed_in_body>ground</point_expressed_in_body>
26+
<!--Identifier (string) to locate the force to be applied in the data source.-->
27+
<force_identifier>l_ground_force_v</force_identifier>
28+
<!--Identifier (string) to locate the point to be applied in the data source.-->
29+
<point_identifier>l_ground_force_p</point_identifier>
30+
<!--Identifier (string) to locate the torque to be applied in the data source.-->
31+
<torque_identifier>l_ground_torque_</torque_identifier>
32+
</ExternalForce>
7933
</objects>
80-
<!--Storage file (.sto) containing the Forces, Torques and locations of
81-
the external loads.-->
34+
<groups />
35+
<!--Storage file (.sto) containing (3) components of force and/or torque and point of application.Note: this file overrides the data source specified by the individual external forces if specified.-->
8236
<datafile>subject01_walk1_grf.mot</datafile>
83-
<!--Motion file (.mot) or storage file (.sto) containing the model
84-
kinematics corresponding to the external loads.-->
85-
<external_loads_model_kinematics_file>subject01_walk1_ik.mot</external_loads_model_kinematics_file>
86-
<!--Low-pass cut-off frequency for filtering the model kinematics
87-
corresponding to the external loads. A negative value results in no
88-
filtering. The default value is -1.0, so no filtering.-->
89-
<lowpass_cutoff_frequency_for_load_kinematics>6</lowpass_cutoff_frequency_for_load_kinematics>
9037
</ExternalLoads>
9138
</OpenSimDocument>

0 commit comments

Comments
 (0)