Skip to content

Commit

Permalink
Update getting battery level from robot in Zenoh connection.- Get act…
Browse files Browse the repository at this point in the history
…ual battery level from robot- Use battery info from 'get_battery_info' method
  • Loading branch information
h-wata committed May 24, 2024
1 parent e060ebf commit 8408047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/connect_openrmf_by_zenoh.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ async def publish_pose(self) -> None:

async def publish_battery(self) -> None:
"""Publish the current robot battery to Zenoh."""
# TODO Get the actual battery level from the robot
battery = 0.8
battery_info = await self.run_method("get_battery_info")
battery = battery_info[0]
self.battery_pub.put(json.dumps(battery).encode(), encoding=zenoh.Encoding.APP_JSON())

async def publish_map_name(self) -> None:
Expand Down

0 comments on commit 8408047

Please sign in to comment.