From 11ad48a39e35aacd2ccfdfee5968945dff324311 Mon Sep 17 00:00:00 2001 From: karthee-weston Date: Wed, 9 Oct 2024 14:42:58 +0800 Subject: [PATCH] ranger_base: updated RangerBase protocol for BMS and included exception for RangerMiniV2Base --- include/ugv_sdk/details/robot_base/ranger_base.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/ugv_sdk/details/robot_base/ranger_base.hpp b/include/ugv_sdk/details/robot_base/ranger_base.hpp index 34a16f7d..a95aaa96 100644 --- a/include/ugv_sdk/details/robot_base/ranger_base.hpp +++ b/include/ugv_sdk/details/robot_base/ranger_base.hpp @@ -97,7 +97,7 @@ class RangerBase : public AgilexBase, public RangerInterface { ranger_bms.bms_basic_state.current = common_sensor.bms_basic_state.current; ranger_bms.bms_basic_state.voltage = - common_sensor.bms_basic_state.voltage; + common_sensor.bms_basic_state.voltage * 0.1f; ranger_bms.bms_basic_state.battery_soc = common_sensor.bms_basic_state.battery_soc; ranger_bms.bms_basic_state.battery_soh = @@ -121,10 +121,9 @@ class RangerMiniV2Base : public RangerBase { ranger_bms.bms_basic_state.current = common_sensor.bms_basic_state.current; // Note: BMS CAN message definition is not consistent across AgileX robots. - // Robots with steering mechanism should additionally divide the voltage by - // 10. + // RM2 BMS voltage data follows unit: 0.01V ranger_bms.bms_basic_state.voltage = - common_sensor.bms_basic_state.voltage * 0.1f; + common_sensor.bms_basic_state.voltage * 0.01f; ranger_bms.bms_basic_state.battery_soc = common_sensor.bms_basic_state.battery_soc; ranger_bms.bms_basic_state.battery_soh =