Page 1 of 1

Invalid Senario

Posted: Sat Jul 09, 2022 9:47 am
by amini_opensim
Hi

I am going to optimize polynomial coefficients. I define the controller as follows:

ConditionalController {
states = Swing
CompositeController {
type = FeedForwardController
symmetric = 1
Function {
type = Polynomial
target = ankle_angle_r
degree = 2
coefficient0 = ~1<-3,3>
coefficient1 = ~2<-2,2>

}
}
}

once to start running the scenario, the error " invalid scenario" comes up. And the following message is mentioned:

Warning, unused properties:
CmaOptimizer
SimulationObjective
OpenSimModel
Controllers
Controller
ConditionalControllers
ConditionalController
CompositeController
type = FeedForwardController *
symmetric = 1 *
Function
type = Polynomial *

And then these parameters will not be optimized. Would you please give me problems with this code?

Thanks

Re: Invalid Senario

Posted: Sat Jul 09, 2022 12:42 pm
by tgeijten
You should define the child controllers inside the CompositeController; for the correct syntax see also:

viewtopicPhpbb.php?f=1180&t=14689&p=42642&start=0&view=

Re: Invalid Senario

Posted: Sat Jul 09, 2022 1:20 pm
by amini_opensim
Hi Thomas

I've changed to this form:
Captursse.PNG
Captursse.PNG (17.87 KiB) Viewed 234 times
But it doesn't work. Would you please give me an exact true example for CompositeController that have a function?

Re: Invalid Senario

Posted: Mon Jul 11, 2022 4:11 am
by amini_opensim
Hi again
I edited the code to this form:

Controllers {
Controller {
type = GaitStateController
ConditionalControllers {
ConditionalController {
states = Swing
CompositeController {
FeedForwardController{
symmetric = 1
Function {
type = Polynomial
degree = 0
coefficient0 {
init_mean = 0.05
init_std = 0.01
min = 0.01
max = 1
}
}
}
}
}
}
}
}

This is OK. but I couldn't apply my own target (ankle_angle). If I write [target= ankle_angle] to the code, it will be invalid scenario. Would you please guide me how add my target to model to optimize controller?

Thanks