turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
100 stars 45 forks source link

Charging the turtlebot with keeping it turned off #13

Closed aalghooneh closed 1 year ago

aalghooneh commented 2 years ago

Hi

I just had a general question, how can I charge the robot while keeping it turned-off?

I tried to turn it off and then putting it on dock, but as soon as I put in the dock, it turns on and the LiDAR starts turning.

Is there any way ?

thanks in advance

roni-kreinin commented 2 years ago

You can put the Create 3 into standby mode by pressing button 1 for 10 seconds (https://iroboteducation.github.io/create3_docs/hw/face/). Power will continue to be supplied to the RPI4 however, so if you want to turn that off too you will just need to unplug the USB-C cable.

alexswerner commented 2 years ago

Hi @roni-kreininm, thanks for the reply. Is there anything which could be done about how the Create3 managed the power? It is just a bit too unintuitive. For example, this morning i walked up to the robot in the dock and it was off (how that is possible is beyond me). Then pressing the button did not power it on. Once the robot triggered to boot by removing it from the base and putting it back, that battery status on the display said 0, but jumped to 17 once i pushed the robot against the dock. Maybe this is a mechanical issue?

This is clearly more a conveniece thing, but the current setup imho breaks with all expectations a user has about starting the robot and shutting it down. What would be nice:

We have plans to allow 24/7 remote access to this platform, for this it would be great if

It would also be a good idea to document how long it can run (standing/driving) and how long it takes to charge. Maybe that information is in the manual, but I did not find it.

For reference, this https://iroboteducation.github.io/create3_docs/hw/face/ page helped me a bit to understand what state the base is in.

roni-kreinin commented 2 years ago
alexswerner commented 2 years ago

Thanks a bunch for the compact information!

alexswerner commented 2 years ago

This problem persists: Robot is off, trigger booting by putting it one the base. It then starts charging for a couple of minutes as indicated by the charging light on the dock. After those minutes, the charging light is off and I think it is not charging any more because the pulsating red right status shows on the base. The /dock topic still reports that it is docked.

roni-kreinin commented 2 years ago

The charging light on the dock will usually turn off a few seconds after the robot is placed on the dock. The robot is still charging in this case. Can you echo the /battery_state topic and paste the output here?

alexswerner commented 2 years ago
$ ros2 topic echo /battery_state
header:
  stamp:
    sec: 1658261936
    nanosec: 872156039
  frame_id: ''
voltage: 14.22700023651123
temperature: 33.54999923706055
current: 0.10999999940395355
charge: 0.3790000081062317
capacity: 2.0480000972747803
design_capacity: 2.0480000972747803
percentage: 0.1899999976158142
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
---
alexswerner commented 2 years ago

And when I try to power down the robot this is what i get:

ubuntu@uwbot-01:~$ ros2 service call /robot_power irobot_create_msgs/srv/RobotPower 
waiting for service to become available...
requester: making request: irobot_create_msgs.srv.RobotPower_Request()

response:
irobot_create_msgs.srv.RobotPower_Response(success=False, message=''
roni-kreinin commented 2 years ago

The battery state shows a positive current of 0.11A which indicates it is charging, although very slowly. Do you have a high load running on the TurtleBot4? You can try stopping the turtlebot4 service by calling sudo systemctl stop turtlebot4 on the RPI4 to reduce some power consumption, or just unplug the RPI4 from the Create 3.

As for the service, I don't believe you can use that while it is docked. The RobotPower service is used to fully power off the robot, and having it on the dock will turn it back on again. Standby mode is the one that allows you to put the Create 3 in to low power while charging and currently can only be done by pressing button 1 for 10s.

alexswerner commented 2 years ago

Our turtlebot is not modified in any way. With the lidar stopped and being four hours on the dock I am getting this:

header:
  stamp:
    sec: 1658280617
    nanosec: 90882898
  frame_id: ''
voltage: 14.222999572753906
temperature: 34.75
current: -0.8600000143051147
charge: 0.8080000281333923
capacity: 2.0480000972747803
design_capacity: 2.0480000972747803
percentage: 0.38999998569488525
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
---

with

buntu@uwbot-01:~$ ros2 topic echo /dock
header:
  stamp:
    sec: 1658280790
    nanosec: 383711661
  frame_id: ''
dock_visible: false
is_docked: true

after running sudo systemctl stop turtlebot4 I get

...
current: -0.5429999828338623
...
alexswerner commented 2 years ago

And after a night in this state, the raspi has been power off by the base. The base reports this:

header:
  stamp:
    sec: 1658286101
    nanosec: 268273197
  frame_id: ''
voltage: 12.333000183105469
temperature: 32.75
current: -0.008999999612569809
charge: 0.0
capacity: 2.0480000972747803
design_capacity: 2.0480000972747803
percentage: 0.0
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
---

And

$ ros2 topic echo /dock         
header:
  stamp:
    sec: 1658319531
    nanosec: 385257829
  frame_id: ''
dock_visible: false
is_docked: true
roni-kreinin commented 2 years ago

Can you try removing the tray and pulling out the adapter board from the Create 3 and then see if it begins charging?

alexswerner commented 2 years ago

I will give this a try tomorrow

alexswerner commented 2 years ago

I removed the adapter board and put it back on the base. The red pulsing right status appeared and I left it on the base for two hours. Still red pulsing ring after that time. Seems that something is wrong with the Create 3 or the dock then. When I put adapter board back in and the robot on the dock I can see it starting and the base also connects via Wi-Fi. The Lidar also spins up right at start, but then stops. Probably because the base decides the battery level is too low to power the accessories. Indeed:

werner@docker:~$ ros2 topic echo /battery_state 
header:
  stamp:
    sec: 0
    nanosec: 0
  frame_id: ''
voltage: 0.0
temperature: 0.0
current: 0.0
charge: 0.0
capacity: 0.0
design_capacity: 0.0
percentage: 0.0
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: false
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
---

The manual says

If the battery self-protects, its internal management system may refuse to charge until it is reset. Resetting the battery is accomplished by removing the battery from the robot for at least fifteen minutes, at which point it should be reinstalled in the robot and the robot placed on the charger.

That might be the case. I'll try it next.

roni-kreinin commented 2 years ago

It's likely that the battery voltage did drop too low and caused it to self protect. The TurtleBot4 node will call the RobotPower service when it reaches below 12% battery for over a minute to avoid this issue. In your case, the robot was on the dock so the service did not work.

I would recommend trying a different outlet once you have reset the batteries and letting it charge fully without the RPI load connected.

alexswerner commented 2 years ago

I'm doing that right now. Things look much better already:

awerner@docker:~$ ros2 topic echo /battery_state 
header:
  stamp:
    sec: 1658421618
    nanosec: 76720850
  frame_id: ''
voltage: 13.338000297546387
temperature: 24.649999618530273
current: 1.0750000476837158
charge: 0.03099999949336052
capacity: 2.0480000972747803
design_capacity: 2.0480000972747803
percentage: 0.019999999552965164
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''

That is without adapter board and any accessories. Is this the charge current you would expect?

roni-kreinin commented 2 years ago

Yes, that looks much better.

alexswerner commented 2 years ago

Recently I left the robot outside the dock for too long, and it completely discharged the battery. Putting it onto the dock, the robot is again in the state where the battery is not charging. Now I know how to recovery from this, but resetting the battery pack. Is there a way to prevent this situation? IMHO the Create 3 app should automatically shut the robot down at e.g. 2% battery charge.

alexswerner commented 2 years ago

It gets even weirder. In the state described in the last post (Battery level 0%), we had a power outage. After that the robot started to charge and is now at 100%. This kind of disproves that the battery pack needed a reset to be able to charge again.

roni-kreinin commented 2 years ago

I will ask the iRobot team for some input. Is this problem happening with just one robot or have you seen this on multiple?

alexswerner commented 2 years ago

We have seen this issue (not charging any more) on one robot so far. But we avoided discharging the robots completely after this issue was createed. And with the knowledge that when turtlebot is on the base, the /battery_state topic is not to be trusted things are more consistent. Since battery state reporting via ros is inconsistent it is only the base/the adapter board which can react correctly to the battery reaching a critical level.

roni-kreinin commented 1 year ago

Closing as stale.