mirror of
https://github.com/wassname/pyrobolearn.git
synced 2026-09-09 11:31:38 +08:00
27 lines
501 B
Python
27 lines
501 B
Python
#!/usr/bin/env python
|
|
"""Load the Ballbot robot.
|
|
"""
|
|
|
|
from itertools import count
|
|
from pyrobolearn.simulators import BulletSim
|
|
from pyrobolearn.worlds import BasicWorld
|
|
from pyrobolearn.robots import Ballbot
|
|
|
|
# Create simulator
|
|
sim = BulletSim()
|
|
|
|
# create world
|
|
world = BasicWorld(sim)
|
|
|
|
# create robot
|
|
robot = Ballbot(sim)
|
|
|
|
# print information about the robot
|
|
robot.print_info()
|
|
|
|
for i in count():
|
|
# robot.set_joint_velocities([0, -1, 0])
|
|
|
|
# step in simulation
|
|
world.step(sleep_dt=1./240)
|