Skip to content

Create 'Delay' Component #52

Open
Open
@jimmyDunne

Description

@jimmyDunne

Some topics for discussion:

  1. The dependsOnStage of an Operator shouldn't be "hard-coded" but should depend on the components it's wired up to.
  2. InputMeasure must be able to handle initialization when quantities depend on stages higher than Velocity. See Sherm's discussion in An output with a dependsOn stage above Velocity causes SimTK::TimeStepper::initialize to throw an exception #356.
  3. I'm using SimTK Testing.h which gives exception messages like "Submit a bug report to simbody." That's not the message we want from an OpenSim test.
  4. The requiredAt stage for the input should be Time, even if delaying a state variable (which only depends on Model). Otherwise, the quantity won't be delayed. So the requiredAt stage should be max(Time, connected output's dependsOn stage).
  5. Should Delay hold onto a MeasureIndex or a Measure handle?
  6. Should InputMeasure be a Measure::Result? or just a plain Measure?
  7. Are the names "input" and "output" for Delay's "input" and "output" okay? This component is so generic that it's not possible to come up with a really meaningful name. Maybe they should be numbered for an Operator? getInput("0")?
  8. Not able to make Delay a property of another component, since this copies the Delay and inputs and outputs aren't copied yet.
  9. Commented out tests will fail until we fix: (1) copying, de/serialization (2) flexible stages for Delay's input/output.
  10. Must fix Coordinate's outputs first (remove outputs for state variables).
  11. Put InputMeasure in its own header?

TODO

Once copying of inputs and outputs works:

  • Test using a Delay as a property
  • Test de/serialization (this test already exist in testOperators; simply uncomment).
  • Test copying (this test already exist in testOperators; simply uncomment).
  • Allow "flow-through" dependsOn stage / requiredAt stage.
  • Test variety of stages for the outputs (this test already exist in testOperators; simply uncomment).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions