Skip to content
New issue

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

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

Already on GitHub? # to your account

Coverage Demo fails #41

Closed
tonynajjar opened this issue Mar 4, 2024 · 10 comments
Closed

Coverage Demo fails #41

tonynajjar opened this issue Mar 4, 2024 · 10 comments

Comments

@tonynajjar
Copy link

How to reproduce:

ros2 launch opennav_coverage_demo coverage_demo_launch.py

Error:

[component_container_isolated-5] [ERROR] [1709560390.632574795] [coverage_server]: Internal Fields2Cover error: Geometry does not contain point 0

@SteveMacenski
Copy link
Member

You need to populate your field correctly - see the demo script or the tests (or even other F2C demos)

@tonynajjar
Copy link
Author

tonynajjar commented Mar 4, 2024

You're saying that it is expected that running the demo launch file does not work out of the box? I saw that in the demo script demo_coverage.py, a polygon is generated and I'm guessing in the coverage_server this polygon is converted to the master_field, yet this master_field seems to have an area of 0. What am I missing here?

@tonynajjar
Copy link
Author

tonynajjar commented Mar 4, 2024

In CoverageServer::computeCoveragePath(), I printed out the goal and it seems to be populated correctly (same as in the demo_coverage script). Then I printed out master_field.getArea() and that's 0. There seems to be something wrong in the creation of the master_field from the polygon.

@SteveMacenski
Copy link
Member

SteveMacenski commented Mar 4, 2024

Sorry, took me a bit to get a workspace built with everything. It seems to be working fine for me on iron

git clone git@github.com:Fields2Cover/Fields2Cover.git
git clone git@github.com:open-navigation/opennav_coverage.git -b iron
colcon build --packages-select opennav_coverage opennav_coverage_demo opennav_coverage_msgs fields2cover

ros2 launch opennav_coverage_demo coverage_demo_launch.py

@tonynajjar
Copy link
Author

tonynajjar commented Mar 4, 2024

Hmm, I tested on main, could you give this a quick test? I probably won't have time today anymore to test on Iron, I can try it tommorrow.

P.s: you might also run into an issue with the BT plugins "already loaded", these need to be removed now I guess since they are loaded by default.

@SteveMacenski
Copy link
Member

SteveMacenski commented Mar 4, 2024

Works fine too (after removing BT plugins from yaml, changing now)

[demo_coverage-7] Waiting for 'NavigateCompleteCoverage' action server
[demo_coverage-7] Navigating to with field of size: 5...
[component_container_isolated-5] [INFO] [1709574892.421465036] [bt_navigator]: Begin coverage navigating with outer field of size: 5!
[component_container_isolated-5] [INFO] [1709574892.425943049] [coverage_server]: Generating coverage path in map frame for zone with 5 outer nodes and 0 inner polygons.
[component_container_isolated-5] [INFO] [1709574892.455748830] [controller_server]: Received a goal, begin computing control effort.

@tonynajjar
Copy link
Author

Well, thank you for taking the time.... I'll check tomorrow how that could happen...

@SteveMacenski
Copy link
Member

^ note I ran those same commands I gave above and added the BT / navigator packages I forgot the first time. But literally copy pasted those commands in the main (rolling) workspace and worked fine except for the BT plugins list thing which I just merged a PR to resolve

@tonynajjar
Copy link
Author

tonynajjar commented Mar 5, 2024

Are you sure you tested with navigation2 and opennav_coverage on main? How did you not run into #43? Though, after this change it also seems to work on main, I'll check what's different in my setup

@tonynajjar
Copy link
Author

I think I found the issue, I first built Fields2Cover as described here and then opennav_coverage and for some reason that doesn't work.

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

No branches or pull requests

2 participants