Robot legs won't reach final position

Typically: "How do I... ", "How can I... " questions
Post Reply
Atsim80
Posts: 3
Joined: 03 Nov 2021, 21:14

Robot legs won't reach final position

Post by Atsim80 »

I am completely new to coppelia sim and I was trying to set up a simple quadruped which I imported from solidworks as an urdf file. The robot legs are set to the 0 deg servo configuration that I am using and my plan was to actuate it according to some IK values I've pre-computed. For some reason though no matter what change I make when I start the simulation the robot legs do not fully actuate to their final position designated in the script. They rotate around till they hit the ground but its almost as if they don't have enough torque to lift the robot the rest of the way to have it stand up. I've attached a picture for reference. I assumed it was maybe the motor joint torques were too low therefore I set the to extremely high values to test and still nothing. I have also updated the individual part weights to reflect the correct values but still no luck. Would appreciate any direction someone can point me in of what I should look at as I am out of ideas. In the attached picture you can see the issue as the lower leg almost just drags on the ground rather than spinning further to lift the robot to a standing pose. The joints are all set to torque/force mode. Thank you in advance!

Image of result from playing simulation:
https://drive.google.com/file/d/10tBxZd ... sp=sharing

simple starting code being used:
https://drive.google.com/file/d/1By2yKz ... sp=sharing

Image of intended pose, only achievable currently if platform is made static so it doesn't fall to the ground:
https://drive.google.com/file/d/17xBPII ... sp=sharing

Video of simulation:
https://drive.google.com/file/d/17X41pM ... sp=sharing

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Robot legs won't reach final position

Post by coppelia »

Hello,

it is difficult to see what is really going on. Best is to post your scene. There could be several issues, e.g.:
  • wrong joint limits
  • bad masses/inertias
  • bad controller
  • contact with other objects, also invisible
  • etc.
Cheers

Atsim80
Posts: 3
Joined: 03 Nov 2021, 21:14

Re: Robot legs won't reach final position

Post by Atsim80 »

Hi,

Thank you for the response. I have added my scene file. Any feedback on why I can't get the robot to stand fully would be really appreciated!

Scene file:
https://drive.google.com/file/d/1wEl_c1 ... sp=sharing

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Robot legs won't reach final position

Post by coppelia »

Hello,

it seems that you are using too small masses/inertias, and/or the difference between connected masses/inertias is too large. Select all 4*2 leg elements that are respondable, then increase their mass by 4x. Now it should work, but the robot would slide on the floor. Now try to increase the inertias of those 8 elements by 16x or so: stability should improve.
This will of course depend on the selected physics engine. Some are more or less tolerant (e.g. with Vortex or Newton, you don't even have to adjust the masses/inertias).
Make sure to carefully read this page, mainly the design considerations 7-8.

Cheers

Atsim80
Posts: 3
Joined: 03 Nov 2021, 21:14

Re: Robot legs won't reach final position

Post by Atsim80 »

Hi,

Thank you so much for the detailed response. I was able to get the robot to stand per the suggestions you had and switching engines made the difference in the robot sliding as well. Much appreciated!
I did have one conceptual question I wanted to ask for my own understanding. What was suggested regarding manipulating the inertias and masses is that a common trick? I computed the masses to represent the true masses of these objects as they would be in real life and then assigned max torques to the motors based on computations that they would be able to move items of such masses with ease. Is this mass/inertia manipulation an ok thing to do as far as the values no longer representing the actual real life values? I assume when other things movements/gaits are tried with the model down the road wouldn't the simulation no longer be valid where the robot would move in ways differing from the real life movements due to the mass/inertia modifications made to the simulation model?

Thank you!

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Robot legs won't reach final position

Post by coppelia »

The Bullet, ODE and Newton engines are often referred to as game engines, since they strike a balance between simulation fidelity, stability and computation speed. So it is quite common to have to adjust masses/inertias, specially if those values are very small, and/or the difference between connected masses/inertias is large (e.g. ratio of 1:10).

Cheers

Post Reply