Open weicyingqiaopian opened 6 months ago
For C++ Implementation to move_base check this code:
and
Thank you for your answer, what should I do now, do I need to write the client to use it?
I think if you interface to your robot with move base, you just need to configure the coverage planner accordingly and activate that you want the coverage planner to control your robot. You can set this paramter in the config file to true, to have this behaviour: https://github.com/ipa320/ipa_coverage_planning/blob/f8a1dae4a09693f36a84fd92b6f9772d4c6faff1/ipa_room_exploration/ros/launch/room_exploration_action_server_params.yaml#L34
I've changed the execute_path: false parameter, but it hasn't changed
Ok, and you started the coverage program from the sample action client, rigth? The sample action client overwrites the path execution setting to false via dynamic reconfigure: https://github.com/ipa320/ipa_coverage_planning/blob/f8a1dae4a09693f36a84fd92b6f9772d4c6faff1/ipa_room_exploration/ros/src/room_exploration_action_client.cpp#L123
I would suggest: have a look into the code of the sample action client and adapt it to your needs. It might even just load a predefined map from our test set right now, and not use your own map. It is just an example. You can also just write a brief python script with an according call to the ipe_room_exploration action server. Then you have full freedom.
Should I just change this to true?
This would be an option. Anyways, please understand that the sample client is majorly written for people without a robot attached, it just demonstrates coverage planning based on database maps. There might be more adaptations needed to run the robot. As said, please quickly scan the code of the sample client with your application purpose in mind.
Thank you, you are really responsible, thank you for helping me, I don't know how to write a client that can implement the coverage path planning navigation of my own map
One thing I saw, that will definitely need correction, is how you provide the map to the algorithm. In the client, these lines read the map from a file: https://github.com/ipa320/ipa_coverage_planning/blob/f8a1dae4a09693f36a84fd92b6f9772d4c6faff1/ipa_room_exploration/ros/src/room_exploration_action_client.cpp#L68
The interface to the room exploration server is defined and explained here in this file: https://github.com/ipa320/ipa_coverage_planning/blob/f8a1dae4a09693f36a84fd92b6f9772d4c6faff1/ipa_building_msgs/action/RoomExploration.action#L1
Is there any example of client code?
Only the sample client you know in C++. Using this sample code and adapting it should be quite straightforward, it contains especially the ROS action call to the exploration server to start processing and optionally execute the trajectory following. ipa_coverage_planning/ipa_room_exploration/ros/src/room_exploration_action_client.cpp
I'm going to test it later, I just changed that parameter to true and it already works, thank you
I'm going to bother you again.,Mine doesn't seem to have obstacle avoidance anymore.,What's the reason for this.
What exactly do you mean? Our code only provides the navigation goals, the obstacle avoidance needs to be handled by your move base instance you set up for the robot.
Our solution commands the navigation goals to move_base without checking whether they are accessible at this moment. However, we rely on move_base to return an error, if the pose can not be reached and then we command a nearby pose: https://github.com/ipa320/ipa_coverage_planning/blob/f8a1dae4a09693f36a84fd92b6f9772d4c6faff1/ipa_room_exploration/ros/src/room_exploration_action_server.cpp#L1116
If you like to do more fancy stuff, you can check the local obstacle map from move_base before commanding the path poses.
Excuse me again, I don't think it followed this path
I don't feel like it's all covering my map, and some of the places don't seem to be planned right
Excuse me, w ![Uploading 1111111111111.png…]() hy do you go to the same place first every time you start, I'm curious because of what
We go to the same place because we select the closest point of the path from the starting point given to the planner
How to make it a little away from the wall, close to the wall, it is easy to get stuck, and it can't be poured out before and after
Hello, thank you for answering this question, I would like to ask how to add this to the move_base