Skip to content

Instantly share code, notes, and snippets.

@PierrickKoch
Created February 27, 2012 05:29
Show Gist options
  • Select an option

  • Save PierrickKoch/1921669 to your computer and use it in GitHub Desktop.

Select an option

Save PierrickKoch/1921669 to your computer and use it in GitHub Desktop.
Morse Segway with motion controller v2
from morse.builder import *
# Add the Segway RMP 400
robot = Robot('segwayrmp400')
# Add a motion controler (v,w)
motion = Actuator('v_omega')
motion.name = 'cmd_vel'
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, x = 2)
# Remove the wheels for Bullet
#robot.remove_wheels() -> no need to call it here, see: Robot.__del__()
# Configure the middlewares
motion.configure_mw('ros')
# Select the environement
env = Environment('indoors-1/indoor-1')
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