31 #ifndef UBIQUITY_MOTOR_MOTOR_PARMETERS_H 32 #define UBIQUITY_MOTOR_MOTOR_PARMETERS_H 39 T value = default_val;
40 if (!nh.
getParam(parameter_name, value)) {
66 : pid_proportional(4000),
70 pid_denominator(1000),
71 pid_moving_buffer_size(10),
72 controller_board_version(49),
74 estop_pid_threshold(1500),
78 deadman_timer(2400000),
81 battery_voltage_multiplier(0.05057),
82 battery_voltage_offset(0.40948){};
85 : pid_proportional(4000),
89 pid_denominator(1000),
90 pid_moving_buffer_size(10),
91 controller_board_version(49),
93 estop_pid_threshold(1500),
97 deadman_timer(2400000),
100 battery_voltage_multiplier(0.05057),
101 battery_voltage_offset(0.40948)
105 nh,
"ubiquity_motor/pid_proportional", pid_proportional);
107 nh,
"ubiquity_motor/pid_integral", pid_integral);
109 nh,
"ubiquity_motor/pid_derivative", pid_derivative);
111 nh,
"ubiquity_motor/pid_velocity", pid_velocity);
113 nh,
"ubiquity_motor/pid_denominator", pid_denominator);
115 nh,
"ubiquity_motor/window_size", pid_moving_buffer_size);
117 nh,
"ubiquity_motor/controller_board_version", controller_board_version);
119 nh,
"ubiquity_motor/fw_estop_detection", estop_detection);
121 nh,
"ubiquity_motor/fw_estop_pid_threshold", estop_pid_threshold);
123 nh,
"ubiquity_motor/fw_max_speed_fwd", max_speed_fwd);
125 nh,
"ubiquity_motor/fw_max_speed_rev", max_speed_rev);
127 nh,
"ubiquity_motor/fw_max_pwm", max_pwm);
129 nh,
"ubiquity_motor/deadman_timer", deadman_timer);
131 nh,
"ubiquity_motor/deadzone_enable", deadzone_enable);
133 nh,
"ubiquity_motor/battery_voltage_offset", battery_voltage_offset);
135 nh,
"ubiquity_motor/battery_voltage_multiplier", battery_voltage_multiplier);
145 : serial_port(
"/dev/ttyS0"), baud_rate(9600) {};
148 : serial_port(
"/dev/ttyS0"), baud_rate(9600) {
151 nh,
"ubiquity_motor/serial_port", serial_port);
153 nh,
"ubiquity_motor/serial_baud", baud_rate);
165 nh,
"ubiquity_motor/controller_loop_rate", controller_loop_rate);
170 #endif // UBIQUITY_MOTOR_MOTOR_PARMETERS_H
double controller_loop_rate
float battery_voltage_offset
CommsParams(ros::NodeHandle nh)
int32_t pid_moving_buffer_size
FirmwareParams(ros::NodeHandle nh)
int32_t controller_board_version
bool getParam(const std::string &key, std::string &s) const
int32_t estop_pid_threshold
float battery_voltage_multiplier
T getParamOrDefault(ros::NodeHandle nh, std::string parameter_name, T default_val)
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const
NodeParams(ros::NodeHandle nh)