NVlabs / DiffRL

[ICLR 2022] Accelerated Policy Learning with Parallel Differentiable Simulation
https://short-horizon-actor-critic.github.io/
Other
263 stars 43 forks source link

what should I do to set z-axis up #3

Open zhuyijie88 opened 2 years ago

zhuyijie88 commented 2 years ago

Now that the released code is y-axis up, I want to set z-axis up in simulation. I set contact normal vector to (0,0,1) rather than (0,1,0), and gravity as (0, 0, -9.8). Also, I replace the expression vyny with vznz, vy with vz, ny with nz, etc, mainly in files sim.py and model.py. However, the result dynamics is not the same as the original setting. What more should I do?

ViktorM commented 2 years ago

Hi @zhuyijie88,

By default, z-up is not supported by dflex and you need to modify sim and model code. I think you chose the correct approach, but some small detail is still missing. Could you provide some more info about the change in dynamics you observed?

zhuyijie88 commented 2 years ago

Hi @zhuyijie88,

By default, z-up is not supported by dflex and you need to modify sim and model code. I think you chose the correct approach, but some small detail is still missing. Could you provide some more info about the change in dynamics you observed?

  • @mmacklin for visibility to support z-up in Warp by default together with y-up.

the robot (a dog) is floating in the simualtion space, with a plane below. It floats up slowly and changes orientation of body. The fllowing is the main file I modified. sim.txt