Hey guys!
Just wanted to drop a quick update and a big thank you for all the support. After diving into some simulations, I found out a couple of things that I was doing incorrectly. I'll post it here in case someone else also does the same.
To Ross
Yes, this paper is gold, thank you. It's on my to-do list to work that crank modelling you mentioned. First, I wanted to make sure all tools were working and that I understood all of them.
To Nick
I believe that constant expressions should work, but I've never directly verified it myself.
Turns out, the constant was innocent, my bad. You can see what I was doing wrong below and let me know if that was expected to happen or if is it like a "glitch" in Moco.
Torque is in Newton-meters (N-m)
I needed to confirm this because I'm wrestling with convergence issues. High values do not converge, but a value of 10N-m doesn't seem to make a difference (I thought it should, but I could be wrong). Got more tests in the pipeline before I circle back to this.
Issue alert
If the crank is allowed to have initial velocity, I wonder if the expression force is "taking the crank for a ride" here, where the actuator doesn't need to apply any force at all.
Nick's comment made me realize my initial speed wasn't starting at zero.
OLD) No go
I set the speed boundaries from -100 to 0 (negative to prevent backward movement). Then, I threw in setStateInfoPattern, expecting it to define the initial speed as well. Well, it doesn't.
Code: Select all
problem.setStateInfo('/jointset/crank_angle/crank_angle/speed',
[-100, 0],
[],
[]
)
problem.setStateInfoPattern('/jointset/.*/.*/speed', [], 0.0, [])
Moco showed me only [-100, 0] was set.
Code: Select all
/jointset/crank_angle/crank_angle/speed. bounds: [-100, 0]
NEW) It's a go
I changed it here:
Code: Select all
problem.setStateInfo('/jointset/crank_angle/crank_angle/speed',
[-100, 0],
0,
[]
)
problem.setStateInfoPattern('/jointset/.*/.*/speed', [], 0.0, [])
Now Moco starts with the right values.
Code: Select all
/jointset/crank_angle/crank_angle/speed. bounds: [-100, 0] initial: 0