Skip to content

Instantly share code, notes, and snippets.

@jakewins
Created July 26, 2016 03:21
Show Gist options
  • Save jakewins/12e5143d8adb76157b659bc0a6ea9904 to your computer and use it in GitHub Desktop.
Save jakewins/12e5143d8adb76157b659bc0a6ea9904 to your computer and use it in GitHub Desktop.
from morse.builder import *
class Sickle(GroundRobot):
"""
A template robot model for kuka, with a motion controller and a pose sensor.
"""
def __init__(self, name = None, debug = True):
# kuka.blend is located in the data/robots directory
GroundRobot.__init__(self, 'mysim/data/mysim/robots/sickle.blend', name)
self.properties(classpath = "mysim.robots.sickle.Sickle")
# head
self.arm = Armature(armature_name = "Armature")
self.arm_pose = ArmaturePose()
self.arm_pose.name = "pose"
self.arm.append(self.arm_pose)
self.append(self.arm)
def add_interface(self, interface):
if interface == "socket":
self.arm.add_service('socket')
# TODO Use a joint state publisher thing that PR2 uses?
self.arm_pose.add_service('socket')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment