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

Add Reset Path Planner UI button #249

Merged
merged 3 commits into from
Aug 25, 2024
Merged

Add Reset Path Planner UI button #249

merged 3 commits into from
Aug 25, 2024

Conversation

sea-bass
Copy link
Owner

This PR allows resetting the path planner from the UI.

This means that now if you close a hallway from the UI, you can reset the planner for a robot with PRM/A* and then replan without going right through the door.

Thanks to @muhidabid for setting the foundation with his "Cancel Action" button, I could just copy-paste exactly what he did :)

image

@sea-bass sea-bass requested a review from eholum August 24, 2024 01:41
warnings.warn(f"[{self.name}] Robot has no path planner. Cannot reset.")
return

if not hasattr(self.path_planner, "reset"):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eholum this was inspired by your question on the reset() method being required. Now it's technically not

Copy link

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.py4637184%259–260, 272, 275, 279–280, 285–286, 328–329, 337, 397–400, 404–407, 431, 434, 438–440, 467, 469, 511–512, 514–515, 532–534, 550–552, 619–621, 646–648, 699–701, 770–772, 782, 826–828, 838, 853, 859, 862, 864, 866, 869–871, 881, 889, 895, 901, 907, 919, 961, 979, 982, 987
   room.py48197%113
   world.py73919074%147–148, 184–185, 189, 242–243, 245–246, 274–275, 298–300, 337–339, 351–353, 382–384, 409–411, 464, 478–479, 481–482, 497–499, 519–523, 525–527, 529–530, 533, 535–538, 542–546, 549–551, 554–565, 581–582, 600–602, 616–618, 654–656, 668–670, 692–694, 719–721, 769–770, 773, 789, 819–820, 831, 834, 842, 858–862, 864–866, 869–870, 873–876, 878, 881, 883–885, 887–889, 891, 906, 913, 924–928, 963–964, 968–969, 987–988, 994–995, 997–998, 1000, 1002–1003, 1005, 1007–1008, 1018–1019, 1022, 1024, 1038, 1040, 1047, 1094, 1125–1126, 1137, 1148–1150, 1152–1155, 1157, 1174–1175, 1179–1180, 1215–1216, 1218, 1235–1236, 1267, 1281–1284, 1296–1299, 1313, 1324–1325, 1327, 1371–1372, 1424, 1504–1505
   yaml_utils.py108694%61, 65, 167–168, 187–188
gui
   __init__.py20100% 
   main.py2234281%22–24, 45, 77–78, 218–220, 232–240, 247–250, 252, 255–261, 265, 270–271, 275–276, 287, 338–339, 350–353
   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.py1620100% 
   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
TOTAL417257686% 

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

Copy link
Collaborator

@eholum eholum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some mighty fine button pushing enabled by this PR.

@sea-bass sea-bass merged commit 89ea670 into main Aug 25, 2024
7 checks passed
@sea-bass sea-bass deleted the planner-reset-button branch August 25, 2024 23:12
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.

2 participants