Gravity not passed to physX

In several of the default examples, there’s a gravity vector in the yaml file of the task (e.g. anymal.yaml), but changing it (e.g. to have positive gravity) doesn’t actually affect the simulation.

Following into the python code, gravity is parsed in into sim_options (~line 390), which is then sent through parse_physx_config(sim_cfg["physx"], sim_options). In parse_physx_config, it seems to me that this is actually just thrown away…?

Found it, in, there is a function called set_sim_params_up_axis that overwrites whatever has been parsed for sim_params.gravity.

1 Like