open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
244 stars 59 forks source link

Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning. #548

Open PVijayaGanesh opened 1 day ago

PVijayaGanesh commented 1 day ago

Before proceeding, is there an existing issue or discussion for this?

Description

Error/...

Bot : Real Turtlebot3 Distro: Humble

Running Nav2, client , server and RMF..

Getting this issue..

planning. [full_control-15] [ERROR] [1729862531.098979290] [turtlebot3_fleet_adapter]: Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning. [full_control-15] [ERROR] [1729862531.599059451] [turtlebot3_fleet_adapter]: Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning. [full_control-15] [ERROR] [1729862532.099110259] [turtlebot3_fleet_adapter]: Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning. [full_control-15] [ERROR] [1729862532.599304815] [turtlebot3_fleet_adapter]: Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning. [full_control-15] [ERROR] [1729862533.099170416] [turtlebot3_fleet_adapter]: Battery percentage reported by the robot is outside of the valid range [0,100] and hence the battery soc will not be updated. It is critical to update the battery soc with a valid battery percentage for task allocation planning.

ros2 topic echo /battery_state..

`header: stamp: sec: 1729862443 nanosec: 418551668 frame_id: base_link voltage: 8.673995018005371 temperature: 25.122230529785156 current: -5.0 charge: 149.38681030273438 capacity: 110.0 design_capacity: 150.0 percentage: 0.9900000095367432 power_supply_status: 2 power_supply_health: 1 power_supply_technology: 2 present: true cell_voltage:

Please help me

ode name: _NODE_NAMEUNKNOWN Node namespace: _NODE_NAMESPACEUNKNOWN Topic type: sensor_msgs/msg/BatteryState Endpoint type: PUBLISHER GID: 01.0f.d3.8e.d0.00.cc.ff.00.00.00.00.00.00.12.03.00.00.00.00.00.00.00.00 QoS profile: Reliability: RELIABLE History (Depth): UNKNOWN Durability: VOLATILE Lifespan: Infinite Deadline: Infinite Liveliness: AUTOMATIC Liveliness lease duration: Infinite

`ros2 node info /turtlebot3_node /turtlebot3_node Subscribers: /cmd_vel: geometry_msgs/msg/Twist /parameter_events: rcl_interfaces/msg/ParameterEvent Publishers: /battery_state: sensor_msgs/msg/BatteryState /imu: sensor_msgs/msg/Imu /joint_states: sensor_msgs/msg/JointState /magnetic_field: sensor_msgs/msg/MagneticField /parameter_events: rcl_interfaces/msg/ParameterEvent /rosout: rcl_interfaces/msg/Log /sensor_state: turtlebot3_msgs/msg/SensorState Service Servers: /motor_power: std_srvs/srv/SetBool /reset: std_srvs/srv/Trigger /sound: turtlebot3_msgs/srv/Sound /turtlebot3_node/describe_parameters: rcl_interfaces/srv/DescribeParameters /turtlebot3_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes /turtlebot3_node/get_parameters: rcl_interfaces/srv/GetParameters /turtlebot3_node/list_parameters: rcl_interfaces/srv/ListParameters /turtlebot3_node/set_parameters: rcl_interfaces/srv/SetParameters /turtlebot3_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically Service Clients: /turtlebot3_node/describe_parameters: rcl_interfaces/srv/DescribeParameters /turtlebot3_node/get_parameter_types: rcl_interfaces/srv/GetParameterTypes /turtlebot3_node/get_parameters: rcl_interfaces/srv/GetParameters /turtlebot3_node/list_parameters: rcl_interfaces/srv/ListParameters /turtlebot3_node/set_parameters: rcl_interfaces/srv/SetParameters /turtlebot3_node/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically Action Servers:

Action Clients:

`

xiyuoh commented 18 hours ago

Hello! To start off, may I check which fleet adapter you're running? Did you implement one with the latest fleet adapter template that uses the Easy Full Control API, or are you using the legacy full control fleet adapter?

Or perhaps you're using the free fleet adapters available that works with Nav2 clients, they are pretty outdated but there is an open PR that improves the implementation using the Easy Full Control API and zenoh bridge, you might want to check that out.

The next thing to check is whether your fleet adapter is using the correct API for battery state. From your topic echo it seems like percent is rightly within 0 to 100, but could it be possible you're using the another endpoint?

PVijayaGanesh commented 4 hours ago

Hi @xiyuoh ...

this is my custom data to the /batter_state..

ros2 topic echo /battery_state..

`header: stamp: sec: 1729862443 nanosec: 418551668 frame_id: base_link voltage: 8.673995018005371 temperature: 25.122230529785156 current: -5.0 charge: 149.38681030273438 capacity: 110.0 design_capacity: 150.0 percentage: 0.9900000095367432 power_supply_status: 2 power_supply_health: 1 power_supply_technology: 2 present: true cell_voltage:

8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 8.673995018005371 cell_temperature: 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 25.122230529785156 location: SIM-SLOT-1

But at the same time... the node ros2 node info /turtlebot3_node Publishes data to the /battery_state: sensor_msgs/msg/BatteryState .. Percentage value : 45.093489 like that..

How can i handle it..

Actually i doing like this please guide me @xiyuoh

1) I am bringing up my bot.. 2) launch Nav command with map (ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml) 3) started client and server ( robot is registered) 4) Launch rmf things.. which calling

 .. >rmf_demos)/include/adapters/turtlebot3_adapter.launch.xml
                    .. > <arg name="fleet_name" default="turtlebot3" description="Name of this fleet of turtlebot3 robots"/><!--fleet_nameをturtlebot3に修正-->
  <arg name="use_sim_time" default="true" description="Use the /clock topic for time to sync with simulation"/><!--use_sim_timeをtrueに修正-->
  <arg name="nav_graph_file" description="Nav graph required by fleet adapter"/>

  <group>
    <include file="$(find-pkg-share rmf_fleet_adapter)/fleet_adapter.launch.xml">

Please help me @xiyuoh how can i do openrmf on turtlebot3. My issues.. robot is not always coming on the RMF map and not accepting the task from panel..