i´m using webots and i have a robot. The point is that i want to see consumption's motors of the robot. I have seen this in documentation webots https://cyberbotics.com/doc/reference/motor#energy-consumption. I have actived this note, battery, and i have tried to see it like another field, for example position. But battery field always is 0. I dont know what I try next. I think the documents is a little poor.
In fact, I didnt have succes implementing this. Anyone know how to do this?
Thank you
The first thing to do is to sepcify 3 components in the 'battery' field of your robot node:
https://cyberbotics.com/doc/reference/robot#field-summary
Then from the controller, you should use the robot/battery API to enable the sensors and retrieve the battery state:
https://cyberbotics.com/doc/reference/robot#wb_robot_battery_sensor_enable
You can find an example of battery simulation available directly by default in Webots:
https://www.cyberbotics.com/doc/guide/samples-devices#battery-wbt