So it's totally feasible to generate quadrupedal locomotion using MOCO!
It converges to a walk at slow speeds, ambles at higher speeds (pictured), and that eventually morphs to a gallop (I think, I'm not too familiar with quadrupedal gait analysis). At some point I think I'll start a specific thread on here to discuss solver strategies for specific gait kinematics (i.e.: what if you want to force a longer or shorter step length, both for bipeds or quadrupeds?) but this was a hobby project for now (spent an afternoon building and tuning the model, and had the optimizer run overnight for different speeds).
This is a generic quadruped at a total mass of 45 kg (I envisioned a pretty big dog). Quasi-random initial guess (I think I set forward speed to the desired speed, pelvis height "about right" and maybe some imaginary pelvis translation as well).Smooth Sphere Half Space Force Parameters
- Pasha van Bijlert
- Posts: 224
- Joined: Sun May 10, 2020 3:15 am
- Nicholas Bianco
- Posts: 1025
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Smooth Sphere Half Space Force Parameters
Woah! This is awesome. For a day's work that is not bad at all. Could you share videos of the other speeds?
One question about this animation: it looks like the feet are sliding a little during contact. Do you know why that is? (It could be something to do with the visualization making it look off, not sure though).
One question about this animation: it looks like the feet are sliding a little during contact. Do you know why that is? (It could be something to do with the visualization making it look off, not sure though).
- Pasha van Bijlert
- Posts: 224
- Joined: Sun May 10, 2020 3:15 am
Re: Smooth Sphere Half Space Force Parameters
I'll make some more gifs later this week (this was a little hobby project of mine, a proof of concept that I can get quadrupedal coordinations).
When coding up the quadruped, I repurposed code from my T. rex model. For the contact force stiffness, I just divided my T. rex-tuned stiffness by 100 out of convenience. I think this led to too compliant contact spheres, 500000 (N/m?). I just went back to the 2D gait example, it's got a stiffness that is 6 times as high. What I think is happening is that the contacts are so compliant that I'm getting a lot of deformation in the contact spheres (which I don't think OpenSim visualizes?), so instead it looks like the spheres are piercing through the ground and sliding around. If I up the stiffness of the contacts, I think this should resolve itself. I suppose I should be able to add markers to the same location as the contact geometry, which would allow me to easily get their coordinates as a function of time? The contact forces do allow for sliding, though, right? I assumed this because there are friction terms in the formulation.One question about this animation: it looks like the feet are sliding a little during contact. Do you know why that is? (It could be something to do with the visualization making it look off, not sure though).
- Nicholas Bianco
- Posts: 1025
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Smooth Sphere Half Space Force Parameters
The spheres do allow sliding, and yes the friction component will resist sliding.
The low stiffness makes sense, since the foot will need to penetrate further into the ground to create the necessary contact forces. So in the visualization, the foot is still beneath the ground when it starts translating forward after "toe-ing off". Increasing the stiffness would probably produce something that looks more "normal".
The low stiffness makes sense, since the foot will need to penetrate further into the ground to create the necessary contact forces. So in the visualization, the foot is still beneath the ground when it starts translating forward after "toe-ing off". Increasing the stiffness would probably produce something that looks more "normal".