Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <esc_approx/approx_esc_2d.h>
00013 #include "esc_ros/esc_ros.h"
00014
00015 int main(int argc, char **argv) {
00016
00017 ros::init(argc, argv, "approx_esc_2d");
00018 ros::NodeHandle n("~");
00019
00020 int data_size, sampling;
00021 double k_grad, init_vel;
00022 if (!n.getParam("data_size", data_size)){
00023 ROS_WARN("[approx_esc_2d]: Failed to get the parameter data_size from the parameter server. Using the default value.");
00024 data_size = 0;
00025 }
00026 if (!n.getParam("sampling", sampling)){
00027 ROS_WARN("[approx_esc_2d]: Failed to get the parameter sampling from the parameter server. Using the default value.");
00028 sampling = 0;
00029 }
00030 if (!n.getParam("k_grad", k_grad)){
00031 ROS_WARN("[approx_esc_2d]: Failed to get the parameter k_grad from the parameter server. Using the default value.");
00032 k_grad = 0;
00033 }
00034 if (!n.getParam("init_vel", init_vel)){
00035 ROS_WARN("[approx_esc_2d]: Failed to get the parameter init_vel from the parameter server. Using the default value.");
00036 init_vel = 0;
00037 }
00038
00039 ESCROS esc_ros(&n);
00040 ApproxESC2D* approx_esc_2d = new ApproxESC2D(data_size,k_grad,init_vel,sampling);
00041 esc_ros.init(approx_esc_2d);
00042 esc_ros.spin();
00043
00044 return 0;
00045 }