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 ROS service to set location state #218

Merged
merged 1 commit into from
Jul 14, 2024
Merged

Conversation

sea-bass
Copy link
Owner

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

This PR adds a new /set_location_state service to the ROS interface to open, close, lock, and unlock locations.

Right now, only Hallways are supported, but more will eventually be tracked by #208.

To test, you can run commands like these:

ros2 launch pyrobosim_ros demo.launch.py

ros2 service call /set_location_state pyrobosim_msgs/srv/SetLocationState \
  "{location_name: hall_kitchen_bathroom, open: false, lock: false}"

Closes #213

Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
core
   __init__.py90100% 
   dynamics.py430100% 
   gazebo.py136894%55, 124, 230, 244–248
   hallway.py92891%192, 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.py3585385%235–236, 248–249, 252, 257, 285–288, 293–296, 303–304, 328, 372–375, 442–443, 445–446, 463–465, 525–527, 628, 662, 679, 693–696, 709, 717, 723, 729, 735, 747, 790, 808, 811, 816, 829–833
   room.py48197%113
   world.py66216175%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, 511–515, 517–519, 521–522, 525, 529–533, 536–538, 541–548, 579, 615–616, 619, 635, 665–666, 677, 680, 688, 704–708, 710–712, 715–716, 719–722, 724, 727, 729–731, 733–735, 737, 752, 759, 770–774, 809–810, 814–815, 833–834, 840–841, 843–844, 846, 848–849, 851, 853–854, 864–865, 868, 870, 884, 886, 893, 940, 971–972, 983, 994–996, 998–1001, 1003, 1020–1021, 1025–1026, 1061–1062, 1064, 1081–1082, 1113, 1127–1130, 1142–1145, 1159, 1170–1171, 1173, 1217–1218, 1270, 1350–1351, 1397
   yaml_utils.py1081189%64, 68, 153–155, 159–160, 180–181, 200–201
gui
   __init__.py20100% 
   main.py1983184%23–25, 46, 78–79, 197, 209–213, 220–223, 225, 228–234, 238, 243–244, 248–249, 260, 271
   world_canvas.py2445677%41–42, 44–48, 51, 59–60, 136–139, 146, 148, 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, 509, 523
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.py85692%72–74, 79–81
   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.py1105649%85, 160–161, 163, 167–176, 178–181, 183–187, 189–192, 194–198, 200–203, 205–212, 214–215, 217–219, 265–266, 269–273
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.py65592%85–89
   polygon.py1110100% 
   pose.py890100% 
   search_graph.py93396%240–242
   trajectory.py67198%165
TOTAL395158485% 

Tests Skipped Failures Errors Time
192 0 💤 0 ❌ 0 🔥 3m 12s ⏱️

@sea-bass sea-bass merged commit 3ff0468 into main Jul 14, 2024
7 checks passed
@sea-bass sea-bass deleted the ros-location-services branch July 14, 2024 18: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.

Add ROS services to open/close/lock/unlock locations in the world.
1 participant