Open NielsHygum opened 3 years ago
Hey Niels, good question. Internally, Veranda uses the Box2D physics engine, which drove a lot of the decisions around what capabilities the tool has. Box2D is tuned such that it works best for base units of 1 meter, so I believe you are correct that density is 1/m^2. According to the Box2D documentation, density is used to calculate mass of the objects (as you might expect), which is used internally for the simulation.
Unfortunately, I can't speak to how exactly density affects objects in the simulation - Box2D has some strange idiosyncrasies when you use it to simulate a top-down environment like this. The goal of veranda was to provide a 'close-enough' simulation that ot could be used in an educational setting users could focus more on the path-planning, sensing, and object-detection aspects of projects.
Due to the way Box2d behaves in top-down simulations, density was exposed mainly so that users would be able to tune a robot so that it drives approximately how they want it to, not so that they could simulate the exact density/mass of different components, as that often does not handle as expected (especially in situations like the Ackermann steering)
The documentation of the units and parameters being used in the physics simulation is minimal. So I am a bit unsure what convention is being used.
In our case, we are simulating a robot with two fixed wheels where the wheels have the physics-relevant parameters: width, radius, and density. I do not know what units are being used so I assume that the length is dimensionless and that the friction coefficient and all other physics-related constants are 1? We have chosen to have width and radius in meter (SI). Does that mean that the density has units 1/m^2 (since Veranda is a 2D simulator)?