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

Run all robot actions in GUI in separate threads #290

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Nov 1, 2024

This PR configures all robot actions started from the GUI to be QRunnable objects run from a QThreadPool, as was already done for the "navigate" action.

This primarily makes it so that delayed actions are non-blocking to the GUI and don't freeze it up over long delays... plus you can switch to another robot and do other tasks during delayed actions.

Closes #289

@sea-bass sea-bass changed the title Run all robot actions in GUI using QRunnables in thread pools Run all robot actions in GUI in separate threads Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
core
   __init__.py90100% 
   dynamics.py47197%140
   gazebo.py136894%55, 124, 230, 244–248
   hallway.py94891%200, 242–245, 269–271
   locations.py1311886%69, 71, 88, 104, 117–118, 120–121, 138, 196, 211, 236, 246, 302–303, 305–306, 335
   objects.py69592%78, 106, 137, 184, 197
   robot.py4788482%263–264, 276, 279, 283–284, 289–290, 330–332, 348, 365–366, 405–407, 411–415, 440, 443, 447–449, 476, 478, 520–521, 523–524, 530–531, 540–543, 548, 550, 559–561, 568–570, 632–634, 659–661, 667–668, 676–680, 725–727, 738–739, 799–801, 806, 853–855, 860, 878, 884, 887, 889, 891, 894–896, 973, 991, 994
   room.py48197%113
   world.py81719076%154–155, 191–192, 196, 270–271, 273–274, 304–305, 367, 381–382, 384–385, 400–402, 422–426, 428–430, 432–433, 436, 438–441, 445–449, 452–454, 457–468, 484–485, 503–505, 519, 521, 524–525, 530–532, 551–552, 554–555, 571, 573, 576–577, 582–584, 594–596, 613–614, 616–617, 631, 633, 636–637, 642–644, 667, 669, 672–673, 678–680, 716, 722, 758–759, 762, 783, 803–804, 815, 818, 826, 842–846, 848, 851–852, 855–858, 860, 863, 866–867, 870–872, 874–876, 878–880, 882, 897, 904, 915–919, 954–955, 959–960, 978–979, 985–986, 988–989, 991, 993–994, 996, 998–999, 1009–1010, 1013, 1015, 1029, 1031, 1038, 1085, 1116–1117, 1140–1141, 1145–1146, 1165–1166, 1170–1171, 1196–1197, 1250–1251, 1275, 1340, 1347, 1457–1458, 1510, 1590–1591, 1657, 1667
   yaml_utils.py109694%62, 66, 168–169, 188–189
gui
   __init__.py20100% 
   action_runners.py924847%34–35, 37–41, 43, 76–77, 79–83, 85, 111–112, 114–118, 120, 146–147, 149–153, 155, 178–179, 181–185, 187, 210–211, 213–217, 219
   main.py2707273%23–25, 46, 89, 93–96, 245–254, 266–275, 278, 285–288, 290, 293–299, 303, 308–309, 313–314, 325, 365–366, 375–376, 380–381, 393, 396–399, 401–402, 405–408, 410–412, 416–419
   world_canvas.py2645280%135–138, 142–143, 148–149, 156, 158, 160, 217–219, 225, 227, 247–249, 294, 351–352, 379–380, 382, 384–385, 387–390, 392–393, 397–403, 406, 409–410, 423, 441–442, 444, 450, 452–455
manipulation
   __init__.py10100% 
   grasping.py2376473%100, 108, 110–112, 114–122, 124, 132, 462, 464–466, 470–472, 566–567, 569–571, 574–578, 586, 589–591, 596–597, 603–607, 610–617, 620–622, 631, 633, 635–641
navigation
   __init__.py11190%37
   a_star.py771185%83–88, 90–92, 180, 189
   execution.py94792%81–83, 88–90, 125
   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
TOTAL437765984% 

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

@sea-bass sea-bass merged commit 2d737e5 into main Nov 1, 2024
7 checks passed
@sea-bass sea-bass deleted the gui-actions-in-qthreads branch November 1, 2024 01:57
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.

Running non-navigate actions with artificial delay freezes up the GUI
1 participant