mirror of
https://github.com/wassname/pyrobolearn.git
synced 2026-09-09 11:31:38 +08:00
update bridges and add bridge examples (speech/controller and robot)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user