Tutorial: Studying the Cat-Righting Reflex
The cat-righting reflex is a fun problem to study, but also lends itself well to learning many of the abilities of OpenSim. In this tutorial, we walk through code that can be used to generate results similar to those from two of the simulations in the Results video on the main Flippin' Felines page.
You can obtain this code from our SimTK project page. Look for the 'Tutorial code' download.
We've designed the tutorial as merely a supplement to the raw source code. If you're comfortable with C++, OpenSim, and dynamics, you may be able to jump right into the source code. If you're more interested in how to do modeling/dynamic optimization but not in why it's done the way it is, you can also jump right to the source code. In some parts of the tutorial, there are large blocks of text; it is not necessary to read them unless you're interested in the why. Also, the code in the tutorial is not necessarily complete. Copying and pasting it from the tutorial to your editor will not be sufficient to get a working program.
SimTK and OpenSim classes covered
This tutorial teaches the use of the following SimTK classes:
- Optimizer
- OptimizerSystem
and the following OpenSim classes:
- Model
- Body
- DisplayGeometry
- CustomJoint
- PinJoint
- CoordinateSet
- Coordinate
- CoordinateActuator
- SimmSpline
- FunctionSet (and Set, in general)
- PrescribedController
- CoordinateLimitForce
- Manager
- Object (the base class of all other classes, for reading/writing objects from XML files)
OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.