Skip to content

Commit 2cb7af5

Browse files
committed
Fix various issues in Doxygen documentation
1 parent 34fd6af commit 2cb7af5

File tree

10 files changed

+62
-54
lines changed

10 files changed

+62
-54
lines changed

OpenSim/Actuators/PolynomialPathFitter.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ class OSIMACTUATORS_API PolynomialPathFitterBounds : public Object {
7373
* directory to which the results are written can be specified using the
7474
* `setOutputDirectory` method.
7575
*
76-
* Settings
77-
* --------
76+
* # Settings
7877
* Various settings can be adjusted to control the path fitting process. The
7978
* `setMomentArmsThreshold` method determines whether or not a path depends on a
8079
* model coordinate. In other words, the absolute value the moment arm of a with
@@ -91,10 +90,10 @@ class OSIMACTUATORS_API PolynomialPathFitterBounds : public Object {
9190
* lengths computed from the original model paths and the fitted polynomial
9291
* paths. The `setNumSamplesPerFrame` method specifies the number of samples
9392
* taken per time frame in the coordinate values table used to fit each path.
94-
* The `setParallel` method specifies the number of threads used to parallelize
95-
* the path fitting process. The `setLatinHypercubeAlgorithm` method specifies
96-
* the Latin hypercube sampling algorithm used to sample coordinate values for
97-
* path fitting.
93+
* The `setNumParallelThreads` method specifies the number of threads used to
94+
* parallelize the path fitting process. The `setLatinHypercubeAlgorithm` method
95+
* specifies the Latin hypercube sampling algorithm used to sample coordinate
96+
* values for path fitting.
9897
*
9998
* The default settings are as follows:
10099
*
@@ -113,8 +112,7 @@ class OSIMACTUATORS_API PolynomialPathFitterBounds : public Object {
113112
* models with larger or smaller anatomical measures (e.g., dinosaur
114113
* models).
115114
*
116-
* Usage
117-
* -----
115+
* # Usage
118116
* The most basic usage of `PolynomialPathFitter` requires the user to provide
119117
* a model and reference trajectory. The model should contain at least one path
120118
* object derived from `AbstractGeometryPath` and should not contain any
@@ -145,8 +143,7 @@ class OSIMACTUATORS_API PolynomialPathFitterBounds : public Object {
145143
* fitter.run();
146144
* @endcode
147145
*
148-
* Recommendations
149-
* ---------------
146+
* # Recommendations
150147
* Information from each step of the path fitting process is logged to the
151148
* console, provided that you have set the OpenSim::Logger to level "info" or
152149
* greater. Warnings are printed if the number of samples is likely insufficient
@@ -408,7 +405,7 @@ class OSIMACTUATORS_API PolynomialPathFitter : public Object {
408405
* of available hardware threads.
409406
*/
410407
void setNumParallelThreads(int numThreads);
411-
/// @copydoc setParallel()
408+
/// @copydoc setNumParallelThreads(int numThreads)
412409
int getNumParallelThreads() const;
413410

414411
/**

OpenSim/Common/LatinHypercubeDesign.h

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,33 @@ namespace OpenSim {
3030

3131
/**
3232
* A class for generating Latin hypercube designs.
33+
*
34+
* # Latin hypercube design
3335
*
3436
* A Latin hypercube is an m-by-n matrix, where 'm' is the number of design
3537
* samples and 'n' is the number of variables in the design. Each sample point
3638
* (i.e., each row in the design) is the only sample point in its row and column
3739
* in the hypercube defined by the number of variables.
38-
*
40+
*
41+
* \cond
3942
* For example, consider a design with 5 samples and 2 variables:
4043
*
41-
* grid matrix
42-
* __ __ __ __ __ __ __
43-
* | x | | 0.6 0.2 |
44-
* | x | | 1.0 0.4 |
45-
* q2 | x | q = | 0.2 0.6 |
46-
* | x | | 0.8 0.8 |
47-
* | x | | 0.4 1.0 |
48-
* ‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾
44+
* grid matrix
45+
* __ __ __ __ __ __ __
46+
* | x | | 0.6 0.2 |
47+
* | x | | 1.0 0.4 |
48+
* q2 | x | q = | 0.2 0.6 |
49+
* | x | | 0.8 0.8 |
50+
* | x | | 0.4 1.0 |
51+
* ‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾ ‾‾
4952
* q1
50-
*
53+
*
5154
* On the left is the 5-by-5 square grid (i.e., 2-D hypercube) that is produced
5255
* if the samples are plotted in the variable space defined by q1 and q2. On the
5356
* right is the 5-by-2 design matrix that contains the 5 samples.
54-
*
57+
* \endcond
58+
*
59+
*
5560
* Latin hypercube designs are useful for sampling large, multivariate parameter
5661
* spaces. Optimal Latin hypercube designs are those that maximize the minimum
5762
* distance between samples in the design. This class provides methods for
@@ -60,8 +65,7 @@ namespace OpenSim {
6065
* algorithm from Viana et al. (2009) and the enhanced stochastic evolutionary
6166
* algorithm from Jin et al. (2005).
6267
*
63-
* How to create a Latin hypercube design
64-
* --------------------------------------
68+
* # How to create a Latin hypercube design
6569
* To create a Latin hypercube design, you must first specify the number of
6670
* variables and samples in the design, and, optionally, the distance criterion
6771
* used to evaluate each design. The distance criterion can be either "maximin"
@@ -103,8 +107,7 @@ namespace OpenSim {
103107
* minimization criterion. While both criteria aim to achieve a similar goal,
104108
* the values returned by each are not directly comparable.
105109
*
106-
* Recommendations for different sized designs
107-
* -------------------------------------------
110+
* # Recommendations for different sized designs
108111
* To rapidly create a random Latin hypercube design of any size,
109112
* generateRandomDesign() is recommended. This method is fast, but does not
110113
* guarantee that the design is optimal.
@@ -124,8 +127,7 @@ namespace OpenSim {
124127
* it is recommended to use the "phi_p" distance criterion, which approximates
125128
* "maximin", but is much faster.
126129
*
127-
* References
128-
* ----------
130+
* # References
129131
* - [1] Viana, F.A.C., Venter, G. and Balabanov, V. (2010), An algorithm for
130132
* fast optimal Latin hypercube design of experiments. Int. J. Numer. Meth.
131133
* Engng., 82: 135-156. https://doi.org/10.1002/nme.2750

OpenSim/Common/Object.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ class OSIMCOMMON_API Object
341341
used by the Property declaration macros for fast access to properties. **/
342342
template <class T> const Property<T>&
343343
getProperty(const PropertyIndex& index) const;
344-
/** @copydoc getProperty(const PropertyIndex&) **/
344+
/** Get property of known type Property\<T> as a const reference;
345+
the property must be present and have the right type. This is primarily
346+
used by the Property declaration macros for fast access to properties. **/
345347
template <class T> const Property<T>&
346348
getPropertyByName(const std::string& name) const;
347349

OpenSim/Moco/MocoGoal/MocoOrientationTrackingGoal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class OSIMMOCO_API MocoOrientationTrackingGoal : public MocoGoal {
8686
set_rotation_reference_file("");
8787
m_rotation_table = ref;
8888
}
89-
/** @copydoc setRotationReference(const TimeSeriesTable_<SimTK::Rotation>& ref) */
89+
/** @copydoc setRotationReference(const TimeSeriesTable_<SimTK::Rotation_<double>>& ref) */
9090
void setRotationReference(const TimeSeriesTable_<SimTK::Quaternion_<double>>& ref) {
9191
set_states_reference(TableProcessor());
9292
set_rotation_reference_file("");

OpenSim/Moco/MocoGoal/MocoOutputGoal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ The goal is computed as follows:
190190
191191
\f[
192192
\frac{1}{dm} \int_{t_i}^{t_f}
193-
w_v\beta((\frac{1}{s} (\ln (1 + \exp (s\betav))))^p) ~dt
193+
w_v \beta((\frac{1}{s} (\ln (1 + \exp (s \beta v))))^p) ~dt
194194
\f]
195195
We use the following notation:
196196
- \f$ d \f$: displacement of the system, if `divide_by_displacement` is
@@ -199,8 +199,8 @@ We use the following notation:
199199
true; 1 otherwise.
200200
- \f$ v \f$: the output variable of choice.
201201
- \f$ w_v \f$: the weight for output variable \f$ v \f$.
202-
- \f$ \beta \f$: the approximate extremum to be taken (\beta == -1 for
203-
minimum; \beta == 1 for maximum).
202+
- \f$ \beta \f$: the approximate extremum to be taken (\f$ \beta \f$ == -1 for
203+
minimum; \f$ \beta \f$ == 1 for maximum).
204204
- \f$ s \f$: the smoothing factor for approximating the extremum. With
205205
\f$ s \f$ == 1 the approximation is closer to the true extremum taken.
206206
For \f$ v \f$ with potentially large magnitudes (> 2000) during a simulation

OpenSim/Moco/MocoUtilities.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,20 @@ class FileDeletionThrower {
245245
/// In general, this utility needs getRecordValues() to report the
246246
/// following force and torque information at the specified indices:
247247
///
248-
/// index - component (body)
249-
/// ------------------------
250-
/// 0 - force-x (foot)
251-
/// 1 - force-y (foot)
252-
/// 2 - force-z (foot)
253-
/// 3 - torque-x (foot)
254-
/// 4 - torque-y (foot)
255-
/// 5 - torque-z (foot)
256-
/// 6 - force-x (contact plane)
257-
/// 7 - force-y (contact plane)
258-
/// 8 - force-z (contact plane)
259-
/// 9 - torque-x (contact plane)
260-
/// 10 - torque-y (contact plane)
261-
/// 11 - torque-z (contact plane)
248+
/// index | component (body)
249+
/// ----- | ----------------
250+
/// 0 | force-x (foot)
251+
/// 1 | force-y (foot)
252+
/// 2 | force-z (foot)
253+
/// 3 | torque-x (foot)
254+
/// 4 | torque-y (foot)
255+
/// 5 | torque-z (foot)
256+
/// 6 | force-x (contact plane)
257+
/// 7 | force-y (contact plane)
258+
/// 8 | force-z (contact plane)
259+
/// 9 | torque-x (contact plane)
260+
/// 10 | torque-y (contact plane)
261+
/// 11 | torque-z (contact plane)
262262
///
263263
/// @ingroup mocoutil
264264
OSIMMOCO_API

OpenSim/Simulation/Model/FunctionBasedPath.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ namespace OpenSim {
9494
* the tension in the path by the moment arms. Therefore, this class only
9595
* applies mobility (i.e., generalized) forces to the model.
9696
*
97-
* References
98-
* ----------
97+
* # References
9998
* - [1] Meyer AJ, Patten C, Fregly BJ (2017) "Lower extremity EMG-driven
10099
* modeling of walking with automated adjustment of musculoskeletal
101100
* geometry." PLoS ONE 12(7): e0179698.

OpenSim/Simulation/TableProcessor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class OSIMSIMULATION_API TabOpUseAbsoluteStateNames : public TableOperator {
228228
}
229229
};
230230

231-
/// Invoke SimulationUtilities::appendCoupledCoordinateValues() on the table.
231+
/** Invoke SimulationUtilities::appendCoupledCoordinateValues() on the table. */
232232
class OSIMSIMULATION_API TabOpAppendCoupledCoordinateValues
233233
: public TableOperator {
234234
OpenSim_DECLARE_CONCRETE_OBJECT(TabOpAppendCoupledCoordinateValues,
@@ -256,8 +256,8 @@ class OSIMSIMULATION_API TabOpAppendCoupledCoordinateValues
256256
}
257257
};
258258

259-
/// Invoke SimulationUtilities::appendCoordinateValueDerivativesAsSpeeds() on
260-
/// the table.
259+
/** Invoke SimulationUtilities::appendCoordinateValueDerivativesAsSpeeds() on
260+
the table */
261261
class OSIMSIMULATION_API TabOpAppendCoordinateValueDerivativesAsSpeeds
262262
: public TableOperator {
263263
OpenSim_DECLARE_CONCRETE_OBJECT(

doc/Moco/MocoExamples.dox

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ EMG-driven simulation of walking.
4747
@example exampleMinimizeJointReaction.m
4848
This is an example of MocoJointReactionGoal.
4949

50-
51-
5250
@example exampleOptimizeMass.m
5351
A simple parameter optimization example.
5452

@@ -63,6 +61,9 @@ This is Moco's simplest example.
6361
This example conducts a 2-D prediction of walking, employing a
6462
MocoPerodicityGoal.
6563

64+
@example examplePolynomialPathFitter.m
65+
This example demonstrates how to use PolynomialPathFitter to
66+
create a set of FunctionBasedPaths for a model.
6667

6768

6869
@example exampleMocoTrack.py
@@ -124,6 +125,10 @@ MocoSolution.
124125
This example demonstrates how Moco solves problems with kinematic constraints
125126
and includes a visualization of the Lagrange multipliers that Moco solves for.
126127

128+
@example examplePolynomialPathFitter.py
129+
This example demonstrates how to use PolynomialPathFitter to
130+
create a set of FunctionBasedPaths for a model.
131+
127132

128133

129134
@example example2DWalking.cpp
@@ -211,6 +216,7 @@ IMUTracking | torque-driven single leg | MocoStudy motion prediction, MocoAccele
211216
EMGTracking | lower-limb | MocoInverse, MocoControlTrackingGoal | [MATLAB](@ref exampleEMGTracking_answers.m) [Python](@ref exampleEMGTracking_answers.py)
212217
PredictAndTrack | double pendulum | MocoMarkerFinalGoal, MocoFinalTimeGoal, MocoMarkerTrackingGoal, MocoStateTrackingGoal | [Python](@ref examplePredictAndTrack.py)
213218
PrototypeCustomGoal | N/A | Sandbox for defining a custom MocoGoal | [MATLAB](@ref examplePrototypeCustomGoal.m)
219+
PolynomialPathFitter | N/A | Fit FunctionBasedPath%s to a model | [MATLAB](@ref examplePolynomialPathFitter.m) [Python](@ref examplePolynomialPathFitter.py)
214220

215221
@section Advanced
216222

doc/doxyfile_shared.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,9 @@ EXCLUDE_SYMBOLS =
965965

966966
EXAMPLE_PATH = "@PROJECT_SOURCE_DIR@/OpenSim/Tests/README/testREADME.cpp" \
967967
"@PROJECT_SOURCE_DIR@/Bindings/Java/Matlab/examples/Moco" \
968+
"@PROJECT_SOURCE_DIR@/Bindings/Java/Matlab/examples/PolynomialPathFitter" \
968969
"@PROJECT_SOURCE_DIR@/Bindings/Python/examples/Moco" \
970+
"@PROJECT_SOURCE_DIR@/Bindings/Python/examples/PolynomialPathFitter" \
969971
"@PROJECT_SOURCE_DIR@/OpenSim/Examples/Moco"
970972

971973
# If the value of the EXAMPLE_PATH tag contains directories, you can use the

0 commit comments

Comments
 (0)