ipa320 / ipa_coverage_planning

Algorithms for floor plan segmentation and systematic coverage driving patterns
269 stars 106 forks source link

Running client.launch reveals that the image differs greatly from the paper experiment #23

Closed ZengJunTao111 closed 1 year ago

ZengJunTao111 commented 1 year ago

Dear Author, when I run the command roslaunch ipa_room_exploration room_exploration_client.launch, the result I run is shown below, which is very different from the result in the paper. And when I change different algorithm for room exploration to test the image you gave, I found that each Coverage Path Planning has basically the same result, and it is very different from the one in the paper. Thank you.

c0eb1abf59708e66a2f4cb8b906eac6

ipa-rmb commented 1 year ago

There might be differences to the paper due to further developments in the software after publication.

However, you should get different results for different algorithms. Can you please report in detail you you started the software and how you configured the algorithm setting? It sounds like the desired algorithm was not conveyed to the software as a new setting.

ZengJunTao111 commented 1 year ago

Ok, so first I started the turtlebot3 emulation system, and then I ran roslaunch ipa_room_exploration room_exploration_action_server.launch, Then go to the room_exploration_client.launch file and give the file parameter an absolute path to a yaml file, and use the test map, without modifying the code parameters in the meantime. Finally, run roslaunch ipa_room_exploration room_exploration_client.launch, and the result is just like the diagram shown above. The algorithm used here is Boustrophedon Coverage Path Planning. Of course, I also tried to modify the room_exploration_algorithm to test the map using a different algorithm, but the results were basically the same. What is the reason for this?

ipa-rmb commented 1 year ago

@ipa-foj Do you have any idea for the observed behavior?

ipa-rmb commented 1 year ago

So you have changed the algorithm in file ros/launch/room_room_exploration_action_server_params.yaml, right?

# this variable selects the algorithm for room exploration
# 1 = grid point explorator
# 2 = boustrophedon explorator
# 3 = neural network explorator
# 4 = convexSPP explorator
# 5 = flowNetwork explorator
# 6 = energyFunctional explorator
# 7 = voronoi explorator
# 8 = boustrophedon variant explorator
# int
room_exploration_algorithm: 8

Have you tried to start dynamic reconfigure to see which algorithm is currently active? You should even be able to switch the algorithm at runtime via dynamic reconfigure.

ipa-foj commented 1 year ago

The provided action client is supposed to be just a simple example to show how the code can be used in general, it is recommended to write your own ROS action client in your statemachine or sequence control.

The client also shows how to change the settings of the server during runtime using dynamic reconfigure, just as @ipa-rmb mentioned.

Please see this line in the code, if this isn't changed or removed the server will always use the same algorithm, regardless of the yaml parameters.

ZengJunTao111 commented 1 year ago

Yes, every time I switch algorithms in a yaml file, I ran both of these instructions again: roslaunch ipa_room_exploration room_exploration_action_server.launch and roslaunch ipa_room_exploration room_exploration_client.launch.

ZengJunTao111 commented 1 year ago

Moreover, I think the results obtained by running the algorithm are too different from the pictures in your paper. May I ask why this is? Thank you.

ipa-foj commented 1 year ago

There are 2 reasons for this:

  1. As @ipa-rmb mentioned we updated the code after the paper creation. Especially the commonly called algorithm "8" is an updated variant of the Boustrophedon Planner from the original paper.
  2. In the paper we initially separated the map into individual rooms. In the paper we took the ground-truth data for this segmentation, while in production you have to use the ipa_room_segmentation package for that. This is one reason why you should create your own action clients in your sequence control.
ZengJunTao111 commented 1 year ago

Hello foj, first of all, thank you very much for your answer. I found that it was indeed the problem of drc_exp.setConfig("room_exploration_algorithm", 8), which caused me to switch different algorithms with the same result. When I annotate this line of code and then switch between different algorithms I get a different result. Then there is the ipa_room_segmentation and ipa_room_exploration. Aren't these two modules separate? Do I have to use room_segmentation when testing with test_maps in the room_exploration module?

ipa-foj commented 1 year ago

Yes these two are separate, as they can be used individually, depending on the needs you have. You have to decide what you want to achieve and implement your code according to that, we can just provide you the tools to achieve it.

You don't have to use the segmentation with the test_maps, but then the outcome of course cannot be exactly the same as in the paper.

ZengJunTao111 commented 1 year ago

foj, thank you very much for your kindness. What I want for now is to achieve the same result as the diagram below in the room_exploration package, and have an idea if I can generate overlay paths in the map and save the generated paths in yaml files. Could you please wait until I use the ipa_room_segmentation package in my later study to consult you? Thank you very much.

8a78880c2da1edd8219ecfb2fe9ce90