engine-software/simulation/atlas/controllers/test/test.py
Aditya Vasantharao 824d10299e Add Atlas model
2021-06-06 16:30:49 -04:00

9 lines
303 B
Python

from controller import Supervisor
while True:
# all body names are found above in the body names list
body = Supervisor.getFromDef(body_name)
center_of_mass = body.getCenterOfMass()
print(center_of_mass)
# center_of_mass is a list with 3 values, the x y and z coord of the COM