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

I'm having some hard time #32

Open
weicyingqiaopian opened this issue May 9, 2024 · 21 comments
Open

I'm having some hard time #32

weicyingqiaopian opened this issue May 9, 2024 · 21 comments

Comments

@weicyingqiaopian
Copy link

Hello, thank you for answering this question, I would like to ask how to add this to the move_base

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 13, 2024

For C++ Implementation to move_base check this code:

void RoomExplorationServer::navigateExplorationPath(const std::vector<geometry_msgs::Pose2D>& exploration_path,

and

bool RoomExplorationServer::publishNavigationGoal(const geometry_msgs::Pose2D& nav_goal, const std::string map_frame,

@weicyingqiaopian
Copy link
Author

Thank you for your answer, what should I do now, do I need to write the client to use it?

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

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:

@weicyingqiaopian
Copy link
Author

I've changed the execute_path: false parameter, but it hasn't changed

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

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:

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.

@weicyingqiaopian
Copy link
Author

Should I just change this to true?

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

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.

@weicyingqiaopian
Copy link
Author

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

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

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:

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

The interface to the room exploration server is defined and explained here in this file:

@weicyingqiaopian
Copy link
Author

Is there any example of client code?

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 15, 2024

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

@weicyingqiaopian
Copy link
Author

I'm going to test it later, I just changed that parameter to true and it already works, thank you

@weicyingqiaopian
Copy link
Author

I'm going to bother you again.,Mine doesn't seem to have obstacle avoidance anymore.,What's the reason for this.

@ipa-foj
Copy link
Contributor

ipa-foj commented May 16, 2024

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.

@ipa-rmb
Copy link
Collaborator

ipa-rmb commented May 16, 2024

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:

if(mv_base_client.getState() == actionlib::SimpleClientGoalState::SUCCEEDED || near_pos == true)

If you like to do more fancy stuff, you can check the local obstacle map from move_base before commanding the path poses.

@weicyingqiaopian
Copy link
Author

Excuse me again, I don't think it followed this path

@weicyingqiaopian
Copy link
Author

微信截图_20240516171614
I don't feel like it's all covering my map, and some of the places don't seem to be planned right

@weicyingqiaopian
Copy link
Author

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

@ipa-foj
Copy link
Contributor

ipa-foj commented Jun 6, 2024

We go to the same place because we select the closest point of the path from the starting point given to the planner

@weicyingqiaopian
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants