Revision dd56aeef
ID | dd56aeefcc3c23a50cecd40450abfc1ac8e50f62 |
Added ncurses for key input. It can now publish at a rapid rate because
the key input is non-blocking, and after it exits the terminal is not
screwy, but it's not an ideal solution because ROS_INFO no longer works.
Encapsulated the stuff in nav_lib into a class, MikrokopterControl.
mikrokopter/src/nav_lib.h | ||
---|---|---|
1 | 1 |
#include "ros/ros.h" |
2 | 2 |
#include "mikrokopter/Control.h" |
3 | 3 |
|
4 |
void init_control_msg(mikrokopter::Control& req); |
|
5 |
void forward(mikrokopter::Control& req); |
|
6 |
void backward(mikrokopter::Control& req); |
|
7 |
void left(mikrokopter::Control& req); |
|
8 |
void right(mikrokopter::Control& req); |
|
9 |
void set_thrust(mikrokopter::Control& req, int thrust); |
|
10 |
|
|
4 |
class MikrokopterControl { |
|
5 |
public: |
|
6 |
MikrokopterControl(); |
|
7 |
void forward(); |
|
8 |
void backward(); |
|
9 |
void left(); |
|
10 |
void right(); |
|
11 |
void set_thrust(int thrust); |
|
12 |
void publish_on(ros::Publisher& pub); |
|
13 |
private: |
|
14 |
mikrokopter::Control control; |
|
15 |
}; |
Also available in: Unified diff