Changeset 18 for trunk/extremum_seeking/esc_nn/src/node_2d.cpp
- Timestamp:
- 01/03/13 15:27:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/extremum_seeking/esc_nn/src/node_2d.cpp
r5 r18 18 18 ros::NodeHandle n("~"); 19 19 20 double A, B, M, ddelta1, ddelta2, ddelta3, delta, period; 20 double A, B, M, ddelta1, ddelta2, ddelta3, delta, period,stoping_min_val; 21 int stopping_cycle_number; 21 22 if (!n.getParam("A", A)){ 22 23 ROS_WARN("[nn_esc_2d]: Failed to get the parameter A from the parameter server. Using the default value."); … … 52 53 } 53 54 55 if (!n.getParam("stopping_condition/cycle_number", stopping_cycle_number)){ 56 ROS_WARN("[nn_esc_1D]: Failed to get the parameter stopping_condition/cycle_number from the parameter server. Using the default value."); 57 stopping_cycle_number = 0; 58 } 59 60 if (!n.getParam("stopping_condition/min_val_change_per_cycle", stoping_min_val)){ 61 ROS_WARN("[nn_esc_1D]: Failed to get the parameter stopping_condition/min_val_change_per_cycle from the parameter server. Using the default value."); 62 stoping_min_val = 0; 63 } 64 54 65 ESCROS esc_ros(&n); 55 NNESC2D* nn_esc_2d = new NNESC2D(A,M,B,ddelta1,ddelta2,ddelta3,delta,period );66 NNESC2D* nn_esc_2d = new NNESC2D(A,M,B,ddelta1,ddelta2,ddelta3,delta,period,stopping_cycle_number,stoping_min_val); 56 67 esc_ros.init(nn_esc_2d); 57 68 esc_ros.spin();
Note: See TracChangeset
for help on using the changeset viewer.