Skip to content

Instantly share code, notes, and snippets.

@jakewins
Created July 26, 2016 03:21
Show Gist options
  • Select an option

  • Save jakewins/12e5143d8adb76157b659bc0a6ea9904 to your computer and use it in GitHub Desktop.

Select an option

Save jakewins/12e5143d8adb76157b659bc0a6ea9904 to your computer and use it in GitHub Desktop.

Revisions

  1. jakewins created this gist Jul 26, 2016.
    25 changes: 25 additions & 0 deletions Sickle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    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')