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

Support for Controllers in Moco #3605

Closed
nickbianco opened this issue Nov 10, 2023 · 1 comment
Closed

Support for Controllers in Moco #3605

nickbianco opened this issue Nov 10, 2023 · 1 comment
Assignees
Labels
Moco This label identifies bugs or desired features to aid Moco development

Comments

@nickbianco
Copy link
Member

Adding support for Controllers will require:

  1. Updating the logic in the solvers to allow other controller types (CasADi, tropter).
  2. For each controller, determine how model controls are added (or not added) to the OCP. For example, with a PrescribedController , a user might want the controller to solely provide the controls to the model.
  3. If all Controllers use addInControls to update the model controls, provide the option to create OCP controls on top of the Controller controls.
  4. Provide hooks for the SynergyController class (i.e., support Controllers with Inputs).
@nickbianco nickbianco added the Moco This label identifies bugs or desired features to aid Moco development label Nov 10, 2023
@nickbianco nickbianco self-assigned this Nov 10, 2023
@nickbianco
Copy link
Member Author

nickbianco commented Dec 13, 2023

I've encountered some obstacles while working on PR #3626. While I'm only trying to implement support for PrescribedController in that PR, I want it include a generic implementation that will support upcoming controller types (i.e., SynergyController). This includes controllers that have a list Input for wiring external controls from Moco into the model. However, recent changes to Controller fixing memory leaks using a custom copy construtor prevent me from using Inputs (which do not support custom copy constructors).

Fixing the Controller memory leak without a custom copy constructor means using Sockets to manage the list of Actuators for a particular controller. Unfortunately, OpenSim currently does not support list Sockets, which would be the ideal way to handle this solution. I could create an itermediate class with a Socket for an Actuator, but for the sake of not replacing hacky code with slightly-less-hacky code, I'm going to add support for list Sockets, especially since support for these seemed to be intended in the first place.

Down the rabbit hole we go...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Moco This label identifies bugs or desired features to aid Moco development
Projects
None yet
Development

No branches or pull requests

1 participant