SafeControllerService.cpp 1.45 KB
Newer Older
bucyril's avatar
bucyril committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//    Alternate controller that is expected to work.
//    Copyright (C) 2017  Cyrill Burgener, Marco Mueller, Philipp Friedli
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.

#include "ros/ros.h"
18
#include "d_fall_pps/RateController.h"
19
20
#include "d_fall_pps/ViconData.h"
#include "d_fall_pps/Setpoint.h"
21
#include "d_fall_pps/MotorControl.h"
22

23
bool calculateControlOutput(d_fall_pps::RateController::Request &request, d_fall_pps::RateController::Response &response) {
24
    ROS_INFO("calculate control output");
phfriedl's avatar
phfriedl committed
25
26
27
    //add safeController

    
28
}
bucyril's avatar
bucyril committed
29
30

int main(int argc, char* argv[]) {
31
32
33
34
    ros::init(argc, argv, "SafeControllerService");

    ros::NodeHandle nodeHandle("~");

35
    ros::ServiceServer service = nodeHandle.advertiseService("RateController", calculateControlOutput);
36
37
38
39
    ROS_INFO("SafeControllerService ready");
    ros::spin();

    return 0;
bucyril's avatar
bucyril committed
40
}