For coursework of group 3 in SOFT564Z
Dependencies: Motordriver ros_lib_kinetic
Motors.hpp@6:3872858b7844, 2019-12-05 (annotated)
- Committer:
- firnenenrif
- Date:
- Thu Dec 05 12:56:34 2019 +0000
- Revision:
- 6:3872858b7844
- Parent:
- 4:8afc50a3e4ac
- Child:
- 12:82b8fe254222
Added velocity control
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jonathan738 | 4:8afc50a3e4ac | 1 | #include "mbed.h" |
Jonathan738 | 4:8afc50a3e4ac | 2 | #include "General.hpp" |
Jonathan738 | 4:8afc50a3e4ac | 3 | #include "ros.h" |
Jonathan738 | 4:8afc50a3e4ac | 4 | #include "rtos.h" |
Jonathan738 | 4:8afc50a3e4ac | 5 | #include "ROS_Handler.hpp" |
Jonathan738 | 4:8afc50a3e4ac | 6 | #include <motordriver.h> |
Jonathan738 | 4:8afc50a3e4ac | 7 | #include "math.h" |
Jonathan738 | 4:8afc50a3e4ac | 8 | #include "Battery_Monitor.hpp" |
Jonathan738 | 4:8afc50a3e4ac | 9 | #include "Pins.h" |
Jonathan738 | 0:3dfee562823a | 10 | |
Jonathan738 | 0:3dfee562823a | 11 | #ifndef Define_ONCE_Motors |
Jonathan738 | 0:3dfee562823a | 12 | #define Define_ONCE_Motors |
Jonathan738 | 0:3dfee562823a | 13 | |
Jonathan738 | 0:3dfee562823a | 14 | void initialize(); |
Jonathan738 | 0:3dfee562823a | 15 | void move(const std_msgs::Int32& input); |
Jonathan738 | 0:3dfee562823a | 16 | void rotate(const std_msgs::Int32& input); |
Jonathan738 | 0:3dfee562823a | 17 | void tempMove(float distance); |
Jonathan738 | 0:3dfee562823a | 18 | void tempRotate(float degrees); |
Jonathan738 | 0:3dfee562823a | 19 | void driveMotors(void); |
Jonathan738 | 0:3dfee562823a | 20 | void callbackA(void); |
Jonathan738 | 0:3dfee562823a | 21 | void callbackB(void); |
firnenenrif | 6:3872858b7844 | 22 | void cmdvelresponse(const std_msgs::Int32MultiArray& vinput); |
Jonathan738 | 0:3dfee562823a | 23 | |
Jonathan738 | 0:3dfee562823a | 24 | #endif |