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

Fix types for methods in BufferedOrientationReference #3644

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
4 changes: 4 additions & 0 deletions Bindings/Python/tests/test_opensense.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def test_createObjects(self):
constraint_var = .0001
ikSolver = osim.InverseKinematicsSolver(model, mRefs, oRefs, coordinateReferences, constraint_var)
print("Created InverseKinematicsSolver object..")
oRefs = osim.BufferedOrientationsReference()
print("Created BufferedOrientationsReference object..")
ikSolver = osim.InverseKinematicsSolver(model, mRefs, oRefs, coordinateReferences, constraint_var)
print("Created InverseKinematicsSolver object with BufferedOrientationsReference..")

def test_vector_rowvector(self):
print()
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ and `Blankevoort1991Ligament`, usages of `get_GeometryPath`, `upd_GeometryPath`,
- Exposed simbody methods to obtain GravityForces, MobilityForces and BodyForces (#3490)
- Simbody was updated such that the headers it transitively exposes to downstream projects are compatible with C++20 (#3619)
- Moved speed computation from `computeForce` in children of `ScalarActuator` to dedicated `getSpeed` function.
- Fix type problem with BufferedOrientationReference (Issue #3415, PR #3644)


v4.4.1
Expand Down
8 changes: 4 additions & 4 deletions OpenSim/Simulation/BufferedOrientationsReference.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace OpenSim {
//=============================================================================
/**
* Subclass of OrientationsReference that handles live data by providing a DataQueue
* that allows clients to push data into and allows the InverseKinematicsSolver to
* that allows clients to push data into and allows the InverseKinematicsSolver to
* draw data from for solving.
* Ideally this would be templatized, allowing for all Reference classes to leverage it.
*
Expand Down Expand Up @@ -79,19 +79,19 @@ class OSIMSIMULATION_API BufferedOrientationsReference
SimTK::Array_<SimTK::Rotation_<double>>& values) const override;

/** add passed in values to data procesing Queue */
void putValues(double time, const SimTK::RowVector_<SimTK::Rotation>& dataRow);
void putValues(double time, const SimTK::RowVector_<SimTK::Rotation_<double>>& dataRow);

double getNextValuesAndTime(
SimTK::Array_<SimTK::Rotation_<double>>& values) override;

virtual bool hasNext() const override { return !_finished; };

void setFinished(bool finished) {
void setFinished(bool finished) {
_finished = finished;
};
private:
// Use a specialized data structure for holding the orientation data
mutable DataQueue_<SimTK::Rotation> _orientationDataQueue;
mutable DataQueue_<SimTK::Rotation_<double>> _orientationDataQueue;
bool _finished{false};
//=============================================================================
}; // END of class BufferedOrientationsReference
Expand Down