Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Welcome to the OpenSim Developer Week Wiki. The information in this Wiki page is intended to help you formulate a project that may both benefit from the OpenSim 4.0 API and is tractable for a one-week workshop. This wiki will be updated regularly so please check in as we get closer to the development weekworkshop.  

Table of Contents

Important Dates 

...

 

Project Goals and Accomplishment Slides

On the first day, you will all present your Project Goals slides. The workshop slides (two per project) are intended to help the OpenSim team and your fellow Workshop attendees understand your work, ask questions, and give feedback and support where possible. Follow the link to the Google Slides presentation and follow the instructions to create your slide.

The Workshop Accomplishment slides can be found here. The Accomplishment slides are an opportunity to share your accomplishments, your challenges, and what you’ve learned. Each group should have at most three slides, including a single goal slide. Please complete your slides by noon, Friday, when voting for project awards will start. 

Building OpenSim

The workshop will have hands-on examples using the new OpenSim 4.0 API. In preparation, you will need to set up your build environment (Visual Studio or Xcode, CMake, etc.) before Monday. Detailed instructions for obtaining the OpenSim source code and compiling it are on the main Github page, but here are some particulars:

  1. Create a GitHub account.
  2. Install command-line git, and make sure you obtain the OpenSim source code by cloning the GitHub repository (not by downloading a ZIP file).
  3. If you are using Windows and plan to use the MATLAB scripting in 4.0, then you must build OpenSim as 32-bit if you have 32-bit MATLAB, or as 64-bit if you have 64-bit MATLAB. If you are using Windows but not MATLAB, then compile OpenSim as 32-bit--it compiles faster!
  4. OpenSim takes a while to build. You will need at least an hour to do this; even more if you have not done it before. We will likely make bug fixes to OpenSim over the weekend, so you will need to update your build on Monday morning; this “incremental build” will be much quicker.

If you have any issues or questions, please don’t hesitate to email us at opensim@stanford.edu.

API Documentation

The (draft) API documentation for the workshop can be downloaded here and a pocket guide here. These guides include short descriptions of the important classes as well as a quick guide to the API structure and common commands. The current doxygen for OpenSim 4.0 can be found here: http://doxygen.opensim.community/.

Contributing Lecture 

A pdf copy of the lecture on contributing to OpenSim via git and Github can be downloaded here.

Location and Coffee

The workshop location is at Stanford University, Clark Center, S361 (third floor, door S3.3, through Peet’s Coffee). Directions and maps to the Clark Center can be found here. On the first day we will provide light continental breakfast items. Breakfast will be on your own on subsequent days but we will provide some light snacks and lots of coffee throughout the Workshop to help maximize productivity.

Agenda

This is a five-day workshop. On the first day of the workshop, we will provide an overview of OpenSim 4.0, with discussions, guided exercises, and interactive lectures to introduce the new features. The second day will consist of guided exercises on contributing using GitHub and how you can incorporate collaboration and contribution to your project. Days three and four will be devoted to working on projects that you and other participants bring to the workshop. Day five will include group discussions and presentations about your workshop achievements and plans for wrapping up your development.


 

Note: This detailed agenda is subject to change.

 

Day One – Monday, June 27
8:30 – 9:00 amSnacks, coffee, and update your OpenSim build
9:00 – 9:15 amWelcome, goals, and agenda
9:15 – 9:45 amTalk: OpenSim 4.0 Introduction
9:45 – 10:45 amHands-on example: Part I
10:45 – 11:00 amBREAK
11:00 – 12:00 pmHands-on example: Part II
12:00 – 1:00 pmLUNCH
1:00 – 2:00 pmHands-on example: Part III
2:00 – 4:00 pmParticipant project presentations
4:00 – 6:00 pmWelcome reception at the Clark Center

 

Day Two – Tuesday, June 28
9:00 – 9:10 amAgenda and Introduction for Day Two
9:10 – 9:45 amTalk: Contributing to OpenSim
9:45 – 10:30 amHands-on: Making a pull request
10:30 – 10:45 amBREAK
10:45 – 5:00 pmWork on projects

 

Day Three – Wednesday, June 29
9:00 – 5:00 pmWork on projects

 

Day Four – Thursday, June 30
9:00 – 5:00 pmWork on projects 

 

Day Five – Friday, July 1
9:00 – 11:00 amWork on projects
11:00 – 12:00 pmFinalize presentations
12:00 – 1:00 pmLUNCH
1:00 – 3:00 pmPresentations and discussion
3:00 – 3:10 pmFinal remarks and closing
3:30 – 6:00 pmClosing Reception in downtown Palo Alto

 

OpenSim 4.0

OpenSim 4.0 will allow for greater access and flexibility to software builders, making possible what may have been impossible in previous releases. Below is a list of 4.0 feature descriptions and some enabled projects to give you a sense of the types of development projects that were not possible before or that are now significantly easier.  Though the workshop will predominantly use the new 4.0 API, people who are developing new tools for the OpenSim 3 releases are also encouraged to apply. 

Features in Version 4.0

  1. Nested model components. Compose  Compose a complex model from simpler more robust/testable subcomponents; for example, a muscle model can be composed of standalone activation dynamics and fiber dynamics subcomponents. As a result, components have a “path name”; e.g., “soleus_r/fiber,” We also improved the mechanism for accessing the components within a model by either path name or type.

  2. Connectors between model components. Components depend on each other: joints connect two bodies, muscles need wrapping surfaces, etc. We have formalized the method for specifying the connections between components to make it easier to build modular models and to make these connections far less bug-prone.

  3. Reference Frames. Performing and reporting kinematic transforms is one of the most useful functions of a multibody model and defining reference frames is essential for transforming data. Frames are new abstraction for defining and attaching reference frames in OpenSim and they have the ability to re-express quantities (positions, velocities, etc.) defined in one Frame to any other Frame.

  4. Simulink-style wiring of signals between components. Each component can have Inputs and Outputs. Any model-computed value based on the state is a candidate as an Output, and can be wired to another component’s Input. A Reporter is no longer an inflexible Analysis but a modular Component that reads from designated Outputs and writes to in-memory data tables of results. That means no more reading storage files just to access a computed quantity.

  5. Use any data file format you want. A new DataTable class replaces Storage as OpenSim’s primary container for simulation inputs and outputs. You can create a DataTable from any file format (.sto, .csv, .c3d) using the new Adapter classes. Adapters convert files of various formats to DataTables consumable by OpenSim Solvers and Tools. DataTables generated by Solvers can also be written out to various files via an adapter.

  6. Save exact simulation results to a file. The new StatesTrajectory class allows perfect replay of simulations from ForwardDynamics and CMC without loss of precision (as with states storage files) or of the values for non-continuous state variables (e.g. modeling options and discrete state variables).

  7. Compose your own “Study” by walking through States, realizing Model dynamics and accelerations, and piping Outputs to Reporters and writing results to a file format of your choice.

  8. Extend OpenSim classes through Python (e.g., write your Analysis class in Python instead of C++).

...

  1. Implicit model formulation. OpenSim currently provides the model's dynamics as explicit differential equations, though implicit differential equations are preferable for some solution methods. During the workshop, participants could achieve the implicit formulation for just the multibody system without constraints.

  2. Task-space controller. Implement an OpenSim Controller that causes a torque-actuated model to obey operational-space tasks. During the workshop, participants could achieve a working prototype for a small number of operational space tasks.

  3. Patient-specific joint modeling from high-fidelity data. Joints in OpenSim are capable of capturing coupled translations and rotations as functions of limited degrees-of-freedom known as internal coordinates, which better match physiological joints than pins and sliders. In reality, it is the contact joint surfaces of bones, tension in ligaments, and other non-rigid structures such as menisci and capsules that dictate the specific path (or surface) of motion that a  joint provides under normal loads but these structures can be extremely difficult to model and simulate very slowly. On the other-hand researchers are using high-fidelity X-ray fluoroscopy, cine MRI, or bone pin measurements to characterize the kinematics of bones relative to one another during activities of daily living. The OpenSim Joint can directly capture/match the specific motion space as provided by high-fidelity data. During the workshop, available spatial kinematics of the two bones that connect to the joint of interest (such as the ankle, knee, or hip) from a high-fidelity source could be used to generate splines (or bicubic surface) such that the modeled joint reproduces nearly identical motion without having to model joint contact or other joint tissue forces.

  4. Script based analysis pipeline. Automate your OpenSim workflow (e.g., IK -> RRA -> CMC) in either MATLAB or Python. This could be completed during the workshop for a subset of your data.

  5. Modeling human-device interaction (e.g., robotic assistive device). Create a model of your device and add it to a musculoskeletal model. Write an OpenSim Controller class to control the device. During the workshop, participants could implement the Controller class and test it in simple scenarios.

Detailed Agenda (Draft)

This is a five-day workshop. On the first day of the workshop, we will provide an overview of OpenSim 4.0, with discussions, guided exercises and interactive lectures to introduce the new features. The second day will consist of guided exercises on contributing using GitHub and how you can incorporate collaboration and contribution to your project. Days three and four will be devoted to working on projects that you and other participants bring to the workshop. Day five will include group discussions and presentations about your workshop achievements and plans for wrapping up your development.

...

titleShow Daily Agenda

Day One – Monday, June 27

9:00 – 9:15 am     Welcome, Development Week Goals, Agenda

9:15 – 9:45 am     Talk: OpenSim 4.0 Introduction

9:45 – 10:45 am   Hands-on Example 1

10:45 – 11:00 am  Break

11:00 – 12:00 am  Hands-on Example 2

12:00 – 1:00 pm     Lunch

1:00 – 2:00 pm   Hands-on Example 3

2:00 – 3:00 pm Hands-on Example 4

3:00 – 3:15 pm  Break

3:15 – 4:00 pm Participant Project Presentation

4:00 – 5:00 pm Stanford Walking Tour

5:00 –7:00 pm  Welcome Celebration at the Treehouse

 

Day Two – Tuesday, June 28

9:00 – 9:10pm  Agenda and Introduction for day two

9:10 – 9:45 am    Talk: Contributing to OpenSim

9:45 – 10:30 am  Example: Making and Reviewing Pull requests

10:30 – 10:45 am  BREAK

10:45 – 5:00 pm  Work on Projects

 

Day Three – Wednesday, June 29

9:00 – 5:00pm  Work on Projects         

Day Four – Thursday, June 30

9:00 – 5:00pm  Work on Projects

 

Day Five – Friday, July 1st

9:00 – 12:00pm  Work on Projects

12:00 – 1:00pm  LUNCH

1:00 – 2:00pm  Finalize Presentations

2:00 – 4:00pm  Presentations and Discussion

4:00 – 4:10pm  Final Remarks and Closing

4:10 – 7:00pm  Reception @ TBD

 

 

...