Search found 11 matches

by Niamh Gill
Tue Dec 13, 2016 10:35 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi Tom, Thanks for your help. I am now trying to include a ForceReporter in the script. I can manually create an .mot file and load it in the OpenSim gui, add Analysis and save the Forces. However, when I try this in Matlab is doesn't work - I just get the header information, but no data. I have tri...
by Niamh Gill
Mon Dec 12, 2016 3:44 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi Tom, If it is a fundamental issue, does that mean it was a fluke that the problem seems to be fixed in the model with just the knee? If the issue is the constraint, is the reason this method works with the dynamic walker because it has contact elements rather that constraints? In that if I includ...
by Niamh Gill
Tue Dec 06, 2016 9:12 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi Niamh, The problem is with your visualization script. ... Try replacing the "for" loop in OpenSimVisualizeFunction() with the following: numVar = opensimModel.getNumStateVariables(); for i = 0:1:numVar-1 CoordName = opensimModel.getStateVariableNames().get(i); opensimModel.setStateVariable(opens...
by Niamh Gill
Mon Nov 21, 2016 3:50 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

That's what I thought. But it seems that OpenSImPlantControlsFunction.m (or at least the code that I based off it - see attached) is ignoring the constraint. I am creating the model in a separate file and using the following to add the actuator. kneeActuator = CoordinateActuator('knee_rz') ; kneeAct...
by Niamh Gill
Fri Nov 18, 2016 6:17 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

The problem is using a PrescribedFunction means I will be forcing the coordinate to follow a certain trajectory. Whereas what I want to do is give the CoordinateActuator a function of angle. Which, to my understanding, is what happens with the OpenSimPlantControlsFunction in the DynamicWalker. Is th...
by Niamh Gill
Thu Nov 17, 2016 7:27 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi Tom, Thanks for your help. I am trying to "realize" the methods, but am getting an error. Is it possible my syntax is wrong? I assume I should call this twice, once when I initialize the states and again after i update the states? % code... osimState = osimModel.initSystem() ; osimModel.realizeAc...
by Niamh Gill
Wed Nov 16, 2016 10:36 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi James,

Is there a simple way to rebuild the system within this set up so that the constraint is being enforced? Or am I better off trying to create a customized controller?

Niamh
by Niamh Gill
Wed Nov 16, 2016 3:21 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi, Niamh- Your model doesn't have a controller. I don't think this is correct. Your code has a control function, that you are using to update the state, but that is not really how it works. The actuator has to have a OpenSim::Controller attached. Running fwd analysis with your model in the GUI, wi...
by Niamh Gill
Tue Nov 15, 2016 2:18 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

Re: CoordinateActuator and Constraint Violation

Hi Tom, Thanks for your reply. 1) I understand that the CoordinateActuator needs a controller. However, when running a forward simulation in OpenSim and changing the min_control and max_control properties there is still no change. For example, if I was to set both min_control and max_control to 1 I ...
by Niamh Gill
Wed Nov 09, 2016 11:14 am
Forum: OpenSim
Topic: CoordinateActuator and Constraint Violation
Replies: 21
Views: 3542

CoordinateActuator and Constraint Violation

Hi, I want to use the CoordinateActuator as a way of controlling the force at the knee, basically replacing a torsional spring with an actuator to allow more control over how much the knee flexes. I am running a forward dynamics simulation based on the method used in the Dynamic Walker Challenge. 1)...