update bridges and add bridge examples (speech/controller and robot)

This commit is contained in:
Brian Delhaisse
2019-06-22 03:23:09 +02:00
parent 7b876780fc
commit 1926238a64
22 changed files with 620 additions and 172 deletions
+8 -1
View File
@@ -19,6 +19,13 @@ Mapping of the keyboard interface:
- `ctrl + left arrow`: turn to the right
- `ctrl + right arrow`: turn to the left
- `space`: switch between first-person and third-person view
Mapping between the controller and the quadcopter:
- left joystick: use to move the quadcopter
- right joystick: use to ascend/descend and turn
- south button (X on PlayStation and A on Xbox): change between the first-person and third-person view.
- east button (circle on PlayStation and B on Xbox): increase the speed
- west button (square on PlayStation and X on Xbox): decrease the speed
"""
# import numpy as np
@@ -63,7 +70,7 @@ robot = prl.robots.Quadcopter(sim, position=[0., 0., 2.])
world.load_robot(robot)
# load interface that accepts input events
controller = Controller()
controller = Controller(use_thread=True, verbose=False)
# load bridge that connects the interface/controller with the quadcopter
# The bridge is the one that maps the input events from the interface to commands sent to the quadcopter