source: trunk/extremum_seeking/esc_ros/include/esc_ros/esc_ros.h @ 11

Last change on this file since 11 was 11, checked in by wcaarls, 12 years ago

Updated extremum_seeking to revision 1001

File size: 1.1 KB
Line 
1/*
2 * esc_ros.h
3 *
4 *  Created on: Jul 26, 2012
5 *      Author: Berk Calli, Wouter Caarls
6 *      Organization: Delft Biorobotics Lab., Delft University of Technology
7 *              Contact info: b.calli@tudelft.nl, web: www.dbl.tudelft.nl
8 *
9 *      Header of the ROS wrapper for extremum seeking control nodes.
10 */
11
12#ifndef ESC_ROS_H_
13#define ESC_ROS_H_
14
15#include <ros/ros.h>
16#include <std_msgs/Float32.h>
17#include <std_msgs/Float32MultiArray.h>
18#include <esc_common/esc.h>
19#include <string>
20#include <esc_ros/Monitors.h>
21#include <esc_ros/StateValue.h>
22
23class ESCROS{
24protected:
25        ESC* esc_;
26        ros::Publisher pub_ref_, pub_monitor_;
27        ros::Subscriber sub_obj_val_;
28        ros::NodeHandle* n_;
29        double obj_val_;
30        std::vector<double> state_vec_;
31        bool initialized_, monitor_, first_obj_val_received_;
32        double period_;
33
34public:
35        ESCROS(ros::NodeHandle* n=NULL);
36        virtual void init(ESC* esc);
37        virtual void step();
38        virtual void spin();
39        virtual ~ESCROS(){};
40protected:
41        virtual void objValCallback(std_msgs::Float32 msg);
42        virtual void objValWithStateCallback(esc_ros::StateValue msg);
43
44};
45
46
47
48
49#endif /* ESC_ROS_H_ */
Note: See TracBrowser for help on using the repository browser.