Looking for Caresses
SoRo project to let Miro interact as a pet would do
 All Classes Functions Variables Pages
B_approach.h
1 #ifndef B_APPROACH_H
2 #define B_APPROACH_H
3 
4 #include <boost/circular_buffer.hpp>
5 #include "ros/ros.h"
6 #include "look_caresses_pkg/platform_sensors.h"
7 #include "look_caresses_pkg/platform_control.h"
8 
9 #define averageNum 20 // number of values to consider in the average for the sonar range
10 
11 class B_approach {
12 private:
13  int counter;
14  ros::NodeHandle nh;
15  ros::Publisher pubPlat;
16  ros::Subscriber subRange;
17  boost::circular_buffer<float> sonarMsgs; // to have more than 1 measure from the sonar
18 
19  void sonarCallback(const sensor_msgs::Range &sensor_range);
20  void unsubTopics();
21  void subTopics();
22 
23 public:
24  B_approach (ros::NodeHandle nh, ros::Publisher pubPlat);
25  int main ();
26 };
27 
28 #endif // B_APPROACH_H
int main()
main for approachin phase. MiRo goes straight until the sensor detect something (ideally the user han...
Definition: B_approach.cpp:56
B_approach(ros::NodeHandle nh, ros::Publisher pubPlat)
Costructor for phase B task.
Definition: B_approach.cpp:11