Skip to content
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

Merged
merged 61 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6789e7f
Added class StatesDocument
fcanderson May 27, 2024
03b15d9
Update StatesDocument.cpp
fcanderson May 27, 2024
cc9954f
Create testStatesDocument.cpp
fcanderson May 28, 2024
21b1c81
Update StatesDocument.cpp
fcanderson May 29, 2024
bb99e94
Update StatesDocument.cpp
fcanderson May 29, 2024
0538766
Update testComponentInterface.cpp
fcanderson May 30, 2024
b799c0b
Update testStatesDocument.cpp
fcanderson May 30, 2024
03a6229
Update testStatesDocument.cpp
fcanderson May 30, 2024
368f123
Update StatesDocument.h
fcanderson May 31, 2024
9585d98
Update testStatesDocument.cpp
fcanderson May 31, 2024
7a76982
Update testStatesDocument.cpp
fcanderson May 31, 2024
3cf98fa
Removed trailing whitespace in StatesTrajectory.h
fcanderson May 31, 2024
842cca6
Update StatesTrajectory.h
fcanderson May 31, 2024
21699ed
Update StatesTrajectory.h
fcanderson Jun 1, 2024
dd18f4c
Update testStatesDocument.cpp
fcanderson Jun 1, 2024
651ffb9
Update testStatesDocument.cpp
fcanderson Jun 2, 2024
82a8b21
Update testStatesDocument.cpp
fcanderson Jun 3, 2024
b71cfa5
Update testStatesDocument.cpp
fcanderson Jun 6, 2024
902d8f2
Update testStatesDocument.cpp
fcanderson Jun 11, 2024
7851634
Merge branch 'opensim-org:main' into ostates_2
fcanderson Jun 26, 2024
a5f7cdc
Removed trailing whitespace from testStatesTrajectory.cpp
fcanderson Jun 26, 2024
15bc707
Altered testBoundsCheck()
fcanderson Jun 26, 2024
2233470
Minor: Added a missing space.
fcanderson Jun 27, 2024
aa45b9d
Added discrete variables to the test model.
fcanderson Jun 27, 2024
850e1c5
Revamped ExtendedPointToPointSpring
fcanderson Jul 1, 2024
820c04c
Reverted to a simpler ExtendedPointToPointSpring class.
fcanderson Jul 1, 2024
9e0424f
Discrete variables are now being altered during simulation
fcanderson Jul 2, 2024
a60bf8d
Added ability to set a note for a states document.
fcanderson Jul 7, 2024
8bf1166
Merge branch 'opensim-org:main' into ostates_2
fcanderson Aug 28, 2024
493d73d
Update testStatesDocument.cpp
fcanderson Aug 30, 2024
1489842
Update testStatesDocument.cpp
fcanderson Aug 31, 2024
467d910
Check that model names match
fcanderson Sep 1, 2024
a7eb16b
Update testStatesDocument.cpp
fcanderson Sep 1, 2024
bc46144
Update testStatesDocument.cpp
fcanderson Sep 2, 2024
231e27d
All checks passing.
fcanderson Sep 4, 2024
c8e9133
Removed old code
fcanderson Sep 4, 2024
8677256
Added read-only accessor for low-level state array
fcanderson Sep 4, 2024
3c87d77
Code cleanup and refinement
fcanderson Sep 4, 2024
d5f5341
Merge branch 'opensim-org:main' into ostates_2
fcanderson Sep 4, 2024
439db74
Minor code cleanup
fcanderson Sep 4, 2024
7c2b595
Update StatesTrajectory.h
fcanderson Sep 4, 2024
4f994e0
Fixed typo in StatesDocument.h
fcanderson Sep 4, 2024
054908b
Corrected some type compatibilities in StatesDocument.cpp
fcanderson Sep 4, 2024
12d7f09
Using std::string::c_str() for strings in SimTK_ASSERT macros
fcanderson Sep 4, 2024
4ce36dd
Update testStatesDocument.cpp
fcanderson Sep 4, 2024
5c2ba5f
Preventing auto generation of a default constructor
fcanderson Sep 4, 2024
f6662d6
Update StatesDocument.h
fcanderson Sep 25, 2024
354f81e
Merge branch 'opensim-org:main' into ostates_2
fcanderson Sep 25, 2024
e2a2337
Update testStatesDocument.cpp
fcanderson Sep 25, 2024
eb534f3
Add bindings for StatesDocument class
aymanhab Sep 30, 2024
0544275
Merge branch 'opensim-org:main' into ostates_2
fcanderson Oct 11, 2024
bd764f6
Reverted StatesTrajectory to use std::vector(SimTK::State)
fcanderson Oct 12, 2024
a09c2b3
Update StatesDocument.cpp
fcanderson Oct 12, 2024
998e5ad
Restored commented-out code in testStatesTrajectory.cpp
fcanderson Oct 13, 2024
4206e24
typo corrected
fcanderson Oct 14, 2024
515d333
Update StatesDocument.h
fcanderson Oct 14, 2024
32009c2
Update StatesTrajectoryReporter.cpp
fcanderson Oct 14, 2024
fa570c9
Update StatesTrajectoryReporter.h
fcanderson Oct 14, 2024
d093cb1
Update StatesDocument.cpp
fcanderson Oct 14, 2024
aba49bc
Update testStatesDocument.cpp
fcanderson Oct 14, 2024
8501fdd
Updated CHANGELOG.md to include the new StatesDocument class (#3902)
fcanderson Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Bindings/OpenSimHeaders_simulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
#include <OpenSim/Simulation/OpenSense/IMU.h>
#include <OpenSim/Simulation/OpenSense/OpenSenseUtilities.h>

#include <OpenSim/Simulation/StatesDocument.h>
#include <OpenSim/Simulation/StatesTrajectory.h>
#include <OpenSim/Simulation/StatesTrajectoryReporter.h>

Expand Down
1 change: 1 addition & 0 deletions Bindings/simulation.i
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ OpenSim::ModelComponentSet<OpenSim::Controller>;

%template(StdVectorIMUs) std::vector< OpenSim::IMU* >;

%include <OpenSim/Simulation/StatesDocument.h>
%include <OpenSim/Simulation/StatesTrajectory.h>
// This enables iterating using the getBetween() method.
%template(IteratorRangeStatesTrajectoryIterator)
Expand Down
6 changes: 4 additions & 2 deletions OpenSim/Common/Test/testComponentInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class Bar : public Component {
// and to access a dv that is not type double.
// The following calls put the mo and dv into the maps used to contain
// all mo's and dv's exposed in OpenSim. When Stage::Topology is
// realized, they will allocated in class Bar's override of
// realized, they will be allocated in class Bar's override of
// extendRealizeTopology(). See below.
bool allocate = false;
int maxFlagValue = 1;
Expand All @@ -401,6 +401,8 @@ class Bar : public Component {
// Manually allocate and update the index and subsystem for
// a discrete variable and a modeling option as though they were
// natively allocated in Simbody and brought into OpenSim.
// Note, as of May 2024, this is also what one would need to do in order
// to add a discrete variable that is a type other than double.
void extendRealizeTopology(SimTK::State& state) const override {
Super::extendRealizeTopology(state);

Expand Down Expand Up @@ -2057,7 +2059,7 @@ TEST_CASE("Component Interface State Trajectories")
}

// Create a new state trajectory (as though deserializing)
// newTraj must be must the expected size before any set calls.
// newTraj must be the expected size before any set calls.
SimTK::Array_<SimTK::State> newTraj;
for (int i = 0; i < nsteps; ++i) newTraj.emplace_back(s);
// state variables
Expand Down
Loading
Loading