mirror of
https://github.com/wassname/pyrobolearn.git
synced 2026-09-09 11:31:38 +08:00
29 lines
549 B
Python
29 lines
549 B
Python
#!/usr/bin/env python
|
|
"""Load the Baxter robotic platform.
|
|
"""
|
|
|
|
from itertools import count
|
|
from pyrobolearn.simulators import BulletSim
|
|
from pyrobolearn.worlds import BasicWorld
|
|
from pyrobolearn.robots import Baxter
|
|
|
|
# Create simulator
|
|
sim = BulletSim()
|
|
|
|
# create world
|
|
world = BasicWorld(sim)
|
|
|
|
# create robot
|
|
robot = Baxter(sim)
|
|
|
|
# print information about the robot
|
|
robot.print_info()
|
|
|
|
# Position control using sliders
|
|
# robot.add_joint_slider()
|
|
|
|
# run simulator
|
|
for _ in count():
|
|
# robot.update_joint_slider()
|
|
world.step(sleep_dt=1./240)
|