-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class StatesDocument #3902
Class StatesDocument #3902
Commits on May 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6789e7f - Browse repository at this point
Copy the full SHA 6789e7fView commit details -
- Modified the names of the Trajectory methods to match the latest names in Component.h. - Reintroduced the precision argument in SimTK::Xml::Elment::setValueAs<T>.
Configuration menu - View commit details
-
Copy full SHA for 03b15d9 - Browse repository at this point
Copy the full SHA 03b15d9View commit details
Commits on May 28, 2024
-
Added a place holder for the Catch2 unit test for class StatesDocument. testStatesDocument.cpp is now being incorporated in the build, and the test case runs when "build" executed on the target "RUN_TESTS_PARALLEL".
Configuration menu - View commit details
-
Copy full SHA for cc9954f - Browse repository at this point
Copy the full SHA cc9954fView commit details
Commits on May 29, 2024
-
- Moved all utility methods into a struct with local linkage. - Streamlined code by adding `getEltValue()`. Use of this method reduced some code repetition.
Configuration menu - View commit details
-
Copy full SHA for 21b1c81 - Browse repository at this point
Copy the full SHA 21b1c81View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb99e94 - Browse repository at this point
Copy the full SHA bb99e94View commit details
Commits on May 30, 2024
-
Update testComponentInterface.cpp
- Minor corrections/additions to comments
Configuration menu - View commit details
-
Copy full SHA for 0538766 - Browse repository at this point
Copy the full SHA 0538766View commit details -
- Added code borrowed from testComponentInterface.cpp to generate a dummy model with a variety of states. The code compiles and runs with all test cases passing, but this is just a starting point. De/serialization using class StatesDocument is not yet being tested.
Configuration menu - View commit details
-
Copy full SHA for b799c0b - Browse repository at this point
Copy the full SHA b799c0bView commit details -
- Removed code borrowed from testComponentInterface.cpp. That code was not the way to go. A legitimate model is needed. I'm starting over.
Configuration menu - View commit details
-
Copy full SHA for 03a6229 - Browse repository at this point
Copy the full SHA 03a6229View commit details
Commits on May 31, 2024
-
- Made small improvements and corrections in the documentation.
Configuration menu - View commit details
-
Copy full SHA for 368f123 - Browse repository at this point
Copy the full SHA 368f123View commit details -
- Now building a simple model and running a simulation.
Configuration menu - View commit details
-
Copy full SHA for 9585d98 - Browse repository at this point
Copy the full SHA 9585d98View commit details -
- Added code to serialize, deserialize, and then re-serialize the state trajectory recorded during a simulation. The code is functioning as expected!
Configuration menu - View commit details
-
Copy full SHA for 7a76982 - Browse repository at this point
Copy the full SHA 7a76982View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cf98fa - Browse repository at this point
Copy the full SHA 3cf98faView commit details -
- Changed member variable `m_states` from type std::vector<SimTK::State> to SimTK::Array_<SimTK::State> - Added `exportToStatesDocument()`
Configuration menu - View commit details
-
Copy full SHA for 842cca6 - Browse repository at this point
Copy the full SHA 842cca6View commit details
Commits on Jun 1, 2024
-
- Added a `get` method that provides access to the underlying SimTK::Array_<SimTK::State> member variable.
Configuration menu - View commit details
-
Copy full SHA for 21699ed - Browse repository at this point
Copy the full SHA 21699edView commit details -
- Added a method that tests equality of 2 state trajectories. The method does not yet test equality for discrete variables or modeling options, but Qs, Us, and Zs are passing.
Configuration menu - View commit details
-
Copy full SHA for dd18f4c - Browse repository at this point
Copy the full SHA dd18f4cView commit details
Commits on Jun 2, 2024
-
- Added a static method that computes maximum rounding error based on the specified precision and value that is rounded.
Configuration menu - View commit details
-
Copy full SHA for 651ffb9 - Browse repository at this point
Copy the full SHA 651ffb9View commit details
Commits on Jun 3, 2024
-
- Cleaned up the computation of max_eps.
Configuration menu - View commit details
-
Copy full SHA for 82a8b21 - Browse repository at this point
Copy the full SHA 82a8b21View commit details
Commits on Jun 6, 2024
-
- Added equality comparisons for discrete variables and modeling options.
Configuration menu - View commit details
-
Copy full SHA for b71cfa5 - Browse repository at this point
Copy the full SHA b71cfa5View commit details
Commits on Jun 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 902d8f2 - Browse repository at this point
Copy the full SHA 902d8f2View commit details
Commits on Jun 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7851634 - Browse repository at this point
Copy the full SHA 7851634View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5f7cdc - Browse repository at this point
Copy the full SHA a5f7cdcView commit details -
Since the trajectory was changed from std::vector<State> to SimTK::Array_<State>, bounds checking behavior has changed. SimTK::Array_<T> only checks bounds in DEBUG. In other words, an IndexOutOfRange exception will not be thrown in a release build. To account for this, I inserted an #ifdef to skip bounds checking unless in DEBUG.
Configuration menu - View commit details
-
Copy full SHA for 15bc707 - Browse repository at this point
Copy the full SHA 15bc707View commit details
Commits on Jun 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2233470 - Browse repository at this point
Copy the full SHA 2233470View commit details -
Added discrete variables to the test model.
Added the following types: - bool - int - double - Vec2 - Vec3 - Vec4 - Vec5 - Vec6 All tests are passing, and the .ostates file looks right.
Configuration menu - View commit details
-
Copy full SHA for aa45b9d - Browse repository at this point
Copy the full SHA aa45b9dView commit details
Commits on Jul 1, 2024
-
Revamped ExtendedPointToPointSpring
So that discrete variables can be updated during a simulation, class ExtendedPointToPointSpring is now built on top of class ExtendedTwoPointLinearSpring. ExtendedTwoPointLinearSpring allocates auto-update discrete variables in its own `realizeTopology()` and those discrete variables are updated in its own `realizePosition()`.
Configuration menu - View commit details
-
Copy full SHA for 850e1c5 - Browse repository at this point
Copy the full SHA 850e1c5View commit details -
Reverted to a simpler ExtendedPointToPointSpring class.
The discrete variables can be added in extendRealizeTopology(). And, they can be changed in computeForce().
Configuration menu - View commit details
-
Copy full SHA for 820c04c - Browse repository at this point
Copy the full SHA 820c04cView commit details
Commits on Jul 2, 2024
-
Discrete variables are now being altered during simulation
- Changed the allocation for discrete variables to the DefaultSystemSubsystem. - Primarily using the subsystem index instead of the pointer to the subsystem. - Discrete variables are being changed during simulation in ExtendedPointToPointSpring::computeForce(). All checks are now passing!
Configuration menu - View commit details
-
Copy full SHA for 9e0424f - Browse repository at this point
Copy the full SHA 9e0424fView commit details
Commits on Jul 7, 2024
-
Added ability to set a note for a states document.
The note is serialized and deserialized. All checks are passing.
Configuration menu - View commit details
-
Copy full SHA for a60bf8d - Browse repository at this point
Copy the full SHA a60bf8dView commit details
Commits on Aug 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8bf1166 - Browse repository at this point
Copy the full SHA 8bf1166View commit details
Commits on Aug 30, 2024
-
1. Now looping over over output precision from precision = 2 to precision = 22. 2. Added the ability to change the name of a discrete state for the purpose of testing exceptions when a discrete state is not found.
Configuration menu - View commit details
-
Copy full SHA for 493d73d - Browse repository at this point
Copy the full SHA 493d73dView commit details
Commits on Aug 31, 2024
-
- Cleaned up the code a little bit. - Added code to deserialize with a model that has one discrete variable with a changed name. This was done to check exception handling.
Configuration menu - View commit details
-
Copy full SHA for 1489842 - Browse repository at this point
Copy the full SHA 1489842View commit details
Commits on Sep 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 467d910 - Browse repository at this point
Copy the full SHA 467d910View commit details -
Cleaned up the code. The following checks are now performed: - Serialization / deserialization for precision 1 to 21. - Check that exception is thrown when model names don't match. - Check that exception is thrown when a discrete state is not found.
Configuration menu - View commit details
-
Copy full SHA for a7eb16b - Browse repository at this point
Copy the full SHA a7eb16bView commit details
Commits on Sep 2, 2024
-
- code cleanup - added the ability to omit a discrete state When a discrete state is omitted, an exception should be thrown but it is not. Need to look into this. Previous checks are still running properly.
Configuration menu - View commit details
-
Copy full SHA for bc46144 - Browse repository at this point
Copy the full SHA bc46144View commit details
Commits on Sep 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 231e27d - Browse repository at this point
Copy the full SHA 231e27dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8e9133 - Browse repository at this point
Copy the full SHA c8e9133View commit details -
Added read-only accessor for low-level state array
const SimTK::Array_<SimTK::State>& StatesTrajectoryReporter::getStateArray();
Configuration menu - View commit details
-
Copy full SHA for 8677256 - Browse repository at this point
Copy the full SHA 8677256View commit details -
- Removed StatesDocument::parseDoc(). No reason to have it. - Simplified the name of StatesTrajectory::getUnderlyingStateArray() to getStateArray(). - Refined documentation comments and checked them for accuracy.
Configuration menu - View commit details
-
Copy full SHA for 3c87d77 - Browse repository at this point
Copy the full SHA 3c87d77View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5f5341 - Browse repository at this point
Copy the full SHA d5f5341View commit details -
- Deleted unused code. - Updated copyright dates.
Configuration menu - View commit details
-
Copy full SHA for 439db74 - Browse repository at this point
Copy the full SHA 439db74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c2b595 - Browse repository at this point
Copy the full SHA 7c2b595View commit details -
Fixed typo in StatesDocument.h
An error was being issued for Ubuntu and Mac builds because "OPENSIM_STATES_DOCUMENT_H_" was not commented out on line 609. I added the comment token.
Configuration menu - View commit details
-
Copy full SHA for 4f994e0 - Browse repository at this point
Copy the full SHA 4f994e0View commit details -
Corrected some type compatibilities in StatesDocument.cpp
In a number of instances, I changed the type from `int` to `size_t`.
Configuration menu - View commit details
-
Copy full SHA for 054908b - Browse repository at this point
Copy the full SHA 054908bView commit details -
Using std::string::c_str() for strings in SimTK_ASSERT macros
Windows can handle a std::string, but Mac and Ubuntu builds are failing.
Configuration menu - View commit details
-
Copy full SHA for 12d7f09 - Browse repository at this point
Copy the full SHA 12d7f09View commit details -
- Addressed some type warnings. - Removed the method `ComputeMaxRoundingError()`.
Configuration menu - View commit details
-
Copy full SHA for 4ce36dd - Browse repository at this point
Copy the full SHA 4ce36ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c2ba5f - Browse repository at this point
Copy the full SHA 5c2ba5fView commit details
Commits on Sep 25, 2024
-
I temporarily added a default constructor to see if that would resolve some errors that are occurring in the Continuous Integration.
Configuration menu - View commit details
-
Copy full SHA for f6662d6 - Browse repository at this point
Copy the full SHA f6662d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 354f81e - Browse repository at this point
Copy the full SHA 354f81eView commit details -
It looks like different return types of size() methods are assumed across operating systems. I inserted a (size_t) cast to address compiler errors on Ubuntu
Configuration menu - View commit details
-
Copy full SHA for e2a2337 - Browse repository at this point
Copy the full SHA e2a2337View commit details
Commits on Sep 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for eb534f3 - Browse repository at this point
Copy the full SHA eb534f3View commit details
Commits on Oct 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0544275 - Browse repository at this point
Copy the full SHA 0544275View commit details
Commits on Oct 12, 2024
-
Reverted StatesTrajectory to use std::vector(SimTK::State)
For reasons of performance and compatibility with Simbody, OpenSim::StatesDocument uses SimTK::Array_<>, instead of std::vector<>, as the container for states trajectories. However, some user-facing classes, like OpenSim::StatesTrajectory, have opted to use std::vector<> as the container. I migrated OpenSim::StatesTrajectory to use SimTK::Array_<>. Unfortunately, this caused errors when bindings for Python and perhaps Java and Matlab are generated. To maintain compatibility with existing code and simplify binding generation, this commit reverts to using std::vector as the container for state trajectories. In addition, several new interface methods were introduced to the StatesDocument API to allow either SimTK::Array_<> or std::vector<> to be used as the container. Internally, however, all state trajectory operations are mediated by SimTK::Array_<>. This flexibility is gained at almost no computational cost by using a shallow copy constructor to convert std::vector<State> objects to SimTK::Array_<State> objects.
Configuration menu - View commit details
-
Copy full SHA for bd764f6 - Browse repository at this point
Copy the full SHA bd764f6View commit details -
Now settings for `note` and `precision` are updated in the body of the constructor instead of in the initializer list.
Configuration menu - View commit details
-
Copy full SHA for a09c2b3 - Browse repository at this point
Copy the full SHA a09c2b3View commit details
Commits on Oct 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 998e5ad - Browse repository at this point
Copy the full SHA 998e5adView commit details
Commits on Oct 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4206e24 - Browse repository at this point
Copy the full SHA 4206e24View commit details -
Updated the documentation to reflect the fact that std::vector<SimTK::State> is also an acceptable form of the state trajectory for interfacing with OpenSim.
Configuration menu - View commit details
-
Copy full SHA for 515d333 - Browse repository at this point
Copy the full SHA 515d333View commit details -
Update StatesTrajectoryReporter.cpp
Migrated StatesTrajectoryReporter::getStateArray() to getVectorOfStateObjects()
Configuration menu - View commit details
-
Copy full SHA for 32009c2 - Browse repository at this point
Copy the full SHA 32009c2View commit details -
Update StatesTrajectoryReporter.h
Migrated StatesTrajectoryReporter::getStateArray() to getVectorOfStateObjects().
Configuration menu - View commit details
-
Copy full SHA for fa570c9 - Browse repository at this point
Copy the full SHA fa570c9View commit details -
I added comments for developers should a demand additional supported variable types emerge.
Configuration menu - View commit details
-
Copy full SHA for d093cb1 - Browse repository at this point
Copy the full SHA d093cb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for aba49bc - Browse repository at this point
Copy the full SHA aba49bcView commit details
Commits on Oct 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8501fdd - Browse repository at this point
Copy the full SHA 8501fddView commit details