open-rmf / free_fleet

A free fleet management system.
Apache License 2.0
160 stars 66 forks source link

Robot named [robot] belonging to fleet [fleet] is very far [4.527969m] from where it is supposed to be, but its remaining path is empty. #136

Open MatteoCarlone opened 1 year ago

MatteoCarlone commented 1 year ago

Required information:

Description

I'm working on a create3 robot in a gazebo simulation environment, with NAV2. I'm integrating the system with rmf using the ROS2 free_fleet client and server.

When submitting a loop task:

ros2 run rmf_demos_tasks dispatch_patrol -p start waypoint --use_sim_time

The robot starts moving towards the waypoint but it diverge from the navigation graph. When it "arrives" at destination is not on the properly located on the waypoint and I got the following error: "Robot named [robot] belonging to fleet [fleet] is very far [4.527960m] from where it is supposed to be, but its remaining path is empty. This means the robot believes it is finished, but it is not where it's supposed to be."

ezgif com-video-to-gif

Another problem that I see is that the graph lanes and also the robot in the rmf visualization are really small and out of scale. Do someone know how to fix? Thanks a lot!

that's my repo if you want to have a look!

MatteoCarlone commented 1 year ago

@Yadunund , I would also like to understand rmf custom task. As far as I could get I need to implement them in a custom fleet adapter, but how can I do it with the free_fleet ? up to now I'm using the standard full_control adapter in the rmf_fleet_adapter binary pkg.

aaronchongth commented 1 year ago

Hey @MatteoCarlone!

For future issues, please share the entire log, so to provide more context, in a https://gist.github.com/.

"Robot named [robot] belonging to fleet [fleet] is very far [4.527960m] from where it is supposed to be, but its remaining path is empty. This means the robot believes it is finished, but it is not where it's supposed to be."

Most of the time this is emitted from the fleet adapter when the robot is not where it is supposed to be, i.e. the scale, translation and rotation setups are inaccurate. This will also explain your question regarding the rmf visualization and robot's navigation stack visualization being out of scale. Open-RMF operates on a separate coordinate frame from the robots and fleets, therefore all the robots and fleets are required to provide the transformation required to map the robot/fleet's coordinates to the one used in Open-RMF before providing an position update.

You'll get better results after you tune https://github.com/MCI-AMRs/OpenRMF_MCI/blob/free_fleet/free_fleet/ff_examples_ros2/launch/mci_server.launch.xml#L26-L29.

I would also like to understand rmf custom task. As far as I could get I need to implement them in a custom fleet adapter, but how can I do it with the free_fleet ? up to now I'm using the standard full_control adapter in the rmf_fleet_adapter binary pkg.

As of now free fleet does not support custom tasks (I'm imagining something along the lines of requesting the create3 robot to dock or perform some custom action). If you have the specific need for it, would you like to contribute it upstream?

MatteoCarlone commented 1 year ago

Hi @aaronchongth, Thanks a lot for the fast reply, and really sorry about the inconvenience, the video I posted actually refers to a more updated commit in which I made a reference tuning: here to clarify:

Regarding the custom task instead, I'm dealing with a university project and we have several Turtlebots-4 working on ROS2 Humble and correctly namespaced. Due to the need of working with namespacing a thought the free-fleet architecture would have fit well. However, As you correctly imagined there's the need of performing docking action but also pick-up and drop-off custom actions due to an elevator we mounted on top of the turtlebots. What do you suggest me to do? I've also seen the possibility of working on a custom fleet_adpater and on a Turtlebot4 fleet-adapter, but to me it seemed those are methods not thought for namespacing. I would love any possible help. Thanks again in advance

aaronchongth commented 1 year ago

Thanks for the information. The scale and translation from traffic editor is for the purpose of placing the reference floorplan, different from the parameters you have to insert here, https://github.com/MCI-AMRs/OpenRMF_MCI/blob/free_fleet/free_fleet/ff_examples_ros2/launch/mci_server.launch.xml#L26-L29.

I would suggest giving https://osrf.github.io/ros2multirobotbook/traffic-editor.html#deriving-coordinate-space-transforms a read, to understand how you can obtain the transformations required.

I've also seen the possibility of working on a custom fleet_adpater and on a Turtlebot4 fleet-adapter, but to me it seemed those are methods not thought for namespacing

The namespacing is required only for simulation purposes, since there would be multiple navigation stacks of simulated robots running on the same machine, which will require namespacing of the transforms and topics. If your application is for physical robots, the namespacing should not be any concern, since the clients will be running isolated on each robot.

MatteoCarlone commented 1 year ago

Thanks again for the hints, But my only way of using Turtlebots-4 all toget

her is via namespacing also physically. So I really don't get what you mean with should not be any concern -> all topics would interfere each other on the same network. Also regarding the clients: Screenshot from 2023-04-25 11-25-08 in this architecture what to you mean with clients? o were you referring to the free_fleet_clients? In any case Sorry for my misinterpretation.

aaronchongth commented 1 year ago

Yes I am referring to free fleet clients

Yadunund commented 1 year ago

@MatteoCarlone see https://github.com/open-rmf/fleet_adapter_template/issues/18#issuecomment-1551036988