Add limits to the Range of Motion
In this post, I will show a new AnyScript class template to add range-of-motion limits to Human body model.
The implementation consist of two AnyScript class templates. A high
level class template RangeOfMotionLimits
which makes it easy to add
Range-of-motion limits to all the joints on the Musculoskeltal model.
Behind the scenes the high-level template uses a more generic low-leve template
KinLimitsDriver
, which can add limits to any kinematic measure.
Usage:
To use the high level class template RangeOfMotionLimits
you must first
include the file in which it is defined.
Add #include "../path/to/RangeOfMotionLimits_template.any"
in the beginning
of your main file. Then create the RangeOfMotionLimits
class inside Main after
the human model is included in the model:
If some joint should not have range of motion limits, the class accepts arguments for disabling individual joint limits:
Find the code on GitHub
The AnyScript template is hosted on GitHub,
where you can find examples and documentation on the
class_template
and the options which are available.
Leave a comment