Project

General

Profile

Revision b00761a0

IDb00761a0e88f934a309a939b653d9f441b127ae8

Added by Alex Zirbel over 12 years ago

Updated ButtonControl and SonarControl.

Finally, the behavior compiles. Had to fix a lot of problems involving misunderstandings with Publisher/Client/ServiceServer/ServiceClient confusion.

We can now run priya_behavior as an executable, though the process for generating behavior executables still needs some work.

View differences:

scout/libscout/src/ButtonControl.h
35 35
 * @author Priyanka Deo
36 36
 * @author Leon Zhang
37 37
 **/
38

  
38 39
#include "buttons/button_event.h"
39 40
#include "constants.h"
40 41

  
......
44 45
class ButtonControl
45 46
{
46 47
    public:
47
        /** set up buttons node and prepare to communicate over ROS**/
48
        ButtonControl(const ros::NodeHandle& libscout_node);
49
        void event_button(const buttons::button_event::ConstPtr& msg);
48
        /** Set up buttons node and prepare to communicate over ROS */
49
        ButtonControl(const ros::NodeHandle& libscout_node,
50
                      std::string scoutname);
51

  
52
        void event_callback(const buttons::button_event::ConstPtr& msg);
50 53

  
51 54
        bool button1_is_pressed();
52 55
        bool button2_is_pressed();
......
55 58
        bool button1_value;
56 59
        bool button2_value;
57 60

  
58
        /* ROS node created in libscout.cpp */
59 61
        ros::NodeHandle node;
60 62

  
61 63
        /** ROS subscriber declaration */
62 64
        ros::Subscriber button_event_sub;
63
    
64
}
65
};
65 66

  
66 67
#endif

Also available in: Unified diff