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

Remove graph nodes from locked-off hallways when searching for paths #253

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Aug 30, 2024

This kind of started as a hack, but I'm really warming up to it in that I can't think of anything better that won't take some serious recursive / geometric analysis...

I recently ran into a "feature" with navigating to a hallway. Take this world:

image

If you are navigating to the hallway between office and closet, the default heuristic will tell the robot to go to the left side of the hallway because it's nearer to the current robot pose as the crow flies. But as you see, path planning will fail.

This PR will look for "landlocked" hallways as described above by checking that there is at least one open hallway on either room, or that the robot isn't inside that room. If there isn't (like in the case of closet in the screenshot above), the navigation graph node on that side gets eliminated from consideration.

If the hallway is locked on both rooms, then... yeah, path planning will fail in that there is no valid target. But I think that's okay.

Copy link

github-actions bot commented Aug 30, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
core
   __init__.py90100% 
   dynamics.py430100% 
   gazebo.py136894%55, 124, 230, 244–248
   hallway.py93891%193, 235–238, 262–264
   locations.py1312183%69, 71, 88, 103–104, 106, 117–118, 120–121, 138, 196, 211, 236, 246, 291, 302–303, 305–306, 335
   objects.py69494%78, 106, 137, 197
   robot.py4586785%259–260, 272, 275, 279–280, 285–286, 332, 392–395, 399–402, 426, 429, 433–435, 462, 464, 506–507, 509–510, 527–529, 545–547, 614–616, 641–643, 694–696, 765–767, 819–821, 844, 850, 853, 855, 857, 860–862, 872, 880, 886, 892, 898, 910, 952, 970, 973, 978
   room.py48197%113
   world.py74219673%147–148, 184–185, 189, 242–243, 245–246, 274–275, 326, 340–341, 343–344, 359–361, 381–385, 387–389, 391–392, 395, 397–400, 404–408, 411–413, 416–427, 443–444, 462–464, 478, 480, 483–484, 489–491, 532, 534, 537–538, 543–545, 557–559, 594, 596, 599–600, 605–607, 632, 634, 637–638, 643–645, 693–694, 697, 713, 743–744, 755, 758, 766, 782–786, 788–790, 793–794, 797–800, 802, 805, 807–809, 811–813, 815, 830, 837, 848–852, 887–888, 892–893, 911–912, 918–919, 921–922, 924, 926–927, 929, 931–932, 942–943, 946, 948, 962, 964, 971, 1018, 1049–1050, 1061, 1072–1074, 1076–1079, 1081, 1098–1099, 1103–1104, 1127, 1129–1130, 1163–1164, 1166, 1183–1184, 1215, 1229–1232, 1244–1247, 1261, 1272–1273, 1275, 1319–1320, 1372, 1452–1453, 1518, 1528
   yaml_utils.py108694%61, 65, 167–168, 187–188
gui
   __init__.py20100% 
   main.py2345277%22–24, 45, 77–78, 219–227, 239–247, 254–257, 259, 262–268, 272, 277–278, 282–283, 294, 334–335, 344–345, 349–350, 361–364
   world_canvas.py3016279%45–46, 48–52, 55, 61–62, 169–172, 176–177, 182–183, 190, 192, 249–251, 257, 274–276, 323, 380–381, 408–409, 411, 413–415, 418–421, 423, 427–433, 436, 439–440, 455–457, 460, 479, 522, 543, 547, 570, 587, 601
manipulation
   __init__.py10100% 
   grasping.py2366174%102, 110–112, 114–122, 124, 132, 462, 464–466, 470–472, 566–568, 571–575, 583, 586–588, 593–594, 600–604, 607–614, 617–619, 628, 630, 632–638
navigation
   __init__.py11190%37
   a_star.py771185%83–88, 90–92, 180, 189
   execution.py90792%73–75, 80–82, 119
   occupancy_grid.py1391489%44–47, 49–53, 56, 192, 226, 234, 238
   prm.py56492%60–61, 140, 149
   rrt.py1610100% 
   visualization.py32681%88–93
   world_graph.py58493%117, 120, 130, 139
planning
   __init__.py00100% 
   actions.py1120100% 
planning/pddlstream
   __init__.py7185%13
   default_mappings.py90100% 
   planner.py40880%119–126
   primitives.py61493%68, 82, 94, 232
   utils.py99891%66, 93, 105, 115–116, 207–208, 211
utils
   __init__.py00100% 
   general.py33487%23, 45, 51–52
   knowledge.py1542285%86, 117, 156–161, 163–164, 167–168, 170–173, 189, 204, 208, 250, 266, 329
   motion.py70395%93–94, 96
   polygon.py1110100% 
   pose.py890100% 
   search_graph.py93396%240–242
   trajectory.py67297%130, 165
TOTAL418058885% 

Tests Skipped Failures Errors Time
195 0 💤 0 ❌ 0 🔥 3m 20s ⏱️

@sea-bass sea-bass enabled auto-merge (squash) August 31, 2024 20:33
@sea-bass sea-bass disabled auto-merge August 31, 2024 20:33
@sea-bass sea-bass merged commit 9311a0e into main Aug 31, 2024
7 checks passed
@sea-bass sea-bass deleted the hallways-hack branch August 31, 2024 20:33
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

Successfully merging this pull request may close these issues.

1 participant