gazebo unreasonably slow with simple world and robot (on GPU PC)
Hello
goal
I aim to simulate a (somewhat) complex world with a very simple robot model.
problem
The real time factor drops to values between 0.1 and 0.01. This makes the simulation unusable. Furthermore, when doing basic movements such as turning the robot, the robot partly falls into the ground, is pushed back up, and tips over. This jumping behavior makes the simulation unrealistic and unusable.
When only simulation the world and not the robot, the real time factor is at 1. There are no problems, which also is to be expected in a static world. When only simulation the robot and not the world, the real time factor also is at 1. There are no constraints to driving. The described jumping does not occur.
the simulation
I use the following robot model: https://github.com/fieldrobot/field_r...
This is the world file: https://github.com/fieldrobot/field_r...
This is my launch file: https://github.com/fieldrobot/field_r...
This script spawns the robot model: https://github.com/fieldrobot/field_r...
The maize models, height map, textures, etc. can be found here: https://github.com/fieldrobot/field_r...
Everything and more is included in this package: https://github.com/fieldrobot/field_r...
what I have already tried & my thoughts
I already tried to optimize the world's physics parameters but did not achieve good results. Either the quality of the simulation decreases drastically (even more jumping), or the real time factor gets so low that I can not even check whether anything is working.
Tuning (as far as I understand each value) the robot parameters (friction, maxVel, etc.) also did not lead to significantly better results. The values in the robot model are not chosen according to a physical model. I just tried to make it work.
As you see in the world file, the world is entirely static. So the robot can not knock over maize plants. They just stay as they are. It would be best if the maize plants could be dynamic. But I made them static with the hope of increasing performance as the physics engine does not have to consider the interactions between the ground and the plants.
To me, it seems unlikely that such a 'simple' simulation can not perform better. After all, it is just ground with a few basic shapes.
Any help would be very much appreciated!
my system
- Compute Engine in the Google Compute Cloud with an Nvidia Tesla K80 GPU (connected via VirtualGL and TurboVNC)
- Ubuntu 20.04
- ROS2 Foxy Fitzroy, latest version via apt
- Gazebo 11, installed as a dependency via ROS2
I initially suspected that the remote system causes my problems. But I consider this unlikely now as the same effect can be observed on native local Ubuntu installations. Because my robot model currently does not use any lidars or cameras (disabled for testing), the GPU is only utilized by the gazebo UI but not the physics engine.