Last active
July 25, 2018 14:27
-
-
Save KKostya/fbd07c6da5d6a7de6c2adda597014840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let make_twist_message v omega= | |
let open Geometry_msgs in | |
let mkvector x y z = { vector3_x = x; vector3_y = y; vector3_z = z } in | |
Twist { twist_linear = mkvector v 0 0 ; twist_angular = mkvector 0 0 omega } | |
let process_clock_message state = | |
match state.mode with | |
| Driving -> { state with outgoing = Some (make_twist_message 10000 0) } | |
| Turning -> begin | |
match state.direction with | |
| None | |
| Some ( CW ) -> { state with outgoing = Some (make_twist_message 0 10000) } | |
| Some (CCW ) -> { state with outgoing = Some (make_twist_message 0 (-10000))} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment