ADVRHumanoids / centauro-simulator

CENTAURO model for simulation
10 stars 3 forks source link

Speed up the simulation #6

Open yangweiyou opened 6 years ago

yangweiyou commented 6 years ago

I noticed the setup of the physics engine in centauro.world is like below:

4000
  <max_step_size>0.00025</max_step_size>

So the real-time factor of Gazebo is small and the simulation is slow.

After decreasing the damping gain of the joint controller around 10 times in centauro.yaml (you can check in the branch yangwei_centauro of ADVR_shared), the ODE setup can be increased:

1000
  <max_step_size>0.001</max_step_size>

By doing this, the simulation can be around three times faster.

Is it okay to do this? Could we put this to master branch?

nkashiri commented 6 years ago

Would you please provide us with the time history of velocity of a few of joints e.g. one arm, for two sampling cases? Haven't you seen any significant difference in velocity reading quality?

mkamedula commented 6 years ago

Sure, if it works for you feel free to use it.

To update the master branch, we have to make sure it will be stable for all users no matter which simulator set-up they are using. We have been trying to manipulate this parameters before and we have always ended up going back to the smaller time step. Unless, there have been some gazebo update that improved the physics engine/contacts implementation, I am not sure what else could change to make the model stable.

To make an update could you first provide us

yangweiyou commented 6 years ago

I logged the joint velocity reading of front_left leg when full-body Centauro is stepping in place. The robot is under position control mode and the Gazebo version is 7.12.0.

Small time step (4000*0.00025)

small_time_step_0_25ms

Normal time step (1000*0.001)

![Uploading normal_time_step_1ms.jpeg…]()

The data with small time step is indeed smoother and fluctuates less. But their shapes are similar. For the wrist joints, their links have less mass and tend to fluctuate more. For locomotion, I may do simulation with normal time step for preliminary results first and use smaller time step to check carefully at the end.

yangweiyou commented 6 years ago

Normal time step (1000*0.001s)

normal_time_step_1ms

Something wrong happened when uploading the picture