Revision d140fd71
ID | d140fd71ddd19ef38a0124cbbea1165874a5474d |
Added Sensors class that abstracts away sensors from behaviors. Stops creating
duplicated sensors for each scout.
scout/libscout/src/Behavior.h | ||
---|---|---|
50 | 50 |
#include "WirelessSender.h" |
51 | 51 |
#include "WirelessReceiver.h" |
52 | 52 |
#include "constants.h" |
53 |
#include "Sensors.h" |
|
53 | 54 |
|
54 | 55 |
typedef ros::Time Time; |
55 | 56 |
typedef ros::Duration Duration; |
... | ... | |
58 | 59 |
{ |
59 | 60 |
public: |
60 | 61 |
// Initializes ROS for behavior |
61 |
Behavior(std::string scoutname, std::string name); |
|
62 |
// name stands for behavior name |
|
63 |
Behavior(std::string scoutname, std::string name, |
|
64 |
Sensors * sensor); |
|
62 | 65 |
|
63 | 66 |
/// Extended by subclasses to actually run the behavior. |
64 | 67 |
virtual void run() = 0; |
65 | 68 |
|
66 | 69 |
// Name of behaviour |
67 | 70 |
std::string name; |
68 |
|
|
71 |
|
|
69 | 72 |
protected: |
70 | 73 |
ros::NodeHandle node; |
71 | 74 |
|
Also available in: Unified diff