mirror of
https://github.com/wassname/pyrobolearn.git
synced 2026-09-09 11:31:38 +08:00
27 lines
547 B
Python
27 lines
547 B
Python
#!/usr/bin/env python
|
|
"""Load the Kuka KR5 robotic industrial platform.
|
|
"""
|
|
|
|
from itertools import count
|
|
from pyrobolearn.simulators import BulletSim
|
|
from pyrobolearn.worlds import BasicWorld
|
|
from pyrobolearn.robots import KR5
|
|
|
|
# Create simulator
|
|
sim = BulletSim()
|
|
|
|
# create world
|
|
world = BasicWorld(sim)
|
|
|
|
# create robot
|
|
robot = KR5(sim)
|
|
|
|
# print information about the robot
|
|
robot.print_info()
|
|
# H = robot.get_mass_matrix()
|
|
# print("Inertia matrix: H(q) = {}".format(H))
|
|
|
|
for i in count():
|
|
# step in simulation
|
|
world.step(sleep_dt=1./240)
|