Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RobotUpdateHandle API set_charger_waypoint() doesn't work #337

Open
1 task done
CarlyyyChen opened this issue Mar 25, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@CarlyyyChen
Copy link

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

OS and version

Ubuntu 22.04

Open-RMF installation type

Source build

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

2.0.3

ROS distribution

Humble

ROS installation type

Source build

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

The API here https://github.com/open-rmf/rmf_ros2/blob/humble/rmf_fleet_adapter/include/rmf_fleet_adapter/agv/RobotUpdateHandle.hpp#L103 is supposed to set a dedicated charger waypoint for the robot, however this seems not working. According to the comments for this method, if no dedicated charger is set, then the system will use the nearest charger to the robot's spawn place as the robot's charger. However, if you run the demo (office demo for example), if in configuration file (like in https://github.com/open-rmf/rmf_demos/blob/humble/rmf_demos/config/office/tinyRobot_config.yaml#L55) you set another charger waypoint different with the robot's spawn place as the robot's dedicated charger, the robot will still go back to its spawn place (which is also a charger) after finishing a task instead of its dedicated charger.

My guess is, what implemented in the FleetUpdateHandle here

std::optional<std::size_t> get_nearest_charger(
is taking priority over the RobotCommandHandle API, but not sure how. And this seems not working as intended. Thanks much for further clarification!

Steps to reproduce the bug

  1. Change dedicated charger waypoint name in configuration file to another charger different with the robot's spawn place. For example in https://github.com/open-rmf/rmf_demos/blob/humble/rmf_demos/config/office/tinyRobot_config.yaml#L55
  2. build, source, and run the office demo using ros2 launch rmf_demos_gz_classic office.launch.xml
  3. send tasks using ros2 run rmf_demos_tasks dispatch_patrol -p coe lounge -n 3 --use_sim_time
    ros2 run rmf_demos_tasks dispatch_delivery -p pantry -ph coke_dispenser -d hardware_2 -dh coke_ingestor --use_sim_time
  4. you will observe that after finishing the task, tiny robot 1 will still goes back to its spawn place (tinyRobot1_charger), instead of another charger that you specify as the tinyRobot1's dedicated charger in step 1

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

@CarlyyyChen CarlyyyChen added the bug Something isn't working label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant