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

Unify navigation code and automatically extract robot location #202

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Jul 12, 2024

This PR reduces duplication in the nav code that existed in both the GUI and the robot. Now it's all delegated to the robot, which has a navigate() method that contains find_path() and follow_path().

Additionally, the target_location argument of the nav functions is gone, meaning it does not need to be specified a priori; the World.get_location_from_pose() method has been extended to also extract object spawn and hallway information.

I also found a few other UI simplifications along the way...

Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
core
   __init__.py90100% 
   dynamics.py430100% 
   gazebo.py136894%55, 124, 230, 244–248
   hallway.py921089%176, 192, 217, 234–237, 261–263
   locations.py1252183%53, 55, 69, 84–85, 87, 98–99, 101–102, 119, 177, 192, 217, 227, 272, 283–284, 286–287, 311
   objects.py69494%78, 106, 137, 197
   robot.py3154884%231–232, 244–245, 248, 253, 282–284, 286–288, 291–292, 351–354, 412–413, 415–416, 433–434, 486–487, 565, 590, 607, 613–616, 629, 637, 643, 649, 655, 664, 692, 701, 704, 709, 722–726
   room.py48197%113
   world.py64616175%146–147, 183–184, 188, 241–242, 244–245, 273–274, 297–298, 310–311, 325–326, 333–334, 338–339, 353–354, 374–375, 423, 437–438, 440–441, 470–474, 476–478, 480–481, 484, 488–492, 495–497, 500–507, 538, 574–575, 578, 594, 624–625, 636, 639, 647, 663–667, 669–671, 674–675, 678–681, 683, 686, 688–690, 692–694, 696, 711, 718, 729–733, 768–769, 773–774, 792–793, 799–800, 802–803, 805, 807–808, 810, 812–813, 823–824, 827, 829, 843, 845, 852, 899, 930–931, 942, 953–955, 957–960, 962, 979–980, 984–985, 1020–1021, 1023, 1040–1041, 1072, 1074, 1086–1089, 1101–1104, 1118, 1129–1130, 1132, 1176–1177, 1229, 1309–1310, 1356
   yaml_utils.py1061189%64, 68, 153–155, 159–160, 183–184, 208–209
gui
   __init__.py20100% 
   main.py1984179%23–25, 46, 78–79, 197, 209–213, 220–223, 225, 228–234, 238, 243–244, 248–249, 260, 271, 315–319, 323–327
   world_canvas.py2446473%41–42, 44–48, 51, 59–60, 136–139, 146, 148, 194, 201–203, 205–207, 223, 259, 311, 320, 326, 333–334, 336, 338–340, 343–346, 348, 352–358, 361, 364–365, 380–382, 385, 402, 445, 466, 470, 492, 508–509, 511, 522–523, 525
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__.py30100% 
   a_star.py781087%67–72, 74–76, 165
   execution.py34488%45–46, 48–49
   occupancy_grid.py1391489%44–47, 49–53, 56, 192, 226, 234, 238
   path_planner.py26676%33, 36, 38, 42, 85, 90
   planner_base.py593147%29–35, 51, 57–59, 86, 98, 101, 105, 113–114, 117–119, 122–124, 127, 129, 140–145
   prm.py72297%61–62
   rrt.py1740100% 
   world_graph.py70395%118, 121, 145
planning
   __init__.py00100% 
   actions.py785529%59–60, 62, 66–75, 77–80, 82–86, 88–91, 93–97, 99–102, 104–111, 113–114, 116–118, 164–165, 168–172
planning/pddlstream
   __init__.py7185%13
   default_mappings.py90100% 
   planner.py40880%119–126
   primitives.py57296%68, 208
   utils.py85396%66, 99–100
utils
   __init__.py00100% 
   general.py33487%23, 45, 51–52
   knowledge.py1481490%110, 145–148, 155, 159–160, 173, 188, 192, 234, 250, 313
   motion.py60690%56, 67–71
   polygon.py1110100% 
   pose.py89297%211, 227
   search_graph.py93396%240–242
   trajectory.py650100% 
TOTAL380059884% 

Tests Skipped Failures Errors Time
187 0 💤 0 ❌ 0 🔥 3m 22s ⏱️

@sea-bass sea-bass merged commit c4bc9e7 into main Jul 12, 2024
7 checks passed
@sea-bass sea-bass deleted the unify-nav branch July 12, 2024 02:47
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