Posted by @PVijayaGanesh:
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:
- 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
`
Please help me
ode name: NODE_NAME_UNKNOWN
Node namespace: NODE_NAMESPACE_UNKNOWN
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:
`
Edited by @PVijayaGanesh at 2024-10-25T14:19:02Z
Posted by @xiyuoh:
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?
Posted by @PVijayaGanesh:
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
- I am bringing up my bot..
- launch Nav command with map (ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml)
- started client and server ( robot is registered)
- Launch rmf things.. which calling
```
.. >rmf_demos)/include/adapters/turtlebot3_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..
Edited by @PVijayaGanesh at 2024-10-26T13:34:13Z
Posted by @xiyuoh:
Hello @PVijayaGanesh , I converted the issue into a discussion ticket instead as it sounds like this requires more of a setup clarification instead of a bug fix.
Launch rmf things.. which calling
.. >rmf_demos)/include/adapters/turtlebot3_adapter.launch.xml
.. >
I’m a little confused about where you’re getting the turtlebot3_adapter.launch.xml
. I see that you have rmf_demos
embedded among your “rmf things”, but we do not provide a turtlebot3 launch file in rmf_demos. Could you kindly provide a link to the github file?
If it is your own implemented adapter and launch file modified from rmf_demos, could you provide more information, such as your fleet adapter code? I’d need those to better understand how you’re currently setting up RMF to identify where the issue comes from.
how can i do openrmf on turtlebot3.
You might like to check out this PR since you’re using a Turtlebot 3. Note that it is a work in progress but you may want to test it out for your use case.
Lastly, it would also help to enclose your ros2 topic echo
and any other data in a code block or gist (then provide the link to it) in the future for clarity. Thanks!
Posted by @PVijayaGanesh:
Hi @xiyuoh Thanks for guiding me
sorry for confused you i added that turtlebot3_adapter.launch.xml file at that path…
My adapter file will look like this.. I followed the same process in simulation every thing is working fine,. it was accepting task through panel..
when i connect the things to real robot it is saying above issue..
fleet name is turltebot3 ,..
`<?xml version='1.0' ?>
<!-- The name and control type of the fleet -->
<arg name="fleet_name" value="$(var fleet_name)"/>
<arg name="control_type" value="full_control"/>
<!-- The graph that this fleet should use for navigation -->
<arg name="nav_graph_file" value="$(var nav_graph_file)" />
<!-- The nominal linear and angular velocity of this fleet's vehicles -->
<arg name="linear_velocity" value="0.15"/>
<arg name="angular_velocity" value="0.75"/>
<!-- The nominal linear and angular acceleration of this fleet's vehicles -->
<arg name="linear_acceleration" value="0.1"/>
<arg name="angular_acceleration" value="0.1"/>
<!-- The radius of the circular footprint of this fleet's vehicles -->
<arg name="footprint_radius" value="0.105"/>
<!-- Other robots are not allowed within this radius -->
<arg name="vicinity_radius" value="0.15"/>
<!-- Whether to use sim time -->
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<!-- How long it can be delayed before we give up and start over -->
<arg name="delay_threshold" value="15.0"/>
<!-- Don't make the tinyRobot wait long to retry -->
<arg name="retry_wait" value="10.0"/>
<!-- Give everything time to discover -->
<arg name="discovery_timeout" value="60.0"/>
<!-- Can the robot drive backwards -->
<arg name="reversible" value="true"/>
<!-- Whether it can perform deliveries -->
<arg name="perform_deliveries" value="false"/>
<!-- Whether it can perform loop -->
<arg name="perform_loop" value="true"/>
<!-- Whether it can perform cleaning -->
<arg name="perform_cleaning" value="false"/>
<!-- What the robot should do once it finishes its tasks -->
<arg name="finishing_request" value="nothing"/>
<!-- TODO Update these values with actual specs -->
<!-- Battery parameters -->
<arg name="battery_voltage" value="11.1"/>
<arg name="battery_capacity" value="19.98"/>
<arg name="battery_charging_current" value="1.0"/>
<!-- Physical parameters -->
<arg name="mass" value="1.0"/>
<arg name="inertia" value="0.0055"/>
<arg name="friction_coefficient" value="0.22"/>
<!-- Power systems -->
<arg name="ambient_power_drain" value="20.0"/>
<arg name="tool_power_drain" value="0.0"/>
<!-- Whether to consider battery drain for task planning -->
<arg name="drain_battery" value="true"/>
<!-- Battery level at which the robot ceases to operate -->
<arg name="recharge_threshold" value="0.1"/>
</include>
`
Posted by @xiyuoh:
Thanks for sharing this. A few things:
- Could you provide the full launch file? Right now I only see arguments.
- Can I also check, did you modify your launch file from this tinyRobot mock traffic light launch file?
If yes, may I verify that you’re trying to implement a traffic light fleet adapter as opposed to a full control one? The difference is documented here.
- Can you clearly describe the issue you’re facing when moving from simulation to hardware? I.e. cannot connect to real robot, robot is not added to fleet, navigation graph cannot be loaded, map does not sync, or something else? If possible do provide some logs in a gist.
Posted by @PVijayaGanesh:
Hi @xiyuoh
My issue is…
when i bringup the bot . I got the data in /batter_state is..
header:
stamp:
sec: 1730095546
nanosec: 91025967
frame_id: ‘’
voltage: 11.869999885559082
temperature: 0.0
current: 0.0
charge: 0.0
capacity: 0.0
design_capacity: 1.7999999523162842
percentage: 76.11000061035156
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage:
cell_temperature:
location: ‘’
serial_number: ‘’
But i am parallely publishing data to the /battery_state percentage: 0.95…
I am thinking due to above percentage: 76.1100006 the robot not taking the task…
<?xml version='1.0' ?>
Edited by @PVijayaGanesh at 2024-10-28T06:24:35Z
Posted by @PVijayaGanesh:
This is my launch file
<?xml version='1.0' ?>
<launch>
<arg name="use_sim_time" default="false"/>
<arg name="failover_mode" default="false"/>
<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/common.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="viz_config_file" value ="$(find-pkg-share rmf_demos)/include/capg/capg.rviz"/>
<arg name="config_file" value="$(find-pkg-share rmf_demos_maps)/capg/capg.building.yaml"/>
<arg name="dashboard_config_file" value="$(find-pkg-share rmf_demos_dashboard_resources)/office/dashboard_config.json"/>
</include>
<group>
<let name="fleet_name" value="turtlebot3" />
<include file="$(find-pkg-share rmf_demos)/include/adapters/turtlebot3_adapter.launch.xml">
<arg name="fleet_name" value="$(var fleet_name)" />
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="nav_graph_file" value="$(find-pkg-share rmf_demos_maps)/maps/capg/nav_graphs/0.yaml" />
</include>
<include file="$(find-pkg-share rmf_fleet_adapter)/robot_state_aggregator.launch.xml">
<arg name="robot_prefix" value="ros2_tb3_0"/>
<arg name="fleet_name" value="$(var fleet_name)" />
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="failover_mode" value="$(var failover_mode)" />
</include>
</group>
</launch>
Edited by @PVijayaGanesh at 2024-10-28T06:25:08Z
Posted by @luca-della-vedova:
Hi @PVijayaGanesh
We need to see the content of turtlebot3_adapter.launch.xml
or we won’t be able to help you.
Posted by @PVijayaGanesh:
Hi i previously shared.. Again i am sharing..
<?xml version='1.0' ?>
<launch>
<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">
<!-- The name and control type of the fleet -->
<arg name="fleet_name" value="$(var fleet_name)"/>
<arg name="control_type" value="full_control"/>
<!-- The graph that this fleet should use for navigation -->
<arg name="nav_graph_file" value="$(var nav_graph_file)" />
<!-- The nominal linear and angular velocity of this fleet's vehicles -->
<arg name="linear_velocity" value="0.15"/>
<arg name="angular_velocity" value="0.75"/>
<!-- The nominal linear and angular acceleration of this fleet's vehicles -->
<arg name="linear_acceleration" value="0.1"/>
<arg name="angular_acceleration" value="0.1"/>
<!-- The radius of the circular footprint of this fleet's vehicles -->
<arg name="footprint_radius" value="0.105"/>
<!-- Other robots are not allowed within this radius -->
<arg name="vicinity_radius" value="0.15"/>
<!-- Whether to use sim time -->
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<!-- How long it can be delayed before we give up and start over -->
<arg name="delay_threshold" value="15.0"/>
<!-- Don't make the tinyRobot wait long to retry -->
<arg name="retry_wait" value="10.0"/>
<!-- Give everything time to discover -->
<arg name="discovery_timeout" value="60.0"/>
<!-- Can the robot drive backwards -->
<arg name="reversible" value="true"/>
<!-- Whether it can perform deliveries -->
<arg name="perform_deliveries" value="false"/>
<!-- Whether it can perform loop -->
<arg name="perform_loop" value="true"/>
<!-- Whether it can perform cleaning -->
<arg name="perform_cleaning" value="false"/>
<!-- What the robot should do once it finishes its tasks -->
<arg name="finishing_request" value="nothing"/>
<!-- TODO Update these values with actual specs -->
<!-- Battery parameters -->
<arg name="battery_voltage" value="11.1"/>
<arg name="battery_capacity" value="19.98"/>
<arg name="battery_charging_current" value="1.0"/>
<!-- Physical parameters -->
<arg name="mass" value="1.0"/>
<arg name="inertia" value="0.0055"/>
<arg name="friction_coefficient" value="0.22"/>
<!-- Power systems -->
<arg name="ambient_power_drain" value="20.0"/>
<arg name="tool_power_drain" value="0.0"/>
<!-- Whether to consider battery drain for task planning -->
<arg name="drain_battery" value="true"/>
<!-- Battery level at which the robot ceases to operate -->
<arg name="recharge_threshold" value="0.1"/>
</include>
</group>
</launch>
Posted by @luca-della-vedova:
I see, you are running the legacy full control and this is the area where the battery soc is updated.
A few notes:
- As you can see the battery does not come from a
battery_state
topic but just from the /fleet_states
topic, so check over there what the unit is.
- The function expects it in a 0-100 range so anything different than that won’t work.
- Also note that this is a legacy fleet adapter, what @xiyuoh recommended is the best way forward (using a fleet adapter template).
- What’s missing for me is how you are populating your
/robot_state
topic that is passed into the state aggregator, I guess your custom piece of code? But then again I would recommend starting from the demo fleet adapter or the template rather than this API that we only keep for legacy reasons.
Posted by @xiyuoh:
Thanks for providing the full launch file this time. From what I see you’re running the legacy full control fleet adapter, which takes in robot state updates via the /robot_state
topic. If you are running simulation with our slotcar plugins, it makes sense that things are working in sim, as the plugin publishes robot states over this topic for you.
However, when integrating with real robots, I don’t see you implementing a conversion between the TB3 transforms to a valid RobotState
msg published to the /robot_state
topic. If you take a look at your terminal logs, I suspect your robots were not added into the fleet as they couldn’t be discovered over /robot_state
. Feel free to provide a gist to your logs if that’s not the case.
The solution to implementing fleet adapters going forward is to use the EasyFullControl fleet adapter with examples found on rmf_demos_fleet_adapter
(source code and launch file). Whatever robot you intend to integrate with, you’d just need to fill in the respective APIs in the template.
Last and most importantly for your integration, I’ll point you to this PR again on free_fleet
because it covers everything you’re looking for: running RMF with multiple TB3s. It does not require you to set up your own state update APIs.
Posted by @PVijayaGanesh:
Hi @xiyuoh
I am running the simualtion with above adapter and launch files only not slotcar plugins.
`name: turtlebot3
robots:
- name: ros2_tb3_0
model: turtlebot3
task_id: ‘1’
seq: 0
mode:
mode: 0
mode_request_id: 0
battery_percent: 3221.999755859375
location:
t:
sec: 1730099085
nanosec: 443729156
x: 9.21667766571045
y: -8.711031913757324
yaw: -0.09972316026687622
obey_approach_speed_limit: false
approach_speed_limit: 0.0
level_name: turtlebot_world
index: 0
path:
`
Posted by @luca-della-vedova:
How are you publishing your /robot_state
topic?
As you can see the reported percentage by the node that is publishing that topic is 3221% which is not valid
Posted by @PVijayaGanesh:
yeah you are right.. @luca-della-vedova
I am not publishing any data to /robot_state topic…
ubuntu@ubuntu:~$ ros2 topic echo /r
/received_global_plan /robot_description /robot_destination_requests /robot_mode_requests /robot_path_requests /rosout ...
I am bringing up my bot..
launch Nav command with map (ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml)
started client and server ( robot is registered)
Launch rmf things.. which calling
.. >rmf_demos)/include/adapters/turtlebot3_adapter.launch.xml
Posted by @luca-della-vedova:
That is not possible.
You said you are running the robot_state_aggregator
since your launch file contains:
<include file="$(find-pkg-share rmf_fleet_adapter)/robot_state_aggregator.launch.xml">
The robot state aggregator subscribes to robot_state
as you can see here so the topic must be available in some way.
Anyway I echo my (and @xiyuoh) comment from 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. · open-rmf/rmf · Discussion #552 · GitHub, the best ways to integrate with your use case are using the newer APIs rather than trying to get something together with a deprecated one, try that out and let us know how it goes.
Edited by @luca-della-vedova at 2024-10-28T07:47:19Z
Posted by @PVijayaGanesh:
Thank you for helping me @luca-della-vedova @xiyuoh
In simulation I launch the world and navigation with the world file. And I created rmf map in traffic editor. And I launch the client and server and rmf things . it was taking the task from the panel every thing is working fine..I changed few parameters in the server file to align in the RMF map. Batter value Is 95 like that.
Same thing I tried to replicate in my bot . I bring up the bot and run the navigation file with the map file. I created the map in the traffic editor. Launched client and server and RMF .while RMF launching it saying the below error . (/robot_state topic is not there ). What I thought is if the below error will solve means my robot will move.
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
I thought the same way it will work for my real robot.
Please help if need to do anything further or my approach is wrong.
Edited by @PVijayaGanesh at 2024-10-28T08:47:06Z
Posted by @PVijayaGanesh:
Hi I did Free fleet adapter using easy-full-control fleet adapter and zenoh bridges
Steps I follow:
Install humble rmf
clone the branch easy full controll free fleet ( git clone -b easy-full-controll <> )
zenoh v11 setup i did ..
ros2 run free_fleet_examples test_navigate_to_pose.py
–frame-id map
–namespace turtlebot3_1
-x 1.808
-y 0.503
This command is working… i sends the goal and robot is moving
when the launch free fleet adapter i got this issue..
How can i resolve this issue @luca-della-vedova @xiyuoh