20 #include <cob_msgs/PowerState.h> 21 #include <cob_msgs/EmergencyStopState.h> 22 #include <std_msgs/Float64.h> 72 double voltage_raw = 0;
75 double current_raw = 0;
78 ROS_DEBUG(
"voltage_raw: %f", voltage_raw);
79 ROS_DEBUG(
"current_raw: %f", current_raw);
84 double max_counts = 693.0;
93 double count_min = 611;
94 double count_max = 450;
98 double current = v_min+(v_max - v_min)*(current_raw-count_min)/(count_max - count_min);
103 if (current > 0){charging =
true;}
104 else {charging =
false;}
108 percentage = std::min(percentage, 100.0);
cob_voltage_control_impl()
cob_msgs::PowerState out_pub_power_state_
cob_msgs::EmergencyStopState out_pub_em_stop_state_
std_msgs::Float64 out_pub_voltage_
std_msgs::Float64 out_pub_current_
void update(cob_voltage_control_data &data, cob_voltage_control_config config)