diff --git a/include/ubiquity_motor/motor_message.h b/include/ubiquity_motor/motor_message.h index 2237d38..38d9edb 100644 --- a/include/ubiquity_motor/motor_message.h +++ b/include/ubiquity_motor/motor_message.h @@ -59,6 +59,7 @@ typedef boost::array RawMotorMessage; #define MIN_FW_WHEEL_NULL_ERROR 38 #define MIN_FW_PID_CONTROL_REV2 39 #define MIN_FW_DRIVE_TYPE 42 // Separated wheel type from drive type July 2021 +#define MIN_FW_SUGGESTED 43 // We suggest this as the firmware to use if fw is lower revision // It is CRITICAL that the values in the Registers enum remain in sync with Firmware register numbers. // In fact once a register is defined and released, it should NOT be re-used at a later time for another purpose diff --git a/src/motor_node.cc b/src/motor_node.cc index 303da9f..a825e83 100644 --- a/src/motor_node.cc +++ b/src/motor_node.cc @@ -230,6 +230,17 @@ void initMcbParameters(std::unique_ptr &robot ) mcbStatusPeriodSec.sleep(); } + // Suggest to customer to have current firmware version + if (robot->firmware_version < MIN_FW_SUGGESTED) { + ROS_ERROR_ONCE("Firmware is version V%d. We strongly recommend minimum firmware version of at least V%d", + robot->firmware_version, MIN_FW_SUGGESTED); + mcbStatusPeriodSec.sleep(); + } else { + ROS_INFO_ONCE("Firmware is version V%d. This meets the recommend minimum firmware versionof V%d", + robot->firmware_version, MIN_FW_SUGGESTED); + mcbStatusPeriodSec.sleep(); + } + // Certain 4WD robots rely on wheels to skid to reach final positions. // For such robots when loaded down the wheels can get in a state where they cannot skid. // This leads to motor overheating. This code below sacrifices accurate odometry which