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

CoordinateCouplerConstraint does not handle multiple independent coordinates properly #3435

Closed
nickbianco opened this issue Apr 4, 2023 · 2 comments
Assignees
Labels

Comments

@nickbianco
Copy link
Member

CoordinateCouplerConstraint should support multiple independent coordinates since the property independent_coordinate_names is a list property. However, the function that computes the coordinate coupling error only takes into account the first two coordinate in the total list of coordinate, whether or not they are independent or dependent:

double calcValue(const SimTK::Vector& x) const override {

@nickbianco nickbianco added the bug label Apr 4, 2023
@nickbianco nickbianco self-assigned this Apr 11, 2023
@bfregly
Copy link

bfregly commented Apr 12, 2023

We would like to be able to have two (or more!) independent coordinates as inputs to a coordinate coupler constraint as well. Please let us know when this capability is available. You will probably need to add the ability to handle a <coupled_coordinates_function> that is defined analytically, like sqrt(x^2/2+y^2/4) where dependent coordinate z is an analytical function of independent coordinates x and y.

@nickbianco
Copy link
Member Author

Hi @bfregly! CoordinateCouplerConstraint already has the property coupled_coordinates_function, which accepts any OpenSim::Function. There's no class to support generic expressions for coordinate functions, but perhaps we could add a class similar to ExpressionBasedBushingForce.

The fix we're working on should support any number of independent coordinates, as long as the Function supports those arguments and is defined up to the second derivative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants