SHARE
TWEET

Untitled

a guest Jul 21st, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Rover Functions Documentation
  2. The rover is using what is called a tank drive configuration.
  3. ## Movement
  4. ### Move Right or Left Track
  5. The most basic movement we have is to move the left and right treads forward or backwards at a speed
  6. ```c++
  7. rover_right_track(speed);
  8. rover_left_track(speed);
  9. ```
  10. Where *speed* is a floating point number in the range the range [-1,1]. 0.5 means 50% speed and -0.25 means 25% speed but backwards.
  11. ### Move Forward / Backward
  12. ```c++
  13. rover_drive(speed, time);
  14. ```
  15. Where *speed* is a floating point number in the range the range [-1,1]. 0.5 means 50% speed and -0.25 means 25% speed but backwards.
  16.  
  17. Where *time* is an integer number that describes the number of milliseconds (1000 milliseconds in 1 seconds) to do the action.
  18. ### Turning
  19. ```c++
  20. rover_rotate_clockwise(speed, time);
  21. rover_rotate_counter_clockwise(speed, time);
  22. ```
  23. Where *speed* is a floating point number in the range the range [-1,1]. 0.5 means 50% speed and -0.25 means 25% speed but backwards.
  24.  
  25. Where *time* is an integer number that describes the number of milliseconds (1000 milliseconds in 1 seconds) to do the action.
  26. ### Stop
  27. ```c++
  28. rover_stop();
  29. ```
  30. Takes no arguments and stops the rover from moving
  31. ## Other
  32. ### End Mission
  33. ```c++
  34. end_mission();
  35. ```
  36. This function should be the last line of code in the *loop* section. This function will stop the rover from moving and end the mission.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top