westonrobot / ugv_sdk

C++ SDK for Mobile Robot Platforms
Apache License 2.0
58 stars 87 forks source link

How can I get battery charging status? #42

Open jieunko opened 1 year ago

jieunko commented 1 year ago

Hi I am using AgileX tracer robot and I want to get battery status and charging info of the robot? Would it be possible? How should I achieve that status info? Thank you in advance!

splendidjie commented 1 month ago

I'm having the same problem. scout_mini_omni_demo.cpp sample code can run normally, so I added the following code:

auto SensorState = scout->GetCommonSensorState(); std::cout << "Battery information (power, health, voltage, current, temperature): " << SensorState.bms_basic_state.battery_soc1<< ", " << SensorState.bms_basic_state.battery_soh<< ", " << SensorState.bms_basic_state.voltage<< ", " << SensorState.bms_basic_state.current<< ", " << SensorState.bms_basic_state.temperature << std::endl;

The output shows: Battery information (power, health, voltage, current, temperature): , , 0, 0, 0 What's going on here?