Simulating closed loop structure in PyBullet
Posted: Thu Feb 21, 2019 9:49 pm
Hello
I am trying to load an SDF file into the pybullet environment. However, it comes up with the
"error: Cannot load SDF file."
My code is as follows:
import pybullet as p
import time
import pybullet_data
physicsClient = p.connect(p.GUI)
p.setAdditionalSearchPath(pybullet_data.getDataPath())
p.setGravity(0,0,-10)
planeId = p.loadSDF("plane_stadium.sdf")
boxId = p.loadSDF("free_loop.sdf")
for i in range (3000):
p.stepSimulation()
time.sleep(1./240.)
p.disconnect()
I have made sure that the files are in the correct directory.
The free_loop.sdf file has a closed loop structure ( wherein the links are connected in a loop)
I wonder, if it is not possible to load an SDF file into pybullet which has a closed structure (unlike the tree structure of URDF format)?
Is there any easy workaround to this? Any example would be appreciated.
Thank you!
I am trying to load an SDF file into the pybullet environment. However, it comes up with the
"error: Cannot load SDF file."
My code is as follows:
import pybullet as p
import time
import pybullet_data
physicsClient = p.connect(p.GUI)
p.setAdditionalSearchPath(pybullet_data.getDataPath())
p.setGravity(0,0,-10)
planeId = p.loadSDF("plane_stadium.sdf")
boxId = p.loadSDF("free_loop.sdf")
for i in range (3000):
p.stepSimulation()
time.sleep(1./240.)
p.disconnect()
I have made sure that the files are in the correct directory.
The free_loop.sdf file has a closed loop structure ( wherein the links are connected in a loop)
I wonder, if it is not possible to load an SDF file into pybullet which has a closed structure (unlike the tree structure of URDF format)?
Is there any easy workaround to this? Any example would be appreciated.
Thank you!