Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. from robot_movement import calculate_linear_velocity as linear_mvmt
  2. import cv2
  3.  
  4. while 1:
  5.  
  6.     key = cv2.waitKey(50)
  7.     if key & 0xFF == ord('w'):
  8.         linear_mvmt(90)
  9.     elif key & 0xFF == ord('a'):
  10.         linear_mvmt(180)
  11.     elif key & 0xFF  == ord('d'):
  12.         linear_mvmt(0)
  13.     elif key & 0xFF  == ord('s'):
  14.         linear_mvmt(270)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement