1from morse.builder import * 2 3class @classname@(GroundRobot): 4 """ 5 A template robot model for @name@, with a motion controller and a pose sensor. 6 """ 7 def __init__(self, name = None, debug = True): 8 9 # @name@.blend is located in the data/robots directory 10 GroundRobot.__init__(self, '@env@/robots/@name@.blend', name) 11 self.properties(classpath = "@env@.robots.@name@.@classname@") 12 13 ################################### 14 # Actuators 15 ################################### 16 17 18 # (v,w) motion controller 19 # Check here the other available actuators: 20 # http://www.openrobots.org/morse/doc/stable/components_library.html#actuators 21 self.motion = MotionVW() 22 self.append(self.motion) 23 24 # Optionally allow to move the robot with the keyboard 25 if debug: 26 keyboard = Keyboard() 27 keyboard.properties(ControlType = 'Position') 28 self.append(keyboard) 29 30 ################################### 31 # Sensors 32 ################################### 33 34 self.pose = Pose() 35 self.append(self.pose) 36 37