Getting position of object in pyBullet

Post Reply
Boris94
Posts: 6
Joined: Mon Nov 18, 2019 10:22 am

Getting position of object in pyBullet

Post by Boris94 »

i created simple basic example in pyBullet where i spawn 1 SDF model

Code: Select all

import pybullet as p
import time
import pybullet_data

physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-10)

planeId = p.loadURDF("plane.urdf")

boxId = p.loadSDF("imnenoh.sdf")

for i in range (10000):
    p.stepSimulation()
    time.sleep(1./240.)

p.disconnect()
This model is dropped into the world. Is there any way i could get its position after some time? lets say its dropped, it falls and then i get its new position
Post Reply