Skip to content

Instantly share code, notes, and snippets.

@PierrickKoch
Created November 11, 2011 04:56
Show Gist options
  • Save PierrickKoch/1357228 to your computer and use it in GitHub Desktop.
Save PierrickKoch/1357228 to your computer and use it in GitHub Desktop.
Morse Segway with motion controller
from morse.builder.morsebuilder import *
environment = 'indoors-1/indoor-1' # indoor
# in case you launche this script with a .blend file
if len(bpy.data.objects) > 0:
environment = None
# Append ATRV robot to the scene
robot = Robot('segwayrmp400')
# Append an actuator
motion = Actuator('v_omega')
motion.translate(z = 0.3)
robot.append(motion)
motion.properties(Class="VWDiffDriveActuatorClass", Path="morse/actuators/v_omega_diff_drive")
robot.properties(Class="SegwayRMP400PhysicsClass", Path="morse/robots/segwayrmp400")
robot.translate(z = 0.2)
# Configure the middlewares
motion.configure_mw('ros')
# Select the environement
env = Environment(environment)
env.aim_camera([1.0470, 0, 0.7854])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment