add xarm, modify loadpanda to work with pybullet_robots module

This commit is contained in:
Erwin Coumans 2020-01-12 07:20:32 -08:00
parent fb15aea414
commit 84e2ea918c
3 changed files with 23 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import pybullet_data as pd
import math
import time
import numpy as np
import panda_sim
import pybullet_robots.panda.panda_sim as panda_sim
p.connect(p.GUI)
p.configureDebugVisualizer(p.COV_ENABLE_Y_AXIS_UP,1)
@ -18,4 +18,4 @@ while (1):
panda.step()
p.stepSimulation()
time.sleep(timeStep)

View File

@ -3,7 +3,7 @@ import pybullet_data as pd
import math
import time
import numpy as np
import panda_sim_grasp as panda_sim
import pybullet_robots.panda.panda_sim_grasp as panda_sim
#video requires ffmpeg available in path
createVideo=False

View File

@ -0,0 +1,20 @@
import pybullet as p
import pybullet_data as pd
import math
import time
import numpy as np
import pybullet_robots.xarm.xarm_sim as xarm_sim
p.connect(p.GUI)
p.setAdditionalSearchPath(pd.getDataPath())
timeStep=1./60.
p.setTimeStep(timeStep)
p.setGravity(0,0,-9.8)
xarm = xarm_sim.XArm6Sim(p,[0,0,0])
while (1):
xarm.step()
p.stepSimulation()
time.sleep(timeStep)