|
9 | 9 | #ifndef ARC_BEHAVIOUR_MARKERDETECTORPS_H |
10 | 10 | #define ARC_BEHAVIOUR_MARKERDETECTORPS_H |
11 | 11 |
|
12 | | -namespace arc_behaviour { |
| 12 | +namespace arc_behaviour |
| 13 | +{ |
| 14 | + class DetectMarkerPS |
| 15 | + { |
| 16 | + private: |
| 17 | + /** |
| 18 | + * Collection of the markers found in given perceptual instance. |
| 19 | + */ |
| 20 | + marker_msgs::MarkerDetection found_markers; |
13 | 21 |
|
14 | | -class DetectMarkerPS { |
15 | | -private: |
16 | | - /** |
17 | | - * Collection of the markers found in given perceptual instance. |
18 | | - */ |
19 | | - marker_msgs::MarkerDetection found_markers; |
| 22 | + /** |
| 23 | + * Maximum range that we can detect markers from robots position. |
| 24 | + */ |
| 25 | + int max_range; |
20 | 26 |
|
21 | | - /** |
22 | | - * Maximum range that we can detect markers from robots position. |
23 | | - */ |
24 | | - int max_range; |
| 27 | + /** |
| 28 | + * Publish marker information, ie a simple boolean if markers are nearby. |
| 29 | + */ |
| 30 | + ros::Publisher marker_status_publisher; |
| 31 | + ros::Subscriber marker_detector_sub; |
25 | 32 |
|
26 | | - /** |
27 | | - * Publish marker information, ie a simple boolean if markers are nearby. |
28 | | - */ |
29 | | - ros::Publisher marker_status_publisher; |
30 | | - ros::Subscriber marker_detector_sub; |
| 33 | + //for public interface with ros |
| 34 | + ros::NodeHandle *global_handle; //the handler for this node. |
31 | 35 |
|
32 | | - //for public interface with ros |
33 | | - ros::NodeHandle *global_handle; //the handler for this node. |
| 36 | + //for private node material |
| 37 | + ros::NodeHandle local_handle; |
34 | 38 |
|
35 | | - //for private node material |
36 | | - ros::NodeHandle local_handle; |
| 39 | + //callbacks |
37 | 40 |
|
38 | | - //callbacks |
| 41 | + //update us with most recent stage information |
| 42 | + void process_detect_marker_cb(const marker_msgs::MarkerDetection &marker_info); |
| 43 | + public: |
| 44 | + /** |
| 45 | + * Setup the detector with all of the ros topic publishers. |
| 46 | + * @param handle : the node handle to setup with. |
| 47 | + */ |
| 48 | + DetectMarkerPS(); |
39 | 49 |
|
40 | | - //update us with most recent stage information |
41 | | - void process_detect_marker_cb(const marker_msgs::MarkerDetection marker_info); |
42 | | -public: |
43 | | - /** |
44 | | - * Setup the detector with all of the ros topic publishers. |
45 | | - * @param handle : the node handle to setup with. |
46 | | - */ |
47 | | - DetectMarkerPS(); |
| 50 | + /** |
| 51 | + * Check output from stage and prune markers to ones only within our maximum range. |
| 52 | + */ |
| 53 | + void ProcessStageFiducial(); |
48 | 54 |
|
49 | | - /** |
50 | | - * Check output from stage and prune markers to ones only within our maximum range. |
51 | | - */ |
52 | | - void ProcessStageFiducial(); |
| 55 | + /** |
| 56 | + * @return True if at least 1 marker is nearby. False otherwise. |
| 57 | + */ |
| 58 | + bool areMarkersNearby(); |
53 | 59 |
|
54 | | - /** |
55 | | - * @return True if at least 1 marker is nearby. False otherwise. |
56 | | - */ |
57 | | - bool areMarkersNearby(); |
| 60 | + void setMaxRange(int new_range); |
58 | 61 |
|
59 | | - void setMaxRange(int new_range); |
| 62 | + ros::NodeHandle *getNodeHandle(); |
60 | 63 |
|
61 | | - ros::NodeHandle *getNodeHandle(); |
62 | | - |
63 | | - /** |
64 | | - * Main loop. Publishes marker status information. |
65 | | - */ |
66 | | - void run(); |
67 | | -}; |
| 64 | + /** |
| 65 | + * Main loop. Publishes marker status information. |
| 66 | + */ |
| 67 | + void run(); |
| 68 | + }; |
68 | 69 | } |
69 | 70 |
|
70 | 71 | #endif //ARC_BEHAVIOUR_MARKERDETECTORPS_H |
0 commit comments