Skip to content

Commit

Permalink
ranger_base: updated RangerBase protocol for BMS and included excepti…
Browse files Browse the repository at this point in the history
…on for RangerMiniV2Base
  • Loading branch information
karthee-weston committed Oct 9, 2024
1 parent a63adad commit 11ad48a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/ugv_sdk/details/robot_base/ranger_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class RangerBase : public AgilexBase<ProtocolV2Parser>, 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 =
Expand All @@ -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 =
Expand Down

0 comments on commit 11ad48a

Please sign in to comment.