Enabling and Disabling Constraints
Posted: Tue May 21, 2013 11:52 am
Hello,
I'm having a little problem with constraints. I have defined two ConstantSpeed (set at 0) constraints (to model brakes). The definitions are:
At some point in the simulation, I'd like to disable (and re-enable) these constraints. However, the disable() and enable() methods aren't working for some reason. The states I provide to these methods are obtained via updAdvancedState() from the Integrator (which is itself obtained through updIntegrator() from a TimeStepper). Any ideas on why I'm encountering this? I've also tried calling reinitialize up to the Instance stage on the integrator after the manipulation of the constraints; still no luck... Also, I don't know if this is relevant, but the constraints are updated both when the simulation is paused and during a simulation.
Any help would be appreciated. Thanks in advance.
Omar
I'm having a little problem with constraints. I have defined two ConstantSpeed (set at 0) constraints (to model brakes). The definitions are:
Code: Select all
upperConstraint = new Constraint::ConstantSpeed(*arm->getUpper()->getBody(), 0);
lowerConstraint = new Constraint::ConstantSpeed(*arm->getLower()->getBody(), 0);
Any help would be appreciated. Thanks in advance.
Omar