From da75b9d9dad54876214e1e4113a362ebaea81918 Mon Sep 17 00:00:00 2001 From: agus-darmawan Date: Sun, 18 Oct 2026 13:26:23 +0700 Subject: [PATCH] refactor!: rename the robot_* packages to pashupati_* --- .github/pull_request_template.md | 2 +- .github/workflows/ci.yml | 6 +++--- CONTRIBUTING.md | 2 +- README.md | 20 +++++++++---------- docs/README.md | 4 ++-- docs/pdf/build.py | 8 ++++---- docs/tuning/tuning-guide.md | 2 +- script/env.sh | 2 +- script/start_tmux.sh | 10 +++++----- src/pashupati/launch/robot.launch.py | 18 ++++++++--------- src/pashupati/package.xml | 8 ++++---- src/pashupati/test/test_bringup.py | 2 +- src/pashupati/test/test_video.py | 4 ++-- .../PROTOCOL.md | 0 .../README.md | 6 +++--- .../config/bridge_params.yaml | 0 .../launch/bridge.launch.py | 4 ++-- .../package.xml | 2 +- .../pashupati_bridge}/__init__.py | 0 .../pashupati_bridge}/protocol.py | 0 .../pashupati_bridge}/teleop_udp_node.py | 2 +- .../pashupati_bridge}/video_stream_node.py | 0 .../resource/pashupati_bridge} | 0 src/pashupati_bridge/setup.cfg | 4 ++++ .../setup.py | 6 +++--- .../test/test_copyright.py | 0 .../test/test_flake8.py | 0 .../test/test_node_members.py | 0 .../test/test_pep257.py | 0 .../test/test_protocol.py | 6 +++--- .../test/test_teleop_node.py | 6 +++--- .../test/test_video_stream_node.py | 2 +- src/{robot_fleet => pashupati_fleet}/API.md | 0 .../README.md | 6 +++--- .../config/fleet_params.yaml | 0 .../launch/fleet.launch.py | 4 ++-- .../package.xml | 2 +- .../pashupati_fleet}/__init__.py | 0 .../pashupati_fleet}/anomaly.py | 0 .../pashupati_fleet}/crowd.py | 0 .../pashupati_fleet}/fleet_uplink_node.py | 10 +++++----- .../pashupati_fleet}/routes.py | 0 .../pashupati_fleet}/spool.py | 0 .../pashupati_fleet}/switches.py | 0 .../resource/pashupati_fleet} | 0 src/pashupati_fleet/setup.cfg | 4 ++++ src/{robot_fleet => pashupati_fleet}/setup.py | 6 ++++-- .../test/test_copyright.py | 0 .../test/test_flake8.py | 0 .../test/test_fleet_units.py | 14 ++++++------- .../test/test_node_members.py | 0 .../test/test_pep257.py | 0 .../README.md | 4 ++-- .../config/health_params.yaml | 0 .../launch/health.launch.py | 4 ++-- .../package.xml | 2 +- .../pashupati_health}/__init__.py | 0 .../pashupati_health}/checks.py | 0 .../pashupati_health}/health_monitor_node.py | 10 +++++----- .../resource/pashupati_health} | 0 src/pashupati_health/setup.cfg | 4 ++++ .../setup.py | 4 ++-- .../test/test_checks.py | 2 +- .../test/test_copyright.py | 0 .../test/test_flake8.py | 0 .../test/test_node_members.py | 0 .../test/test_pep257.py | 0 .../README.md | 8 ++++---- .../config/inspection_params.yaml | 0 .../launch/inspection.launch.py | 4 ++-- .../package.xml | 2 +- .../pashupati_inspection}/__init__.py | 0 .../anomaly_detector_node.py | 18 ++++++++--------- .../pashupati_inspection}/frame_queue.py | 0 .../pashupati_inspection}/vlm.py | 0 .../resource/pashupati_inspection} | 0 src/pashupati_inspection/setup.cfg | 4 ++++ .../setup.py | 4 ++-- .../test/test_copyright.py | 0 .../test/test_detector_node.py | 2 +- .../test/test_flake8.py | 0 .../test/test_frame_queue.py | 2 +- .../test/test_node_members.py | 0 .../test/test_pep257.py | 0 .../test/test_vlm.py | 4 ++-- .../CMakeLists.txt | 14 ++++++------- src/{robot_rviz => pashupati_rviz}/README.md | 2 +- .../pashupati_rviz}/cmd_vel_widget.hpp | 4 ++-- .../include/pashupati_rviz}/control_panel.hpp | 6 +++--- .../include/pashupati_rviz}/ros_panel.hpp | 4 ++-- .../include/pashupati_rviz}/status_panel.hpp | 8 ++++---- .../include/pashupati_rviz}/tag_panel.hpp | 6 +++--- .../include/pashupati_rviz}/tuning_panel.hpp | 6 +++--- .../package.xml | 2 +- .../plugin_description.xml | 18 ++++++++--------- .../rviz/robot.rviz | 16 +++++++-------- .../src/cmd_vel_widget.cpp | 4 ++-- .../src/control_panel.cpp | 8 ++++---- .../src/ros_panel.cpp | 6 +++--- .../src/status_panel.cpp | 8 ++++---- .../src/tag_panel.cpp | 8 ++++---- .../src/tuning_panel.cpp | 8 ++++---- src/{robot_sim => pashupati_sim}/README.md | 6 +++--- .../config/routes/mall_loop.csv | 0 .../config/sim_site.yaml | 4 ++-- .../config/worlds/mall_loop.yaml | 0 .../launch/sim.launch.py | 14 ++++++------- src/{robot_sim => pashupati_sim}/package.xml | 2 +- .../pashupati_sim}/__init__.py | 0 .../pashupati_sim}/sim_robot_node.py | 2 +- .../pashupati_sim}/world.py | 0 .../resource/pashupati_sim} | 0 src/pashupati_sim/setup.cfg | 4 ++++ src/{robot_sim => pashupati_sim}/setup.py | 4 ++-- .../test/test_copyright.py | 0 .../test/test_flake8.py | 0 .../test/test_node_members.py | 0 .../test/test_pep257.py | 0 .../test/test_sim_patrol.py | 12 +++++------ .../test/test_world.py | 2 +- src/robot_bridge/setup.cfg | 4 ---- src/robot_fleet/setup.cfg | 4 ---- src/robot_health/setup.cfg | 4 ---- src/robot_inspection/setup.cfg | 4 ---- src/robot_sim/setup.cfg | 4 ---- 125 files changed, 225 insertions(+), 223 deletions(-) rename src/{robot_bridge => pashupati_bridge}/PROTOCOL.md (100%) rename src/{robot_bridge => pashupati_bridge}/README.md (96%) rename src/{robot_bridge => pashupati_bridge}/config/bridge_params.yaml (100%) rename src/{robot_bridge => pashupati_bridge}/launch/bridge.launch.py (93%) rename src/{robot_bridge => pashupati_bridge}/package.xml (98%) rename src/{robot_bridge/robot_bridge => pashupati_bridge/pashupati_bridge}/__init__.py (100%) rename src/{robot_bridge/robot_bridge => pashupati_bridge/pashupati_bridge}/protocol.py (100%) rename src/{robot_bridge/robot_bridge => pashupati_bridge/pashupati_bridge}/teleop_udp_node.py (99%) rename src/{robot_bridge/robot_bridge => pashupati_bridge/pashupati_bridge}/video_stream_node.py (100%) rename src/{robot_bridge/resource/robot_bridge => pashupati_bridge/resource/pashupati_bridge} (100%) create mode 100644 src/pashupati_bridge/setup.cfg rename src/{robot_bridge => pashupati_bridge}/setup.py (83%) rename src/{robot_bridge => pashupati_bridge}/test/test_copyright.py (100%) rename src/{robot_bridge => pashupati_bridge}/test/test_flake8.py (100%) rename src/{robot_bridge => pashupati_bridge}/test/test_node_members.py (100%) rename src/{robot_bridge => pashupati_bridge}/test/test_pep257.py (100%) rename src/{robot_bridge => pashupati_bridge}/test/test_protocol.py (95%) rename src/{robot_bridge => pashupati_bridge}/test/test_teleop_node.py (98%) rename src/{robot_bridge => pashupati_bridge}/test/test_video_stream_node.py (97%) rename src/{robot_fleet => pashupati_fleet}/API.md (100%) rename src/{robot_fleet => pashupati_fleet}/README.md (89%) rename src/{robot_fleet => pashupati_fleet}/config/fleet_params.yaml (100%) rename src/{robot_fleet => pashupati_fleet}/launch/fleet.launch.py (93%) rename src/{robot_fleet => pashupati_fleet}/package.xml (97%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/__init__.py (100%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/anomaly.py (100%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/crowd.py (100%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/fleet_uplink_node.py (99%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/routes.py (100%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/spool.py (100%) rename src/{robot_fleet/robot_fleet => pashupati_fleet/pashupati_fleet}/switches.py (100%) rename src/{robot_fleet/resource/robot_fleet => pashupati_fleet/resource/pashupati_fleet} (100%) create mode 100644 src/pashupati_fleet/setup.cfg rename src/{robot_fleet => pashupati_fleet}/setup.py (83%) rename src/{robot_fleet => pashupati_fleet}/test/test_copyright.py (100%) rename src/{robot_fleet => pashupati_fleet}/test/test_flake8.py (100%) rename src/{robot_fleet => pashupati_fleet}/test/test_fleet_units.py (90%) rename src/{robot_fleet => pashupati_fleet}/test/test_node_members.py (100%) rename src/{robot_fleet => pashupati_fleet}/test/test_pep257.py (100%) rename src/{robot_health => pashupati_health}/README.md (95%) rename src/{robot_health => pashupati_health}/config/health_params.yaml (100%) rename src/{robot_health => pashupati_health}/launch/health.launch.py (88%) rename src/{robot_health => pashupati_health}/package.xml (96%) rename src/{robot_health/robot_health => pashupati_health/pashupati_health}/__init__.py (100%) rename src/{robot_health/robot_health => pashupati_health/pashupati_health}/checks.py (100%) rename src/{robot_health/robot_health => pashupati_health/pashupati_health}/health_monitor_node.py (99%) rename src/{robot_health/resource/robot_health => pashupati_health/resource/pashupati_health} (100%) create mode 100644 src/pashupati_health/setup.cfg rename src/{robot_health => pashupati_health}/setup.py (88%) rename src/{robot_health => pashupati_health}/test/test_checks.py (98%) rename src/{robot_health => pashupati_health}/test/test_copyright.py (100%) rename src/{robot_health => pashupati_health}/test/test_flake8.py (100%) rename src/{robot_health => pashupati_health}/test/test_node_members.py (100%) rename src/{robot_health => pashupati_health}/test/test_pep257.py (100%) rename src/{robot_inspection => pashupati_inspection}/README.md (95%) rename src/{robot_inspection => pashupati_inspection}/config/inspection_params.yaml (100%) rename src/{robot_inspection => pashupati_inspection}/launch/inspection.launch.py (87%) rename src/{robot_inspection => pashupati_inspection}/package.xml (96%) rename src/{robot_inspection/robot_inspection => pashupati_inspection/pashupati_inspection}/__init__.py (100%) rename src/{robot_inspection/robot_inspection => pashupati_inspection/pashupati_inspection}/anomaly_detector_node.py (99%) rename src/{robot_inspection/robot_inspection => pashupati_inspection/pashupati_inspection}/frame_queue.py (100%) rename src/{robot_inspection/robot_inspection => pashupati_inspection/pashupati_inspection}/vlm.py (100%) rename src/{robot_inspection/resource/robot_inspection => pashupati_inspection/resource/pashupati_inspection} (100%) create mode 100644 src/pashupati_inspection/setup.cfg rename src/{robot_inspection => pashupati_inspection}/setup.py (87%) rename src/{robot_inspection => pashupati_inspection}/test/test_copyright.py (100%) rename src/{robot_inspection => pashupati_inspection}/test/test_detector_node.py (99%) rename src/{robot_inspection => pashupati_inspection}/test/test_flake8.py (100%) rename src/{robot_inspection => pashupati_inspection}/test/test_frame_queue.py (97%) rename src/{robot_inspection => pashupati_inspection}/test/test_node_members.py (100%) rename src/{robot_inspection => pashupati_inspection}/test/test_pep257.py (100%) rename src/{robot_inspection => pashupati_inspection}/test/test_vlm.py (99%) rename src/{robot_rviz => pashupati_rviz}/CMakeLists.txt (86%) rename src/{robot_rviz => pashupati_rviz}/README.md (97%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/cmd_vel_widget.hpp (93%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/control_panel.hpp (96%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/ros_panel.hpp (95%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/status_panel.hpp (90%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/tag_panel.hpp (91%) rename src/{robot_rviz/include/robot_rviz => pashupati_rviz/include/pashupati_rviz}/tuning_panel.hpp (94%) rename src/{robot_rviz => pashupati_rviz}/package.xml (96%) rename src/{robot_rviz => pashupati_rviz}/plugin_description.xml (64%) rename src/{robot_rviz => pashupati_rviz}/rviz/robot.rviz (96%) rename src/{robot_rviz => pashupati_rviz}/src/cmd_vel_widget.cpp (96%) rename src/{robot_rviz => pashupati_rviz}/src/control_panel.cpp (98%) rename src/{robot_rviz => pashupati_rviz}/src/ros_panel.cpp (93%) rename src/{robot_rviz => pashupati_rviz}/src/status_panel.cpp (96%) rename src/{robot_rviz => pashupati_rviz}/src/tag_panel.cpp (94%) rename src/{robot_rviz => pashupati_rviz}/src/tuning_panel.cpp (98%) rename src/{robot_sim => pashupati_sim}/README.md (96%) rename src/{robot_sim => pashupati_sim}/config/routes/mall_loop.csv (100%) rename src/{robot_sim => pashupati_sim}/config/sim_site.yaml (90%) rename src/{robot_sim => pashupati_sim}/config/worlds/mall_loop.yaml (100%) rename src/{robot_sim => pashupati_sim}/launch/sim.launch.py (88%) rename src/{robot_sim => pashupati_sim}/package.xml (97%) rename src/{robot_sim/robot_sim => pashupati_sim/pashupati_sim}/__init__.py (100%) rename src/{robot_sim/robot_sim => pashupati_sim/pashupati_sim}/sim_robot_node.py (99%) rename src/{robot_sim/robot_sim => pashupati_sim/pashupati_sim}/world.py (100%) rename src/{robot_sim/resource/robot_sim => pashupati_sim/resource/pashupati_sim} (100%) create mode 100644 src/pashupati_sim/setup.cfg rename src/{robot_sim => pashupati_sim}/setup.py (91%) rename src/{robot_sim => pashupati_sim}/test/test_copyright.py (100%) rename src/{robot_sim => pashupati_sim}/test/test_flake8.py (100%) rename src/{robot_sim => pashupati_sim}/test/test_node_members.py (100%) rename src/{robot_sim => pashupati_sim}/test/test_pep257.py (100%) rename src/{robot_sim => pashupati_sim}/test/test_sim_patrol.py (94%) rename src/{robot_sim => pashupati_sim}/test/test_world.py (97%) delete mode 100644 src/robot_bridge/setup.cfg delete mode 100644 src/robot_fleet/setup.cfg delete mode 100644 src/robot_health/setup.cfg delete mode 100644 src/robot_inspection/setup.cfg delete mode 100644 src/robot_sim/setup.cfg diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c42fec5..93e1f13 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,7 @@ ## How it was tested - [ ] `colcon test` passes (CI green, simulator end-to-end test included) -- [ ] Tried in the simulator (`ros2 launch robot_sim sim.launch.py`), on the robot or in the dev +- [ ] Tried in the simulator (`ros2 launch pashupati_sim sim.launch.py`), on the robot or in the dev container: ## Checklist diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47b8cb2..7c280b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,8 @@ env: ROSDEP_SKIP: >- livox_ros_driver2 fast_lio legkilo apriltag_draw PACKAGES: >- - pashupati_perception robot_bridge robot_fleet robot_inspection robot_health robot_rviz - pashupati robot_sim + pashupati_perception pashupati_bridge pashupati_fleet pashupati_inspection pashupati_health pashupati_rviz + pashupati pashupati_sim jobs: scripts: @@ -128,7 +128,7 @@ jobs: source install/setup.bash ros2 launch pashupati robot.launch.py --show-args > /dev/null ros2 launch dharma_odometry odometry.launch.py --show-args > /dev/null - ros2 launch robot_sim sim.launch.py --show-args > /dev/null + ros2 launch pashupati_sim sim.launch.py --show-args > /dev/null - name: Test reports if: always() uses: actions/upload-artifact@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 227b299..7280bd8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,6 +68,6 @@ pure-logic tests also run with plain `pytest` on a laptop. Anything that changes how the robot moves (speeds, limits, e-stop, avoidance, the control mux, the teleop gateway) needs a test that drives the logic, a note in the PR on how it was tried on the robot (slow speed, open area, someone at the e-stop), and a CHANGELOG entry. Try it in the simulator -first (`ros2 launch robot_sim sim.launch.py autostart:=true rviz:=true`); its end-to-end test +first (`ros2 launch pashupati_sim sim.launch.py autostart:=true rviz:=true`); its end-to-end test (sliding around a person, stopping for a crowd, the handheld driving at a person) runs in CI and must stay green. diff --git a/README.md b/README.md index 051fdf2..313c4a2 100644 --- a/README.md +++ b/README.md @@ -137,13 +137,13 @@ flowchart LR | [`dharma_localization`](src/dharma_localization) | FAST-LIO frame bridge, `map→odom` from AprilTags / RViz, tag recording | | [`pashupati_perception`](src/pashupati_perception) | LiDAR sectors, AprilTag, person detection (YOLO11n ONNX) | | [`dharma_navigation`](src/dharma_navigation) | route processing, 5 controllers, 4 avoidance algorithms, final approach, safety | -| [`robot_bridge`](src/robot_bridge) | AUTO / REMOTE control mux, UDP teleop gateway ([protocol](src/robot_bridge/PROTOCOL.md)), WebRTC video | -| [`robot_fleet`](src/robot_fleet) | NETRA uplink: telemetry, events, crowd, anomalies, routes ([API](src/robot_fleet/API.md)) | -| [`robot_inspection`](src/robot_inspection) | VLM inspection (Ollama): continuous, interval queue or stop points, own finding types | -| [`robot_health`](src/robot_health) | node liveness, odometry / safety scan / e-stop state, sensor rates, CPU, GPU and RAM | -| [`robot_rviz`](src/robot_rviz) | RViz panels: Mission, Status, Tuning, AprilTags | +| [`pashupati_bridge`](src/pashupati_bridge) | AUTO / REMOTE control mux, UDP teleop gateway ([protocol](src/pashupati_bridge/PROTOCOL.md)), WebRTC video | +| [`pashupati_fleet`](src/pashupati_fleet) | NETRA uplink: telemetry, events, crowd, anomalies, routes ([API](src/pashupati_fleet/API.md)) | +| [`pashupati_inspection`](src/pashupati_inspection) | VLM inspection (Ollama): continuous, interval queue or stop points, own finding types | +| [`pashupati_health`](src/pashupati_health) | node liveness, odometry / safety scan / e-stop state, sensor rates, CPU, GPU and RAM | +| [`pashupati_rviz`](src/pashupati_rviz) | RViz panels: Mission, Status, Tuning, AprilTags | | [`pashupati`](src/pashupati) | the robot: one launch with respawning nodes, site configuration | -| [`robot_sim`](src/robot_sim) | simulated quadruped (driver, LiDAR, FAST-LIO interfaces) for the whole stack, end-to-end test | +| [`pashupati_sim`](src/pashupati_sim) | simulated quadruped (driver, LiDAR, FAST-LIO interfaces) for the whole stack, end-to-end test | @@ -206,7 +206,7 @@ nothing, or only the vendor's topics: echo "alias pashu='source ~/dev/Pashupati/script/env.sh'" >> ~/.bashrc # once pashu ros2 topic hz /perception/safety_scan -pnode robot_bridge teleop_udp_node bridge_params.yaml # one node, as robot.launch.py runs it +pnode pashupati_bridge teleop_udp_node bridge_params.yaml # one node, as robot.launch.py runs it ```
@@ -304,7 +304,7 @@ the tuned values with **Save YAML**. | Inspection | `ros2 topic echo /anomaly_detector/status`: state, model, pace, queue, finding types and the last result | | People | `ros2 topic echo /perception/people_status`: state, backend, count and boxes | | Logs | `journalctl -fu pashupati`; ROS logs older than 7 days are pruned at start | -| Debug view | RViz `robot_rviz/rviz/robot.rviz`: route coloured by speed, lookahead, cross-track, avoidance cone, approach target, tags | +| Debug view | RViz `pashupati_rviz/rviz/robot.rviz`: route coloured by speed, lookahead, cross-track, avoidance cone, approach target, tags |
Services @@ -395,10 +395,10 @@ On the robot during development, `script/start_tmux.sh teach|patrol` opens one p RViz, with the package default parameters and the env file's settings. **Simulation.** The whole stack runs against a simulated quadruped -([robot_sim](src/robot_sim)), with no robot, Gazebo or GPU: +([pashupati_sim](src/pashupati_sim)), with no robot, Gazebo or GPU: ```bash -ros2 launch robot_sim sim.launch.py autostart:=true rviz:=true +ros2 launch pashupati_sim sim.launch.py autostart:=true rviz:=true # a person steps onto the route ros2 topic pub --once /sim/obstacles geometry_msgs/msg/PoseArray "{poses: [{position: {x: 2.0, y: -3.0}}]}" ``` diff --git a/docs/README.md b/docs/README.md index e4d69f6..506fd0d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,8 +16,8 @@ parameter reference holds for every robot. |---|---| | [README](../README.md) | install, configuration, workflow, operations, development | | [Robot packages](../src/xtras/README.md) | what a robot package must provide, checklist for a new robot | -| [Handheld protocol](../src/robot_bridge/PROTOCOL.md) | the UDP protocol between the robot and the Pashupati Controller | -| [NETRA API](../src/robot_fleet/API.md) | what the robot sends to and takes from NETRA | +| [Handheld protocol](../src/pashupati_bridge/PROTOCOL.md) | the UDP protocol between the robot and the Pashupati Controller | +| [NETRA API](../src/pashupati_fleet/API.md) | what the robot sends to and takes from NETRA | | Package READMEs (`src/robot_*/README.md`) | nodes, topics, services and parameters of each package | | [CONTRIBUTING](../CONTRIBUTING.md) | branches, commits, rules that come from real crashes | | [CHANGELOG](../CHANGELOG.md) | changes per version | diff --git a/docs/pdf/build.py b/docs/pdf/build.py index 28c6b8b..518f1e9 100644 --- a/docs/pdf/build.py +++ b/docs/pdf/build.py @@ -32,13 +32,13 @@ # Config files of the parameter reference, in reading order: (package, file, what it covers) PARAMETER_FILES = [ ('pashupati', 'navigation_params.yaml', 'route following, avoidance, stops'), - ('robot_bridge', 'bridge_params.yaml', 'control mux, protective field, handheld, video'), + ('pashupati_bridge', 'bridge_params.yaml', 'control mux, protective field, handheld, video'), ('pashupati', 'perception_params.yaml', 'LiDAR sectors, people, AprilTags'), ('pashupati', 'localization_params.yaml', 'map frame from AprilTags'), - ('robot_inspection', 'inspection_params.yaml', 'AI inspection'), + ('pashupati_inspection', 'inspection_params.yaml', 'AI inspection'), ('pashupati', 'odometry_params.yaml', 'odometry start, monitor, route recording'), - ('robot_health', 'health_params.yaml', 'health monitor'), - ('robot_fleet', 'fleet_params.yaml', 'NETRA uplink'), + ('pashupati_health', 'health_params.yaml', 'health monitor'), + ('pashupati_fleet', 'fleet_params.yaml', 'NETRA uplink'), ] KEY_LINE = re.compile(r'^(?P *)(?P[A-Za-z0-9_./]+):\s*(?P.*)$') diff --git a/docs/tuning/tuning-guide.md b/docs/tuning/tuning-guide.md index 74fc01c..a656840 100644 --- a/docs/tuning/tuning-guide.md +++ b/docs/tuning/tuning-guide.md @@ -73,7 +73,7 @@ the site file. Only some nodes react to live changes: | `person_detector_node` | `enabled`, `confidence`, `rate_hz` | | all other nodes | nothing: `ros2 param set` is accepted, but the node only reads its parameters at start. Use the site file and restart | -The **Tuning** panel of RViz (`robot_rviz`) edits the navigation and avoidance parameters with +The **Tuning** panel of RViz (`pashupati_rviz`) edits the navigation and avoidance parameters with sliders; its **Save YAML…** button writes them to a file. RViz runs on a laptop with ROS 2 Humble on the robot's network: set `ROS_LOCALHOST_ONLY=0` in the env file, restart, and use the robot's `ROS_DOMAIN_ID` and `RMW_IMPLEMENTATION` on the laptop. diff --git a/script/env.sh b/script/env.sh index 4c0ece2..fdf246d 100644 --- a/script/env.sh +++ b/script/env.sh @@ -3,7 +3,7 @@ # # source ~/dev/Pashupati/script/env.sh # e.g. alias pashu='source ~/dev/Pashupati/script/env.sh' # ros2 topic list # sees the stack, not a vendor stack on another RMW -# pnode robot_bridge teleop_udp_node bridge_params.yaml [ros args] +# pnode pashupati_bridge teleop_udp_node bridge_params.yaml [ros args] # # pnode runs one node the way robot.launch.py does: package defaults, then SITE_CONFIG, then args. # Env: PASHUPATI_ENV (/etc/pashupati/pashupati.env), ROS_DISTRO (humble) diff --git a/script/start_tmux.sh b/script/start_tmux.sh index e49ae73..e368450 100755 --- a/script/start_tmux.sh +++ b/script/start_tmux.sh @@ -71,7 +71,7 @@ PERCEPTION="ros2 launch dharma_perception perception.launch.py visitors:=false p [[ "$PEOPLE" == "true" ]] && PERCEPTION+=" & ros2 launch pashupati_perception people.launch.py" run robot.2 "$PERCEPTION" if [[ "$RVIZ" == "1" ]]; then - run robot.3 "ros2 run rviz2 rviz2 -d \$(ros2 pkg prefix robot_rviz)/share/robot_rviz/rviz/robot.rviz \ + run robot.3 "ros2 run rviz2 rviz2 -d \$(ros2 pkg prefix pashupati_rviz)/share/pashupati_rviz/rviz/robot.rviz \ --ros-args -r battery:=/$ROBOT_NS/battery -r cmd_vel:=/$ROBOT_NS/cmd_vel \ -r motor_temperature:=/$ROBOT_NS/motor_temperature -r diagnostics:=/$ROBOT_NS/diagnostics" fi @@ -85,21 +85,21 @@ if [[ "$MODE" == "patrol" ]]; then cmd_vel_topic:=/bridge/nav_cmd_vel battery_topic:=/$ROBOT_NS/battery" fi tmux split-window -h -t "$SESSION:nav.0" -run nav.1 "ros2 launch robot_bridge bridge.launch.py robot_ns:=$ROBOT_NS" +run nav.1 "ros2 launch pashupati_bridge bridge.launch.py robot_ns:=$ROBOT_NS" tmux split-window -v -t "$SESSION:nav.1" FLEET_ARGS="robot_ns:=$ROBOT_NS" [[ -n "$CC_URL" ]] && FLEET_ARGS+=" server_url:=$CC_URL" [[ -n "$CC_TOKEN" ]] && FLEET_ARGS+=" token:=$CC_TOKEN" -run nav.2 "ros2 launch robot_fleet fleet.launch.py $FLEET_ARGS" +run nav.2 "ros2 launch pashupati_fleet fleet.launch.py $FLEET_ARGS" tmux send-keys -t "$SESSION:nav.3" "$SETUP" C-m tmux send-keys -t "$SESSION:nav.3" "# ros2 service call /localization/start std_srvs/srv/Trigger" C-m # Window 3: health and, when enabled, on-robot inspection (Moondream) tmux new-window -t "$SESSION" -n extra -run extra.0 "ros2 launch robot_health health.launch.py" +run extra.0 "ros2 launch pashupati_health health.launch.py" if truthy "$INSPECTION"; then tmux split-window -h -t "$SESSION:extra" - run extra.1 "ros2 launch robot_inspection inspection.launch.py" + run extra.1 "ros2 launch pashupati_inspection inspection.launch.py" fi tmux select-window -t "$SESSION:robot" diff --git a/src/pashupati/launch/robot.launch.py b/src/pashupati/launch/robot.launch.py index 451b334..705e7a0 100644 --- a/src/pashupati/launch/robot.launch.py +++ b/src/pashupati/launch/robot.launch.py @@ -102,7 +102,7 @@ def video_server(webrtc: str, binary: str, params_files: list): ) try: executable = os.path.join( - get_package_prefix('robot_bridge'), 'lib', 'robot_bridge', 'video_stream_node' + get_package_prefix('pashupati_bridge'), 'lib', 'pashupati_bridge', 'video_stream_node' ) except PackageNotFoundError: executable = '' @@ -161,7 +161,7 @@ def node(package, executable, defaults, overrides=None, remappings=None, **kwarg nav = share('pashupati', 'config', 'navigation_params.yaml') perception = share('pashupati', 'config', 'perception_params.yaml') - bridge = share('robot_bridge', 'config', 'bridge_params.yaml') + bridge = share('pashupati_bridge', 'config', 'bridge_params.yaml') version = package_version(share('pashupati', 'package.xml')) git = os.environ.get('PASHUPATI_GIT', 'unknown') @@ -251,7 +251,7 @@ def node(package, executable, defaults, overrides=None, remappings=None, **kwarg remappings=[('cmd_vel', topic('cmd_vel'))], ), node( - 'robot_bridge', + 'pashupati_bridge', 'teleop_udp_node', [bridge], teleop, @@ -265,9 +265,9 @@ def node(package, executable, defaults, overrides=None, remappings=None, **kwarg if arg('cc_url').strip(): actions.append( node( - 'robot_fleet', + 'pashupati_fleet', 'fleet_uplink_node', - [share('robot_fleet', 'config', 'fleet_params.yaml')], + [share('pashupati_fleet', 'config', 'fleet_params.yaml')], { 'server_url': arg('cc_url'), 'token': arg('cc_token'), @@ -286,17 +286,17 @@ def node(package, executable, defaults, overrides=None, remappings=None, **kwarg if truthy(arg('inspection')): actions.append( node( - 'robot_inspection', + 'pashupati_inspection', 'anomaly_detector_node', - [share('robot_inspection', 'config', 'inspection_params.yaml')], + [share('pashupati_inspection', 'config', 'inspection_params.yaml')], ) ) if truthy(arg('health')): actions.append( node( - 'robot_health', + 'pashupati_health', 'health_monitor_node', - [share('robot_health', 'config', 'health_params.yaml')], + [share('pashupati_health', 'config', 'health_params.yaml')], {'expected_nodes': expected_nodes(started, odometry), 'robot_ns': ns}, ) ) diff --git a/src/pashupati/package.xml b/src/pashupati/package.xml index dcd9dac..ecb5d29 100644 --- a/src/pashupati/package.xml +++ b/src/pashupati/package.xml @@ -17,10 +17,10 @@ pashupati_perception dharma_control dharma_navigation - robot_bridge - robot_fleet - robot_inspection - robot_health + pashupati_bridge + pashupati_fleet + pashupati_inspection + pashupati_health ament_copyright ament_flake8 diff --git a/src/pashupati/test/test_bringup.py b/src/pashupati/test/test_bringup.py index 9d8a5ee..21f501a 100644 --- a/src/pashupati/test/test_bringup.py +++ b/src/pashupati/test/test_bringup.py @@ -220,7 +220,7 @@ def servers(webrtc): config = yaml.safe_load(f) assert config['authInternalUsers'][1]['pass'] == password_hash('s3cret') command = shlex.split(config['paths']['camera']['runOnDemand']) - assert command[0].endswith(os.path.join('robot_bridge', 'video_stream_node')) + assert command[0].endswith(os.path.join('pashupati_bridge', 'video_stream_node')) assert str(site) in command # the encoder gets the same site parameters assert servers('false') == [] binary.write_text('#!/bin/sh\necho v1.9.0\n') diff --git a/src/pashupati/test/test_video.py b/src/pashupati/test/test_video.py index a96e74c..054911e 100644 --- a/src/pashupati/test/test_video.py +++ b/src/pashupati/test/test_video.py @@ -42,12 +42,12 @@ def test_gstreamer_check(monkeypatch): def test_only_the_handheld_may_watch_and_only_this_computer_publish(tmp_path): """Reading needs the token (stored as a hash), publishing comes from the loopback only.""" command = video.node_command( - '/ws/install/robot_bridge/lib/robot_bridge/video_stream_node', + '/ws/install/pashupati_bridge/lib/pashupati_bridge/video_stream_node', ['/ws/my params.yaml', '/etc/pashupati/site.yaml'], video.rtsp_url(), ) assert shlex.split(command) == [ - '/ws/install/robot_bridge/lib/robot_bridge/video_stream_node', + '/ws/install/pashupati_bridge/lib/pashupati_bridge/video_stream_node', '--ros-args', '--params-file', '/ws/my params.yaml', diff --git a/src/robot_bridge/PROTOCOL.md b/src/pashupati_bridge/PROTOCOL.md similarity index 100% rename from src/robot_bridge/PROTOCOL.md rename to src/pashupati_bridge/PROTOCOL.md diff --git a/src/robot_bridge/README.md b/src/pashupati_bridge/README.md similarity index 96% rename from src/robot_bridge/README.md rename to src/pashupati_bridge/README.md index 7d53386..bef0b5a 100644 --- a/src/robot_bridge/README.md +++ b/src/pashupati_bridge/README.md @@ -1,4 +1,4 @@ -# robot_bridge +# pashupati_bridge Who drives the robot, and how the handheld talks to it without ROS. @@ -73,7 +73,7 @@ MediaMTX serves WebRTC (WHEP) to the handheld. MediaMTX, its configuration and t ## Run ```bash -ros2 launch robot_bridge bridge.launch.py robot_ns:=robot +ros2 launch pashupati_bridge bridge.launch.py robot_ns:=robot ros2 launch dharma_navigation navigation.launch.py cmd_vel_topic:=/bridge/nav_cmd_vel ... ``` @@ -83,5 +83,5 @@ publish a compressed image (`camera_compressed: true`); raw images are JPEG-enco ## Test ```bash -colcon test --packages-select robot_bridge && colcon test-result --verbose +colcon test --packages-select pashupati_bridge && colcon test-result --verbose ``` diff --git a/src/robot_bridge/config/bridge_params.yaml b/src/pashupati_bridge/config/bridge_params.yaml similarity index 100% rename from src/robot_bridge/config/bridge_params.yaml rename to src/pashupati_bridge/config/bridge_params.yaml diff --git a/src/robot_bridge/launch/bridge.launch.py b/src/pashupati_bridge/launch/bridge.launch.py similarity index 93% rename from src/robot_bridge/launch/bridge.launch.py rename to src/pashupati_bridge/launch/bridge.launch.py index d666409..e59ab26 100644 --- a/src/robot_bridge/launch/bridge.launch.py +++ b/src/pashupati_bridge/launch/bridge.launch.py @@ -10,7 +10,7 @@ def generate_launch_description(): """Launch the control mux and the UDP teleop gateway.""" - share = get_package_share_directory('robot_bridge') + share = get_package_share_directory('pashupati_bridge') params = os.path.join(share, 'config', 'bridge_params.yaml') robot_ns = LaunchConfiguration('robot_ns') return LaunchDescription( @@ -26,7 +26,7 @@ def generate_launch_description(): remappings=[('cmd_vel', ['/', robot_ns, '/cmd_vel'])], ), Node( - package='robot_bridge', + package='pashupati_bridge', executable='teleop_udp_node', name='teleop_udp_node', output='screen', diff --git a/src/robot_bridge/package.xml b/src/pashupati_bridge/package.xml similarity index 98% rename from src/robot_bridge/package.xml rename to src/pashupati_bridge/package.xml index 172e85a..78ee580 100644 --- a/src/robot_bridge/package.xml +++ b/src/pashupati_bridge/package.xml @@ -1,7 +1,7 @@ - robot_bridge + pashupati_bridge 0.1.0 Auto/remote control mux, the UDP teleop gateway (no ROS on the handheld) and its WebRTC video encoder. Agus Darmawan diff --git a/src/robot_bridge/robot_bridge/__init__.py b/src/pashupati_bridge/pashupati_bridge/__init__.py similarity index 100% rename from src/robot_bridge/robot_bridge/__init__.py rename to src/pashupati_bridge/pashupati_bridge/__init__.py diff --git a/src/robot_bridge/robot_bridge/protocol.py b/src/pashupati_bridge/pashupati_bridge/protocol.py similarity index 100% rename from src/robot_bridge/robot_bridge/protocol.py rename to src/pashupati_bridge/pashupati_bridge/protocol.py diff --git a/src/robot_bridge/robot_bridge/teleop_udp_node.py b/src/pashupati_bridge/pashupati_bridge/teleop_udp_node.py similarity index 99% rename from src/robot_bridge/robot_bridge/teleop_udp_node.py rename to src/pashupati_bridge/pashupati_bridge/teleop_udp_node.py index ec272b2..6661972 100644 --- a/src/robot_bridge/robot_bridge/teleop_udp_node.py +++ b/src/pashupati_bridge/pashupati_bridge/teleop_udp_node.py @@ -15,6 +15,7 @@ from diagnostic_msgs.msg import DiagnosticArray from geometry_msgs.msg import Twist import numpy as np +from pashupati_bridge import protocol from rcl_interfaces.msg import ParameterType from rcl_interfaces.srv import GetParameters, SetParameters import rclpy @@ -23,7 +24,6 @@ from rclpy.parameter import Parameter from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile from rclpy.time import Time -from robot_bridge import protocol from sensor_msgs.msg import BatteryState, CameraInfo, CompressedImage, Image, PointCloud2 from std_msgs.msg import Bool, String from std_srvs.srv import SetBool, Trigger diff --git a/src/robot_bridge/robot_bridge/video_stream_node.py b/src/pashupati_bridge/pashupati_bridge/video_stream_node.py similarity index 100% rename from src/robot_bridge/robot_bridge/video_stream_node.py rename to src/pashupati_bridge/pashupati_bridge/video_stream_node.py diff --git a/src/robot_bridge/resource/robot_bridge b/src/pashupati_bridge/resource/pashupati_bridge similarity index 100% rename from src/robot_bridge/resource/robot_bridge rename to src/pashupati_bridge/resource/pashupati_bridge diff --git a/src/pashupati_bridge/setup.cfg b/src/pashupati_bridge/setup.cfg new file mode 100644 index 0000000..814134f --- /dev/null +++ b/src/pashupati_bridge/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/pashupati_bridge +[install] +install_scripts=$base/lib/pashupati_bridge diff --git a/src/robot_bridge/setup.py b/src/pashupati_bridge/setup.py similarity index 83% rename from src/robot_bridge/setup.py rename to src/pashupati_bridge/setup.py index a1e88c8..9b18ebd 100644 --- a/src/robot_bridge/setup.py +++ b/src/pashupati_bridge/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'robot_bridge' +package_name = 'pashupati_bridge' setup( name=package_name, @@ -24,8 +24,8 @@ license='Apache-2.0', entry_points={ 'console_scripts': [ - 'teleop_udp_node = robot_bridge.teleop_udp_node:main', - 'video_stream_node = robot_bridge.video_stream_node:main', + 'teleop_udp_node = pashupati_bridge.teleop_udp_node:main', + 'video_stream_node = pashupati_bridge.video_stream_node:main', ], }, ) diff --git a/src/robot_bridge/test/test_copyright.py b/src/pashupati_bridge/test/test_copyright.py similarity index 100% rename from src/robot_bridge/test/test_copyright.py rename to src/pashupati_bridge/test/test_copyright.py diff --git a/src/robot_bridge/test/test_flake8.py b/src/pashupati_bridge/test/test_flake8.py similarity index 100% rename from src/robot_bridge/test/test_flake8.py rename to src/pashupati_bridge/test/test_flake8.py diff --git a/src/robot_bridge/test/test_node_members.py b/src/pashupati_bridge/test/test_node_members.py similarity index 100% rename from src/robot_bridge/test/test_node_members.py rename to src/pashupati_bridge/test/test_node_members.py diff --git a/src/robot_bridge/test/test_pep257.py b/src/pashupati_bridge/test/test_pep257.py similarity index 100% rename from src/robot_bridge/test/test_pep257.py rename to src/pashupati_bridge/test/test_pep257.py diff --git a/src/robot_bridge/test/test_protocol.py b/src/pashupati_bridge/test/test_protocol.py similarity index 95% rename from src/robot_bridge/test/test_protocol.py rename to src/pashupati_bridge/test/test_protocol.py index 95972b9..b0298ab 100644 --- a/src/robot_bridge/test/test_protocol.py +++ b/src/pashupati_bridge/test/test_protocol.py @@ -2,8 +2,8 @@ import types import numpy as np +from pashupati_bridge import protocol import pytest -from robot_bridge import protocol def test_tag_quads_are_image_fractions(): @@ -65,7 +65,7 @@ def test_discovery_beacon_and_seq(): """A discover probe gets a beacon without the token; states carry an increasing seq.""" import socket - node_module = pytest.importorskip('robot_bridge.teleop_udp_node') + node_module = pytest.importorskip('pashupati_bridge.teleop_udp_node') node = node_module.TeleopUdpNode.__new__(node_module.TeleopUdpNode) node._robot_name, node._token, node._client, node._client_seen = 'dog-01', 'secret', None, 0.0 node._client_timeout, node._client_name, node._seq = 1.0, '', 0 @@ -97,7 +97,7 @@ def test_discovery_beacon_and_seq(): def test_camera_rate_from_the_handheld_is_bounded(): """camera_fps from the client is capped by the parameter; NaN, text and bools are ignored.""" - node_module = pytest.importorskip('robot_bridge.teleop_udp_node') + node_module = pytest.importorskip('pashupati_bridge.teleop_udp_node') node = node_module.TeleopUdpNode.__new__(node_module.TeleopUdpNode) node.get_parameter = lambda name: types.SimpleNamespace(value=8.0) node._camera_period = 0.125 diff --git a/src/robot_bridge/test/test_teleop_node.py b/src/pashupati_bridge/test/test_teleop_node.py similarity index 98% rename from src/robot_bridge/test/test_teleop_node.py rename to src/pashupati_bridge/test/test_teleop_node.py index 383c773..ffb3448 100644 --- a/src/robot_bridge/test/test_teleop_node.py +++ b/src/pashupati_bridge/test/test_teleop_node.py @@ -10,7 +10,7 @@ Twist = pytest.importorskip('geometry_msgs.msg').Twist String = pytest.importorskip('std_msgs.msg').String SingleThreadedExecutor = pytest.importorskip('rclpy.executors').SingleThreadedExecutor -TeleopUdpNode = pytest.importorskip('robot_bridge.teleop_udp_node').TeleopUdpNode +TeleopUdpNode = pytest.importorskip('pashupati_bridge.teleop_udp_node').TeleopUdpNode TOKEN = 'secret' @@ -296,7 +296,7 @@ def acks_of(rig, sock) -> dict: def test_inspection_arguments_are_checked(): """inspection_set maps to the detector's live parameters; junk is refused with the reason.""" - from robot_bridge.teleop_udp_node import inspection_parameters, set_parameters_request + from pashupati_bridge.teleop_udp_node import inspection_parameters, set_parameters_request assert inspection_parameters({'enabled': False, 'model': ' moondream ', 'interval': 0}) == [ ('enabled', False), @@ -313,7 +313,7 @@ def test_inspection_arguments_are_checked(): def test_own_finding_types_map_to_the_category_parameters(): """The handheld's types become names, reported names and 'name: description' entries.""" - from robot_bridge.teleop_udp_node import inspection_parameters, set_parameters_request + from pashupati_bridge.teleop_udp_node import inspection_parameters, set_parameters_request types = [ {'name': 'trash', 'desc': '', 'report': True}, diff --git a/src/robot_bridge/test/test_video_stream_node.py b/src/pashupati_bridge/test/test_video_stream_node.py similarity index 97% rename from src/robot_bridge/test/test_video_stream_node.py rename to src/pashupati_bridge/test/test_video_stream_node.py index bcae747..e764fdd 100644 --- a/src/robot_bridge/test/test_video_stream_node.py +++ b/src/pashupati_bridge/test/test_video_stream_node.py @@ -3,7 +3,7 @@ import numpy as np import pytest -video = pytest.importorskip('robot_bridge.video_stream_node') +video = pytest.importorskip('pashupati_bridge.video_stream_node') URL = 'rtsp://127.0.0.1:8654/camera' diff --git a/src/robot_fleet/API.md b/src/pashupati_fleet/API.md similarity index 100% rename from src/robot_fleet/API.md rename to src/pashupati_fleet/API.md diff --git a/src/robot_fleet/README.md b/src/pashupati_fleet/README.md similarity index 89% rename from src/robot_fleet/README.md rename to src/pashupati_fleet/README.md index 7de0c77..40e7284 100644 --- a/src/robot_fleet/README.md +++ b/src/pashupati_fleet/README.md @@ -1,4 +1,4 @@ -# robot_fleet +# pashupati_fleet Robot side of the NETRA command center. `fleet_uplink_node` keeps one WebSocket to the server and an on-disk outbox for uploads, so a robot that loses Wi-Fi in the middle of a patrol loses nothing. @@ -18,7 +18,7 @@ Commands from the server (`start_patrol`, `stop_patrol`, `pause`, `resume`, `loc ## Run ```bash -ros2 launch robot_fleet fleet.launch.py robot_ns:=robot \ +ros2 launch pashupati_fleet fleet.launch.py robot_ns:=robot \ server_url:=https://netra.example.com token:= ``` @@ -28,5 +28,5 @@ Without `server_url` the node only spools uploads (`~/.pashupati/spool`). Parame ## Test ```bash -colcon test --packages-select robot_fleet && colcon test-result --verbose +colcon test --packages-select pashupati_fleet && colcon test-result --verbose ``` diff --git a/src/robot_fleet/config/fleet_params.yaml b/src/pashupati_fleet/config/fleet_params.yaml similarity index 100% rename from src/robot_fleet/config/fleet_params.yaml rename to src/pashupati_fleet/config/fleet_params.yaml diff --git a/src/robot_fleet/launch/fleet.launch.py b/src/pashupati_fleet/launch/fleet.launch.py similarity index 93% rename from src/robot_fleet/launch/fleet.launch.py rename to src/pashupati_fleet/launch/fleet.launch.py index 2ffc836..5e1c674 100644 --- a/src/robot_fleet/launch/fleet.launch.py +++ b/src/pashupati_fleet/launch/fleet.launch.py @@ -10,7 +10,7 @@ def generate_launch_description(): """Launch the command-center uplink.""" - share = get_package_share_directory('robot_fleet') + share = get_package_share_directory('pashupati_fleet') params = os.path.join(share, 'config', 'fleet_params.yaml') robot_ns = LaunchConfiguration('robot_ns') return LaunchDescription( @@ -20,7 +20,7 @@ def generate_launch_description(): DeclareLaunchArgument('server_url', default_value=''), DeclareLaunchArgument('token', default_value=''), Node( - package='robot_fleet', + package='pashupati_fleet', executable='fleet_uplink_node', name='fleet_uplink_node', output='screen', diff --git a/src/robot_fleet/package.xml b/src/pashupati_fleet/package.xml similarity index 97% rename from src/robot_fleet/package.xml rename to src/pashupati_fleet/package.xml index 6e26516..73e7b6a 100644 --- a/src/robot_fleet/package.xml +++ b/src/pashupati_fleet/package.xml @@ -1,7 +1,7 @@ - robot_fleet + pashupati_fleet 0.1.0 Robot side of the NETRA command center: telemetry, events, crowd, anomalies, routes. Agus Darmawan diff --git a/src/robot_fleet/robot_fleet/__init__.py b/src/pashupati_fleet/pashupati_fleet/__init__.py similarity index 100% rename from src/robot_fleet/robot_fleet/__init__.py rename to src/pashupati_fleet/pashupati_fleet/__init__.py diff --git a/src/robot_fleet/robot_fleet/anomaly.py b/src/pashupati_fleet/pashupati_fleet/anomaly.py similarity index 100% rename from src/robot_fleet/robot_fleet/anomaly.py rename to src/pashupati_fleet/pashupati_fleet/anomaly.py diff --git a/src/robot_fleet/robot_fleet/crowd.py b/src/pashupati_fleet/pashupati_fleet/crowd.py similarity index 100% rename from src/robot_fleet/robot_fleet/crowd.py rename to src/pashupati_fleet/pashupati_fleet/crowd.py diff --git a/src/robot_fleet/robot_fleet/fleet_uplink_node.py b/src/pashupati_fleet/pashupati_fleet/fleet_uplink_node.py similarity index 99% rename from src/robot_fleet/robot_fleet/fleet_uplink_node.py rename to src/pashupati_fleet/pashupati_fleet/fleet_uplink_node.py index 4961e91..1aec7e6 100644 --- a/src/robot_fleet/robot_fleet/fleet_uplink_node.py +++ b/src/pashupati_fleet/pashupati_fleet/fleet_uplink_node.py @@ -13,6 +13,11 @@ from dharma_interfaces.srv import LoadPath from diagnostic_msgs.msg import DiagnosticArray from geometry_msgs.msg import PoseArray +from pashupati_fleet.anomaly import parse_result +from pashupati_fleet.crowd import CrowdAggregator +from pashupati_fleet.routes import safe_route_id, summarize_csv +from pashupati_fleet.spool import Spool +from pashupati_fleet.switches import live_parameters, status_summary, SWITCHES from rcl_interfaces.srv import SetParameters import rclpy from rclpy.executors import ExternalShutdownException @@ -20,11 +25,6 @@ from rclpy.parameter import Parameter from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile from rclpy.time import Time -from robot_fleet.anomaly import parse_result -from robot_fleet.crowd import CrowdAggregator -from robot_fleet.routes import safe_route_id, summarize_csv -from robot_fleet.spool import Spool -from robot_fleet.switches import live_parameters, status_summary, SWITCHES from sensor_msgs.msg import BatteryState, CompressedImage from std_msgs.msg import Bool, String from std_srvs.srv import SetBool, Trigger diff --git a/src/robot_fleet/robot_fleet/routes.py b/src/pashupati_fleet/pashupati_fleet/routes.py similarity index 100% rename from src/robot_fleet/robot_fleet/routes.py rename to src/pashupati_fleet/pashupati_fleet/routes.py diff --git a/src/robot_fleet/robot_fleet/spool.py b/src/pashupati_fleet/pashupati_fleet/spool.py similarity index 100% rename from src/robot_fleet/robot_fleet/spool.py rename to src/pashupati_fleet/pashupati_fleet/spool.py diff --git a/src/robot_fleet/robot_fleet/switches.py b/src/pashupati_fleet/pashupati_fleet/switches.py similarity index 100% rename from src/robot_fleet/robot_fleet/switches.py rename to src/pashupati_fleet/pashupati_fleet/switches.py diff --git a/src/robot_fleet/resource/robot_fleet b/src/pashupati_fleet/resource/pashupati_fleet similarity index 100% rename from src/robot_fleet/resource/robot_fleet rename to src/pashupati_fleet/resource/pashupati_fleet diff --git a/src/pashupati_fleet/setup.cfg b/src/pashupati_fleet/setup.cfg new file mode 100644 index 0000000..6fedb45 --- /dev/null +++ b/src/pashupati_fleet/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/pashupati_fleet +[install] +install_scripts=$base/lib/pashupati_fleet diff --git a/src/robot_fleet/setup.py b/src/pashupati_fleet/setup.py similarity index 83% rename from src/robot_fleet/setup.py rename to src/pashupati_fleet/setup.py index 1cf9525..270d470 100644 --- a/src/robot_fleet/setup.py +++ b/src/pashupati_fleet/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'robot_fleet' +package_name = 'pashupati_fleet' setup( name=package_name, @@ -22,5 +22,7 @@ maintainer_email='darmawandeveloper@gmail.com', description='Robot side of the NETRA command center', license='Apache-2.0', - entry_points={'console_scripts': ['fleet_uplink_node = robot_fleet.fleet_uplink_node:main']}, + entry_points={ + 'console_scripts': ['fleet_uplink_node = pashupati_fleet.fleet_uplink_node:main'], + }, ) diff --git a/src/robot_fleet/test/test_copyright.py b/src/pashupati_fleet/test/test_copyright.py similarity index 100% rename from src/robot_fleet/test/test_copyright.py rename to src/pashupati_fleet/test/test_copyright.py diff --git a/src/robot_fleet/test/test_flake8.py b/src/pashupati_fleet/test/test_flake8.py similarity index 100% rename from src/robot_fleet/test/test_flake8.py rename to src/pashupati_fleet/test/test_flake8.py diff --git a/src/robot_fleet/test/test_fleet_units.py b/src/pashupati_fleet/test/test_fleet_units.py similarity index 90% rename from src/robot_fleet/test/test_fleet_units.py rename to src/pashupati_fleet/test/test_fleet_units.py index acddb94..291f829 100644 --- a/src/robot_fleet/test/test_fleet_units.py +++ b/src/pashupati_fleet/test/test_fleet_units.py @@ -1,9 +1,9 @@ import json -from robot_fleet.anomaly import parse_result -from robot_fleet.crowd import CrowdAggregator -from robot_fleet.routes import summarize_csv -from robot_fleet.spool import Spool +from pashupati_fleet.anomaly import parse_result +from pashupati_fleet.crowd import CrowdAggregator +from pashupati_fleet.routes import summarize_csv +from pashupati_fleet.spool import Spool def test_crowd_keeps_peak_per_cell_and_window(): @@ -60,7 +60,7 @@ def test_spool_quarantines_unreadable_items(tmp_path): def test_route_ids_cannot_escape_the_routes_dir(): """Only plain ids are accepted for downloaded routes.""" - from robot_fleet.routes import safe_route_id + from pashupati_fleet.routes import safe_route_id for good in ('42', 42, 'route-7', 'a1b2_c3.v2'): assert safe_route_id(good) @@ -71,7 +71,7 @@ def test_route_ids_cannot_escape_the_routes_dir(): def test_live_switches_from_the_command_center(): """set_inspection / set_people map to the detectors' live parameters; junk is refused.""" import pytest - from robot_fleet.switches import live_parameters, status_summary + from pashupati_fleet.switches import live_parameters, status_summary assert live_parameters('set_people', {'enabled': False}) == [('enabled', False)] assert live_parameters('set_inspection', {'model': ' moondream ', 'interval': -9}) == [ @@ -95,7 +95,7 @@ def test_queued_finding_takes_the_pose_of_when_it_was_seen(): """A frame inspected late is placed where the robot was when the camera took it.""" import pytest - pose_at = pytest.importorskip('robot_fleet.fleet_uplink_node').pose_at + pose_at = pytest.importorskip('pashupati_fleet.fleet_uplink_node').pose_at history = [(100.0, {'x': 0.0}), (101.0, {'x': 0.5}), (102.0, {'x': 1.0})] assert pose_at(history, 101.3) == {'x': 0.5} assert pose_at(history, 107.5) is None # nothing recorded within 5 s diff --git a/src/robot_fleet/test/test_node_members.py b/src/pashupati_fleet/test/test_node_members.py similarity index 100% rename from src/robot_fleet/test/test_node_members.py rename to src/pashupati_fleet/test/test_node_members.py diff --git a/src/robot_fleet/test/test_pep257.py b/src/pashupati_fleet/test/test_pep257.py similarity index 100% rename from src/robot_fleet/test/test_pep257.py rename to src/pashupati_fleet/test/test_pep257.py diff --git a/src/robot_health/README.md b/src/pashupati_health/README.md similarity index 95% rename from src/robot_health/README.md rename to src/pashupati_health/README.md index bd02d4a..ffb1927 100644 --- a/src/robot_health/README.md +++ b/src/pashupati_health/README.md @@ -1,4 +1,4 @@ -# robot_health +# pashupati_health `health_monitor_node` watches what a patrol depends on and says when something is off. @@ -18,6 +18,6 @@ | `health/status` | `std_msgs/String` (JSON, latched) | `{ok, level (ok\|warn\|error), issues[], topics{topic: hz}, odometry, localization, field, estop, cpu_temp_c, memory_percent, memory_used_gb, memory_total_gb, cpu_percent, gpu_percent, disk_free_gb, load}` — shown on the teleop and sent to NETRA with the telemetry | ```bash -ros2 launch robot_health health.launch.py +ros2 launch pashupati_health health.launch.py ros2 topic echo /health/status ``` diff --git a/src/robot_health/config/health_params.yaml b/src/pashupati_health/config/health_params.yaml similarity index 100% rename from src/robot_health/config/health_params.yaml rename to src/pashupati_health/config/health_params.yaml diff --git a/src/robot_health/launch/health.launch.py b/src/pashupati_health/launch/health.launch.py similarity index 88% rename from src/robot_health/launch/health.launch.py rename to src/pashupati_health/launch/health.launch.py index 283102e..4a24f33 100644 --- a/src/robot_health/launch/health.launch.py +++ b/src/pashupati_health/launch/health.launch.py @@ -10,13 +10,13 @@ def generate_launch_description(): """Launch the health monitor.""" - share = get_package_share_directory('robot_health') + share = get_package_share_directory('pashupati_health') params = os.path.join(share, 'config', 'health_params.yaml') return LaunchDescription( [ DeclareLaunchArgument('params_file', default_value=params), Node( - package='robot_health', + package='pashupati_health', executable='health_monitor_node', name='health_monitor_node', output='screen', diff --git a/src/robot_health/package.xml b/src/pashupati_health/package.xml similarity index 96% rename from src/robot_health/package.xml rename to src/pashupati_health/package.xml index 874c007..53fb1a4 100644 --- a/src/robot_health/package.xml +++ b/src/pashupati_health/package.xml @@ -1,7 +1,7 @@ - robot_health + pashupati_health 0.1.0 Sensor topic rates and computer health as diagnostics and a JSON summary. Agus Darmawan diff --git a/src/robot_health/robot_health/__init__.py b/src/pashupati_health/pashupati_health/__init__.py similarity index 100% rename from src/robot_health/robot_health/__init__.py rename to src/pashupati_health/pashupati_health/__init__.py diff --git a/src/robot_health/robot_health/checks.py b/src/pashupati_health/pashupati_health/checks.py similarity index 100% rename from src/robot_health/robot_health/checks.py rename to src/pashupati_health/pashupati_health/checks.py diff --git a/src/robot_health/robot_health/health_monitor_node.py b/src/pashupati_health/pashupati_health/health_monitor_node.py similarity index 99% rename from src/robot_health/robot_health/health_monitor_node.py rename to src/pashupati_health/pashupati_health/health_monitor_node.py index bb82032..639aa00 100644 --- a/src/robot_health/robot_health/health_monitor_node.py +++ b/src/pashupati_health/pashupati_health/health_monitor_node.py @@ -4,11 +4,7 @@ import time from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus, KeyValue -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node -from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile -from robot_health.checks import ( +from pashupati_health.checks import ( cpu_temperature, CpuUsage, disk_free_gb, @@ -21,6 +17,10 @@ RateTracker, state_issues, ) +import rclpy +from rclpy.executors import ExternalShutdownException +from rclpy.node import Node +from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile from rosidl_runtime_py.utilities import get_message from std_msgs.msg import Bool, String diff --git a/src/robot_health/resource/robot_health b/src/pashupati_health/resource/pashupati_health similarity index 100% rename from src/robot_health/resource/robot_health rename to src/pashupati_health/resource/pashupati_health diff --git a/src/pashupati_health/setup.cfg b/src/pashupati_health/setup.cfg new file mode 100644 index 0000000..2e2be69 --- /dev/null +++ b/src/pashupati_health/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/pashupati_health +[install] +install_scripts=$base/lib/pashupati_health diff --git a/src/robot_health/setup.py b/src/pashupati_health/setup.py similarity index 88% rename from src/robot_health/setup.py rename to src/pashupati_health/setup.py index e5963b3..17b70b8 100644 --- a/src/robot_health/setup.py +++ b/src/pashupati_health/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'robot_health' +package_name = 'pashupati_health' setup( name=package_name, @@ -24,7 +24,7 @@ license='Apache-2.0', entry_points={ 'console_scripts': [ - 'health_monitor_node = robot_health.health_monitor_node:main', + 'health_monitor_node = pashupati_health.health_monitor_node:main', ], }, ) diff --git a/src/robot_health/test/test_checks.py b/src/pashupati_health/test/test_checks.py similarity index 98% rename from src/robot_health/test/test_checks.py rename to src/pashupati_health/test/test_checks.py index 8d31720..5e06815 100644 --- a/src/robot_health/test/test_checks.py +++ b/src/pashupati_health/test/test_checks.py @@ -1,4 +1,4 @@ -from robot_health.checks import ( +from pashupati_health.checks import ( CpuUsage, disk_free_gb, gpu_load_path, diff --git a/src/robot_health/test/test_copyright.py b/src/pashupati_health/test/test_copyright.py similarity index 100% rename from src/robot_health/test/test_copyright.py rename to src/pashupati_health/test/test_copyright.py diff --git a/src/robot_health/test/test_flake8.py b/src/pashupati_health/test/test_flake8.py similarity index 100% rename from src/robot_health/test/test_flake8.py rename to src/pashupati_health/test/test_flake8.py diff --git a/src/robot_health/test/test_node_members.py b/src/pashupati_health/test/test_node_members.py similarity index 100% rename from src/robot_health/test/test_node_members.py rename to src/pashupati_health/test/test_node_members.py diff --git a/src/robot_health/test/test_pep257.py b/src/pashupati_health/test/test_pep257.py similarity index 100% rename from src/robot_health/test/test_pep257.py rename to src/pashupati_health/test/test_pep257.py diff --git a/src/robot_inspection/README.md b/src/pashupati_inspection/README.md similarity index 95% rename from src/robot_inspection/README.md rename to src/pashupati_inspection/README.md index 5319df5..73e8ed5 100644 --- a/src/robot_inspection/README.md +++ b/src/pashupati_inspection/README.md @@ -1,4 +1,4 @@ -# robot_inspection +# pashupati_inspection `anomaly_detector_node` — early anomaly detection on the robot with a local vision-language model (Ollama, no cloud). The NETRA command center runs the final detection and the operator validation. @@ -7,7 +7,7 @@ |---|---|---| | `image_topic` (`/camera/camera/color/image_raw`) | `sensor_msgs/Image` | camera input | | `~/check_now` (`/anomaly_detector_node/check_now`) | `std_srvs/Trigger` | inspect the latest frame now; called by `path_follower_node` at every stop point | -| `anomaly_detector/result` | `std_msgs/String` (JSON) | `{category, description, model, latency_ms, is_anomaly, source, evidence_stamp}`, published only for `alarm_categories`; `robot_fleet` uploads them with the evidence frame and pose | +| `anomaly_detector/result` | `std_msgs/String` (JSON) | `{category, description, model, latency_ms, is_anomaly, source, evidence_stamp}`, published only for `alarm_categories`; `pashupati_fleet` uploads them with the evidence frame and pose | | `anomaly_detector/evidence` | `sensor_msgs/CompressedImage` | the camera frame the result was detected in (full size), published just before the result; its stamp equals `evidence_stamp` | | `anomaly_detector/status` | `std_msgs/String` (JSON, latched, every 2 s and on change) | `{enabled, model, state (loading, running, off, error), error, interval_sec, models [{name, installed, active}], last {category, reported, latency_ms, description, source, at}, inspections, reports}`, shown on the handheld | @@ -69,8 +69,8 @@ inspection and the raw answer). ## Run ```bash -ros2 launch robot_inspection inspection.launch.py -ros2 run robot_inspection anomaly_detector_node --ros-args \ +ros2 launch pashupati_inspection inspection.launch.py +ros2 run pashupati_inspection anomaly_detector_node --ros-args \ -p model:=ahmadwaqar/smolvlm2-2.2b-instruct:latest -p describe:=true -p debug:=true ros2 service call /anomaly_detector_node/check_now std_srvs/srv/Trigger ros2 topic echo /anomaly_detector/result diff --git a/src/robot_inspection/config/inspection_params.yaml b/src/pashupati_inspection/config/inspection_params.yaml similarity index 100% rename from src/robot_inspection/config/inspection_params.yaml rename to src/pashupati_inspection/config/inspection_params.yaml diff --git a/src/robot_inspection/launch/inspection.launch.py b/src/pashupati_inspection/launch/inspection.launch.py similarity index 87% rename from src/robot_inspection/launch/inspection.launch.py rename to src/pashupati_inspection/launch/inspection.launch.py index 10bcbb0..a446e38 100644 --- a/src/robot_inspection/launch/inspection.launch.py +++ b/src/pashupati_inspection/launch/inspection.launch.py @@ -10,13 +10,13 @@ def generate_launch_description(): """Launch the VLM anomaly detector.""" - share = get_package_share_directory('robot_inspection') + share = get_package_share_directory('pashupati_inspection') params = os.path.join(share, 'config', 'inspection_params.yaml') return LaunchDescription( [ DeclareLaunchArgument('params_file', default_value=params), Node( - package='robot_inspection', + package='pashupati_inspection', executable='anomaly_detector_node', name='anomaly_detector_node', output='screen', diff --git a/src/robot_inspection/package.xml b/src/pashupati_inspection/package.xml similarity index 96% rename from src/robot_inspection/package.xml rename to src/pashupati_inspection/package.xml index 65738fc..ca65551 100644 --- a/src/robot_inspection/package.xml +++ b/src/pashupati_inspection/package.xml @@ -1,7 +1,7 @@ - robot_inspection + pashupati_inspection 0.1.0 Early anomaly detection on the robot with a local VLM via Ollama. Agus Darmawan diff --git a/src/robot_inspection/robot_inspection/__init__.py b/src/pashupati_inspection/pashupati_inspection/__init__.py similarity index 100% rename from src/robot_inspection/robot_inspection/__init__.py rename to src/pashupati_inspection/pashupati_inspection/__init__.py diff --git a/src/robot_inspection/robot_inspection/anomaly_detector_node.py b/src/pashupati_inspection/pashupati_inspection/anomaly_detector_node.py similarity index 99% rename from src/robot_inspection/robot_inspection/anomaly_detector_node.py rename to src/pashupati_inspection/pashupati_inspection/anomaly_detector_node.py index 5e5dba0..4e28324 100644 --- a/src/robot_inspection/robot_inspection/anomaly_detector_node.py +++ b/src/pashupati_inspection/pashupati_inspection/anomaly_detector_node.py @@ -9,15 +9,8 @@ import cv2 import numpy as np -from rcl_interfaces.msg import SetParametersResult -import rclpy -from rclpy.callback_groups import MutuallyExclusiveCallbackGroup, ReentrantCallbackGroup -from rclpy.executors import ExternalShutdownException, MultiThreadedExecutor -from rclpy.node import Node -from rclpy.parameter import Parameter -from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile -from robot_inspection.frame_queue import frame_change, FrameQueue, thumbnail -from robot_inspection.vlm import ( +from pashupati_inspection.frame_queue import frame_change, FrameQueue, thumbnail +from pashupati_inspection.vlm import ( build_request, CATEGORY_HINTS, category_names, @@ -27,6 +20,13 @@ parse_descriptions, parse_response, ) +from rcl_interfaces.msg import SetParametersResult +import rclpy +from rclpy.callback_groups import MutuallyExclusiveCallbackGroup, ReentrantCallbackGroup +from rclpy.executors import ExternalShutdownException, MultiThreadedExecutor +from rclpy.node import Node +from rclpy.parameter import Parameter +from rclpy.qos import qos_profile_sensor_data, QoSDurabilityPolicy, QoSProfile from sensor_msgs.msg import CompressedImage, Image from std_msgs.msg import Header, String from std_srvs.srv import Trigger diff --git a/src/robot_inspection/robot_inspection/frame_queue.py b/src/pashupati_inspection/pashupati_inspection/frame_queue.py similarity index 100% rename from src/robot_inspection/robot_inspection/frame_queue.py rename to src/pashupati_inspection/pashupati_inspection/frame_queue.py diff --git a/src/robot_inspection/robot_inspection/vlm.py b/src/pashupati_inspection/pashupati_inspection/vlm.py similarity index 100% rename from src/robot_inspection/robot_inspection/vlm.py rename to src/pashupati_inspection/pashupati_inspection/vlm.py diff --git a/src/robot_inspection/resource/robot_inspection b/src/pashupati_inspection/resource/pashupati_inspection similarity index 100% rename from src/robot_inspection/resource/robot_inspection rename to src/pashupati_inspection/resource/pashupati_inspection diff --git a/src/pashupati_inspection/setup.cfg b/src/pashupati_inspection/setup.cfg new file mode 100644 index 0000000..fc8e015 --- /dev/null +++ b/src/pashupati_inspection/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/pashupati_inspection +[install] +install_scripts=$base/lib/pashupati_inspection diff --git a/src/robot_inspection/setup.py b/src/pashupati_inspection/setup.py similarity index 87% rename from src/robot_inspection/setup.py rename to src/pashupati_inspection/setup.py index 447d56f..e869183 100644 --- a/src/robot_inspection/setup.py +++ b/src/pashupati_inspection/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'robot_inspection' +package_name = 'pashupati_inspection' setup( name=package_name, @@ -24,7 +24,7 @@ license='Apache-2.0', entry_points={ 'console_scripts': [ - 'anomaly_detector_node = robot_inspection.anomaly_detector_node:main', + 'anomaly_detector_node = pashupati_inspection.anomaly_detector_node:main', ], }, ) diff --git a/src/robot_inspection/test/test_copyright.py b/src/pashupati_inspection/test/test_copyright.py similarity index 100% rename from src/robot_inspection/test/test_copyright.py rename to src/pashupati_inspection/test/test_copyright.py diff --git a/src/robot_inspection/test/test_detector_node.py b/src/pashupati_inspection/test/test_detector_node.py similarity index 99% rename from src/robot_inspection/test/test_detector_node.py rename to src/pashupati_inspection/test/test_detector_node.py index b8960ea..39fb5b1 100644 --- a/src/robot_inspection/test/test_detector_node.py +++ b/src/pashupati_inspection/test/test_detector_node.py @@ -15,7 +15,7 @@ Image = pytest.importorskip('sensor_msgs.msg').Image Trigger = pytest.importorskip('std_srvs.srv').Trigger AnomalyDetectorNode = pytest.importorskip( - 'robot_inspection.anomaly_detector_node' + 'pashupati_inspection.anomaly_detector_node' ).AnomalyDetectorNode # model -> capabilities; llama3 cannot see images diff --git a/src/robot_inspection/test/test_flake8.py b/src/pashupati_inspection/test/test_flake8.py similarity index 100% rename from src/robot_inspection/test/test_flake8.py rename to src/pashupati_inspection/test/test_flake8.py diff --git a/src/robot_inspection/test/test_frame_queue.py b/src/pashupati_inspection/test/test_frame_queue.py similarity index 97% rename from src/robot_inspection/test/test_frame_queue.py rename to src/pashupati_inspection/test/test_frame_queue.py index 451a866..746b5b7 100644 --- a/src/robot_inspection/test/test_frame_queue.py +++ b/src/pashupati_inspection/test/test_frame_queue.py @@ -1,8 +1,8 @@ """The inspection queue: first in first out, bounded, kept across restarts.""" import numpy as np +from pashupati_inspection.frame_queue import frame_change, FrameQueue, thumbnail import pytest -from robot_inspection.frame_queue import frame_change, FrameQueue, thumbnail @pytest.fixture(params=['disk', 'memory']) diff --git a/src/robot_inspection/test/test_node_members.py b/src/pashupati_inspection/test/test_node_members.py similarity index 100% rename from src/robot_inspection/test/test_node_members.py rename to src/pashupati_inspection/test/test_node_members.py diff --git a/src/robot_inspection/test/test_pep257.py b/src/pashupati_inspection/test/test_pep257.py similarity index 100% rename from src/robot_inspection/test/test_pep257.py rename to src/pashupati_inspection/test/test_pep257.py diff --git a/src/robot_inspection/test/test_vlm.py b/src/pashupati_inspection/test/test_vlm.py similarity index 99% rename from src/robot_inspection/test/test_vlm.py rename to src/pashupati_inspection/test/test_vlm.py index 6838b58..905db34 100644 --- a/src/robot_inspection/test/test_vlm.py +++ b/src/pashupati_inspection/test/test_vlm.py @@ -1,7 +1,6 @@ import json -import pytest -from robot_inspection.vlm import ( +from pashupati_inspection.vlm import ( build_prompt, build_request, build_schema, @@ -11,6 +10,7 @@ parse_descriptions, parse_response, ) +import pytest CATS = ['trash', 'spill', 'stain'] diff --git a/src/robot_rviz/CMakeLists.txt b/src/pashupati_rviz/CMakeLists.txt similarity index 86% rename from src/robot_rviz/CMakeLists.txt rename to src/pashupati_rviz/CMakeLists.txt index 3469bc4..09a4a29 100644 --- a/src/robot_rviz/CMakeLists.txt +++ b/src/pashupati_rviz/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(robot_rviz) +project(pashupati_rviz) if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) @@ -29,12 +29,12 @@ add_library(${PROJECT_NAME} SHARED src/tuning_panel.cpp src/tag_panel.cpp src/cmd_vel_widget.cpp - include/robot_rviz/ros_panel.hpp - include/robot_rviz/control_panel.hpp - include/robot_rviz/status_panel.hpp - include/robot_rviz/tuning_panel.hpp - include/robot_rviz/tag_panel.hpp - include/robot_rviz/cmd_vel_widget.hpp + include/pashupati_rviz/ros_panel.hpp + include/pashupati_rviz/control_panel.hpp + include/pashupati_rviz/status_panel.hpp + include/pashupati_rviz/tuning_panel.hpp + include/pashupati_rviz/tag_panel.hpp + include/pashupati_rviz/cmd_vel_widget.hpp ) target_include_directories(${PROJECT_NAME} PUBLIC diff --git a/src/robot_rviz/README.md b/src/pashupati_rviz/README.md similarity index 97% rename from src/robot_rviz/README.md rename to src/pashupati_rviz/README.md index 7ff5425..96ad9c5 100644 --- a/src/robot_rviz/README.md +++ b/src/pashupati_rviz/README.md @@ -1,4 +1,4 @@ -# robot_rviz +# pashupati_rviz RViz panels, each addable from **Panels → Add New Panel**: diff --git a/src/robot_rviz/include/robot_rviz/cmd_vel_widget.hpp b/src/pashupati_rviz/include/pashupati_rviz/cmd_vel_widget.hpp similarity index 93% rename from src/robot_rviz/include/robot_rviz/cmd_vel_widget.hpp rename to src/pashupati_rviz/include/pashupati_rviz/cmd_vel_widget.hpp index acb95b9..075037b 100644 --- a/src/robot_rviz/include/robot_rviz/cmd_vel_widget.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/cmd_vel_widget.hpp @@ -2,7 +2,7 @@ #include -namespace robot_rviz +namespace pashupati_rviz { // Compact radar-style readout for a Twist: linear.x/y as a dot position, // angular.z as an arc. Purely a dumb display widget -- feed it values via @@ -30,5 +30,5 @@ class CmdVelWidget : public QWidget double max_angular_ = 2.0; // rad/s }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/include/robot_rviz/control_panel.hpp b/src/pashupati_rviz/include/pashupati_rviz/control_panel.hpp similarity index 96% rename from src/robot_rviz/include/robot_rviz/control_panel.hpp rename to src/pashupati_rviz/include/pashupati_rviz/control_panel.hpp index b0ce648..cf1bc6e 100644 --- a/src/robot_rviz/include/robot_rviz/control_panel.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/control_panel.hpp @@ -16,9 +16,9 @@ #include #include -#include "robot_rviz/ros_panel.hpp" +#include "pashupati_rviz/ros_panel.hpp" -namespace robot_rviz +namespace pashupati_rviz { /// Mission panel: localization, route recording, route loading, start/stop/pause navigation. @@ -81,4 +81,4 @@ private Q_SLOTS: rclcpp::Subscription::SharedPtr mission_status_sub_; }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/include/robot_rviz/ros_panel.hpp b/src/pashupati_rviz/include/pashupati_rviz/ros_panel.hpp similarity index 95% rename from src/robot_rviz/include/robot_rviz/ros_panel.hpp rename to src/pashupati_rviz/include/pashupati_rviz/ros_panel.hpp index bd0efa2..3da82d5 100644 --- a/src/robot_rviz/include/robot_rviz/ros_panel.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/ros_panel.hpp @@ -10,7 +10,7 @@ #include #include -namespace robot_rviz +namespace pashupati_rviz { /// Base panel: owns a small rclcpp node pumped from the Qt event loop and shared styling. @@ -46,4 +46,4 @@ private Q_SLOTS: QTimer * spin_timer_{nullptr}; }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/include/robot_rviz/status_panel.hpp b/src/pashupati_rviz/include/pashupati_rviz/status_panel.hpp similarity index 90% rename from src/robot_rviz/include/robot_rviz/status_panel.hpp rename to src/pashupati_rviz/include/pashupati_rviz/status_panel.hpp index 0949625..a8670de 100644 --- a/src/robot_rviz/include/robot_rviz/status_panel.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/status_panel.hpp @@ -8,10 +8,10 @@ #include #include -#include "robot_rviz/cmd_vel_widget.hpp" -#include "robot_rviz/ros_panel.hpp" +#include "pashupati_rviz/cmd_vel_widget.hpp" +#include "pashupati_rviz/ros_panel.hpp" -namespace robot_rviz +namespace pashupati_rviz { /// Robot status panel: battery, temperatures, driver diagnostics and the commanded velocity. @@ -45,4 +45,4 @@ class StatusPanel : public RosPanel rclcpp::Subscription::SharedPtr cmd_vel_sub_; }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/include/robot_rviz/tag_panel.hpp b/src/pashupati_rviz/include/pashupati_rviz/tag_panel.hpp similarity index 91% rename from src/robot_rviz/include/robot_rviz/tag_panel.hpp rename to src/pashupati_rviz/include/pashupati_rviz/tag_panel.hpp index 3124de7..4cc1526 100644 --- a/src/robot_rviz/include/robot_rviz/tag_panel.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/tag_panel.hpp @@ -6,9 +6,9 @@ #include #include -#include "robot_rviz/ros_panel.hpp" +#include "pashupati_rviz/ros_panel.hpp" -namespace robot_rviz +namespace pashupati_rviz { /// AprilTag tools: record tag poses in the map frame and localize from a visible tag. @@ -40,4 +40,4 @@ private Q_SLOTS: rclcpp::Subscription::SharedPtr localization_status_sub_; }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/include/robot_rviz/tuning_panel.hpp b/src/pashupati_rviz/include/pashupati_rviz/tuning_panel.hpp similarity index 94% rename from src/robot_rviz/include/robot_rviz/tuning_panel.hpp rename to src/pashupati_rviz/include/pashupati_rviz/tuning_panel.hpp index 757dfc4..850692f 100644 --- a/src/robot_rviz/include/robot_rviz/tuning_panel.hpp +++ b/src/pashupati_rviz/include/pashupati_rviz/tuning_panel.hpp @@ -12,9 +12,9 @@ #include #include -#include "robot_rviz/ros_panel.hpp" +#include "pashupati_rviz/ros_panel.hpp" -namespace robot_rviz +namespace pashupati_rviz { /// Live parameter editor for navigation nodes with controller/algorithm selection and YAML export. @@ -67,4 +67,4 @@ private Q_SLOTS: bool rendering_{false}; }; -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/package.xml b/src/pashupati_rviz/package.xml similarity index 96% rename from src/robot_rviz/package.xml rename to src/pashupati_rviz/package.xml index 28dacc2..496f187 100644 --- a/src/robot_rviz/package.xml +++ b/src/pashupati_rviz/package.xml @@ -1,7 +1,7 @@ - robot_rviz + pashupati_rviz 0.1.0 Native RViz2 panel (C++/Qt) for battery monitoring, one-click localization trigger, path recording/stop-point marking, path loading, and navigate_route control. Agus Darmawan diff --git a/src/robot_rviz/plugin_description.xml b/src/pashupati_rviz/plugin_description.xml similarity index 64% rename from src/robot_rviz/plugin_description.xml rename to src/pashupati_rviz/plugin_description.xml index 4168bf9..a61e899 100644 --- a/src/robot_rviz/plugin_description.xml +++ b/src/pashupati_rviz/plugin_description.xml @@ -1,21 +1,21 @@ - - + Mission: localization, route recording, route loading, start/stop/pause navigation. - Robot status: battery, temperatures, driver diagnostics and cmd_vel. - Live parameter tuning for navigation nodes, with controller/algorithm selection and YAML export. - AprilTag tools: record tag poses in the map frame and localize from a tag. diff --git a/src/robot_rviz/rviz/robot.rviz b/src/pashupati_rviz/rviz/robot.rviz similarity index 96% rename from src/robot_rviz/rviz/robot.rviz rename to src/pashupati_rviz/rviz/robot.rviz index dfa09a4..49529bb 100644 --- a/src/robot_rviz/rviz/robot.rviz +++ b/src/pashupati_rviz/rviz/robot.rviz @@ -17,21 +17,21 @@ Panels: - /Current View1 Name: Views Splitter Ratio: 0.5 - - Class: robot_rviz/ControlPanel + - Class: pashupati_rviz/ControlPanel Name: Mission - - Class: robot_rviz/StatusPanel + - Class: pashupati_rviz/StatusPanel Name: Status - - Class: robot_rviz/TuningPanel + - Class: pashupati_rviz/TuningPanel Name: Tuning - - Class: robot_rviz/ControlPanel + - Class: pashupati_rviz/ControlPanel Name: ControlPanel - - Class: robot_rviz/StatusPanel + - Class: pashupati_rviz/StatusPanel Name: StatusPanel - - Class: robot_rviz/TuningPanel + - Class: pashupati_rviz/TuningPanel Name: TuningPanel - - Class: robot_rviz/TagPanel + - Class: pashupati_rviz/TagPanel Name: TagPanel - - Class: robot_rviz/StatusPanel + - Class: pashupati_rviz/StatusPanel Name: StatusPanel Visualization Manager: Class: "" diff --git a/src/robot_rviz/src/cmd_vel_widget.cpp b/src/pashupati_rviz/src/cmd_vel_widget.cpp similarity index 96% rename from src/robot_rviz/src/cmd_vel_widget.cpp rename to src/pashupati_rviz/src/cmd_vel_widget.cpp index 1627671..05bffa1 100644 --- a/src/robot_rviz/src/cmd_vel_widget.cpp +++ b/src/pashupati_rviz/src/cmd_vel_widget.cpp @@ -1,4 +1,4 @@ -#include "robot_rviz/cmd_vel_widget.hpp" +#include "pashupati_rviz/cmd_vel_widget.hpp" #include #include @@ -6,7 +6,7 @@ #include #include -namespace robot_rviz +namespace pashupati_rviz { CmdVelWidget::CmdVelWidget(QWidget * parent) diff --git a/src/robot_rviz/src/control_panel.cpp b/src/pashupati_rviz/src/control_panel.cpp similarity index 98% rename from src/robot_rviz/src/control_panel.cpp rename to src/pashupati_rviz/src/control_panel.cpp index 6a7fcf6..84612a9 100644 --- a/src/robot_rviz/src/control_panel.cpp +++ b/src/pashupati_rviz/src/control_panel.cpp @@ -1,4 +1,4 @@ -#include "robot_rviz/control_panel.hpp" +#include "pashupati_rviz/control_panel.hpp" #include #include @@ -6,7 +6,7 @@ #include -namespace robot_rviz +namespace pashupati_rviz { ControlPanel::ControlPanel(QWidget * parent) @@ -256,6 +256,6 @@ void ControlPanel::localizationStatusCallback(const std_msgs::msg::String::Share localized ? "#88ff88" : "#ffcc00"); } -} // namespace robot_rviz +} // namespace pashupati_rviz -PLUGINLIB_EXPORT_CLASS(robot_rviz::ControlPanel, rviz_common::Panel) +PLUGINLIB_EXPORT_CLASS(pashupati_rviz::ControlPanel, rviz_common::Panel) diff --git a/src/robot_rviz/src/ros_panel.cpp b/src/pashupati_rviz/src/ros_panel.cpp similarity index 93% rename from src/robot_rviz/src/ros_panel.cpp rename to src/pashupati_rviz/src/ros_panel.cpp index 358c610..1fefaf4 100644 --- a/src/robot_rviz/src/ros_panel.cpp +++ b/src/pashupati_rviz/src/ros_panel.cpp @@ -1,6 +1,6 @@ -#include "robot_rviz/ros_panel.hpp" +#include "pashupati_rviz/ros_panel.hpp" -namespace robot_rviz +namespace pashupati_rviz { RosPanel::RosPanel(const std::string & node_name, int max_width, QWidget * parent) @@ -47,4 +47,4 @@ QGroupBox * RosPanel::makeGroup(const QString & title, QLayout * layout) return group; } -} // namespace robot_rviz +} // namespace pashupati_rviz diff --git a/src/robot_rviz/src/status_panel.cpp b/src/pashupati_rviz/src/status_panel.cpp similarity index 96% rename from src/robot_rviz/src/status_panel.cpp rename to src/pashupati_rviz/src/status_panel.cpp index 16447a3..d219303 100644 --- a/src/robot_rviz/src/status_panel.cpp +++ b/src/pashupati_rviz/src/status_panel.cpp @@ -1,4 +1,4 @@ -#include "robot_rviz/status_panel.hpp" +#include "pashupati_rviz/status_panel.hpp" #include #include @@ -9,7 +9,7 @@ #include -namespace robot_rviz +namespace pashupati_rviz { namespace @@ -138,6 +138,6 @@ void StatusPanel::cmdVelCallback(const geometry_msgs::msg::Twist::SharedPtr msg) .arg(msg->angular.z, 0, 'f', 2)); } -} // namespace robot_rviz +} // namespace pashupati_rviz -PLUGINLIB_EXPORT_CLASS(robot_rviz::StatusPanel, rviz_common::Panel) +PLUGINLIB_EXPORT_CLASS(pashupati_rviz::StatusPanel, rviz_common::Panel) diff --git a/src/robot_rviz/src/tag_panel.cpp b/src/pashupati_rviz/src/tag_panel.cpp similarity index 94% rename from src/robot_rviz/src/tag_panel.cpp rename to src/pashupati_rviz/src/tag_panel.cpp index a120dcf..427b7f3 100644 --- a/src/robot_rviz/src/tag_panel.cpp +++ b/src/pashupati_rviz/src/tag_panel.cpp @@ -1,10 +1,10 @@ -#include "robot_rviz/tag_panel.hpp" +#include "pashupati_rviz/tag_panel.hpp" #include #include -namespace robot_rviz +namespace pashupati_rviz { TagPanel::TagPanel(QWidget * parent) @@ -81,6 +81,6 @@ void TagPanel::callTrigger( }); } -} // namespace robot_rviz +} // namespace pashupati_rviz -PLUGINLIB_EXPORT_CLASS(robot_rviz::TagPanel, rviz_common::Panel) +PLUGINLIB_EXPORT_CLASS(pashupati_rviz::TagPanel, rviz_common::Panel) diff --git a/src/robot_rviz/src/tuning_panel.cpp b/src/pashupati_rviz/src/tuning_panel.cpp similarity index 98% rename from src/robot_rviz/src/tuning_panel.cpp rename to src/pashupati_rviz/src/tuning_panel.cpp index ee01095..ea181a2 100644 --- a/src/robot_rviz/src/tuning_panel.cpp +++ b/src/pashupati_rviz/src/tuning_panel.cpp @@ -1,4 +1,4 @@ -#include "robot_rviz/tuning_panel.hpp" +#include "pashupati_rviz/tuning_panel.hpp" #include #include @@ -17,7 +17,7 @@ #include -namespace robot_rviz +namespace pashupati_rviz { namespace @@ -443,6 +443,6 @@ void TuningPanel::onSaveYaml() out.good() ? "#88ff88" : "#ff8888"); } -} // namespace robot_rviz +} // namespace pashupati_rviz -PLUGINLIB_EXPORT_CLASS(robot_rviz::TuningPanel, rviz_common::Panel) +PLUGINLIB_EXPORT_CLASS(pashupati_rviz::TuningPanel, rviz_common::Panel) diff --git a/src/robot_sim/README.md b/src/pashupati_sim/README.md similarity index 96% rename from src/robot_sim/README.md rename to src/pashupati_sim/README.md index cf9db68..7f41a9d 100644 --- a/src/robot_sim/README.md +++ b/src/pashupati_sim/README.md @@ -1,4 +1,4 @@ -# robot_sim +# pashupati_sim Software-in-the-loop quadruped. The production stack runs unchanged against a simulated robot: localization, perception, navigation, the control mux with its protective field and e-stop, the @@ -6,7 +6,7 @@ teleop gateway, the NETRA uplink and the health monitor. It needs no Gazebo and node holds a 2D world, a kinematic body and a ray-cast LiDAR. ```bash -ros2 launch robot_sim sim.launch.py autostart:=true rviz:=true +ros2 launch pashupati_sim sim.launch.py autostart:=true rviz:=true ``` The robot localizes itself and patrols a loop around a block of shops with one inspection stop. @@ -34,7 +34,7 @@ routes, the spool and the route state to `/tmp/pashupati_sim`. | `world` | `config/worlds/mall_loop.yaml` | walls, pillars, start pose | | `route` | `config/routes/mall_loop.csv` | route CSV, as on the robot | | `autostart` | `false` | start the patrol once localized; otherwise `navigation/start_nav` | -| `rviz` | `false` | RViz with the `robot_rviz` panels | +| `rviz` | `false` | RViz with the `pashupati_rviz` panels | | `cc_url`, `cc_token` | empty | report to NETRA as `sim-01` | | `robot_ns` | `robot` | driver namespace | diff --git a/src/robot_sim/config/routes/mall_loop.csv b/src/pashupati_sim/config/routes/mall_loop.csv similarity index 100% rename from src/robot_sim/config/routes/mall_loop.csv rename to src/pashupati_sim/config/routes/mall_loop.csv diff --git a/src/robot_sim/config/sim_site.yaml b/src/pashupati_sim/config/sim_site.yaml similarity index 90% rename from src/robot_sim/config/sim_site.yaml rename to src/pashupati_sim/config/sim_site.yaml index 6e50bad..bec8faf 100644 --- a/src/robot_sim/config/sim_site.yaml +++ b/src/pashupati_sim/config/sim_site.yaml @@ -1,4 +1,4 @@ -# Site configuration for the simulator (robot_sim/sim.launch.py): the stack reads the simulated +# Site configuration for the simulator (pashupati_sim/sim.launch.py): the stack reads the simulated # body-frame cloud, writes nothing into the real map/ or ~/.pashupati, and asks the simulator # instead of the VLM to inspect at stop points. control_mux_node: @@ -12,7 +12,7 @@ lidar_sector_node: localization_node: ros__parameters: - auto_localize_on_start: false # no AprilTags in the sim: robot_sim sends /initialpose + auto_localize_on_start: false # no AprilTags in the sim: pashupati_sim sends /initialpose path_loader_node: ros__parameters: diff --git a/src/robot_sim/config/worlds/mall_loop.yaml b/src/pashupati_sim/config/worlds/mall_loop.yaml similarity index 100% rename from src/robot_sim/config/worlds/mall_loop.yaml rename to src/pashupati_sim/config/worlds/mall_loop.yaml diff --git a/src/robot_sim/launch/sim.launch.py b/src/pashupati_sim/launch/sim.launch.py similarity index 88% rename from src/robot_sim/launch/sim.launch.py rename to src/pashupati_sim/launch/sim.launch.py index 8c2001a..b90bb20 100644 --- a/src/robot_sim/launch/sim.launch.py +++ b/src/pashupati_sim/launch/sim.launch.py @@ -2,9 +2,9 @@ """ The whole Pashupati stack on a simulated quadruped, no robot needed. - ros2 launch robot_sim sim.launch.py # localizes itself, waits for start_nav - ros2 launch robot_sim sim.launch.py autostart:=true # patrols right away - ros2 launch robot_sim sim.launch.py rviz:=true # with the RViz panels + ros2 launch pashupati_sim sim.launch.py # localizes, waits for start_nav + ros2 launch pashupati_sim sim.launch.py autostart:=true # patrols right away + ros2 launch pashupati_sim sim.launch.py rviz:=true # with the RViz panels Drop an obstacle on the route: ros2 topic pub --once /sim/obstacles geometry_msgs/msg/PoseArray \ @@ -24,10 +24,10 @@ def launch_setup(context): """Start the simulator, the robot stack in simulation mode and optionally RViz.""" arg = lambda name: LaunchConfiguration(name).perform(context) # noqa: E731 - share = get_package_share_directory('robot_sim') + share = get_package_share_directory('pashupati_sim') actions = [ Node( - package='robot_sim', + package='pashupati_sim', executable='sim_robot_node', name='sim_robot_node', output='screen', @@ -64,7 +64,7 @@ def launch_setup(context): if arg('rviz').lower() == 'true': try: config = os.path.join( - get_package_share_directory('robot_rviz'), 'rviz', 'robot.rviz' + get_package_share_directory('pashupati_rviz'), 'rviz', 'robot.rviz' ) except PackageNotFoundError: config = '' @@ -85,7 +85,7 @@ def launch_setup(context): def generate_launch_description(): """Declare the simulation arguments.""" - share = get_package_share_directory('robot_sim') + share = get_package_share_directory('pashupati_sim') return LaunchDescription( [ DeclareLaunchArgument( diff --git a/src/robot_sim/package.xml b/src/pashupati_sim/package.xml similarity index 97% rename from src/robot_sim/package.xml rename to src/pashupati_sim/package.xml index 928d739..ad6edcd 100644 --- a/src/robot_sim/package.xml +++ b/src/pashupati_sim/package.xml @@ -1,7 +1,7 @@ - robot_sim + pashupati_sim 0.3.0 Software-in-the-loop simulator: a kinematic quadruped with a ray-cast Mid-360 in a 2D world that stands in for the robot driver, the LiDAR and FAST-LIO, so the whole Pashupati stack runs and is tested without a robot. Agus Darmawan diff --git a/src/robot_sim/robot_sim/__init__.py b/src/pashupati_sim/pashupati_sim/__init__.py similarity index 100% rename from src/robot_sim/robot_sim/__init__.py rename to src/pashupati_sim/pashupati_sim/__init__.py diff --git a/src/robot_sim/robot_sim/sim_robot_node.py b/src/pashupati_sim/pashupati_sim/sim_robot_node.py similarity index 99% rename from src/robot_sim/robot_sim/sim_robot_node.py rename to src/pashupati_sim/pashupati_sim/sim_robot_node.py index f7c739b..54e8362 100644 --- a/src/robot_sim/robot_sim/sim_robot_node.py +++ b/src/pashupati_sim/pashupati_sim/sim_robot_node.py @@ -21,11 +21,11 @@ ) from nav_msgs.msg import Odometry import numpy as np +from pashupati_sim.world import Body, lio_pose, scan_points, World import rclpy from rclpy.executors import ExternalShutdownException from rclpy.node import Node from rclpy.qos import QoSDurabilityPolicy, QoSProfile -from robot_sim.world import Body, lio_pose, scan_points, World from sensor_msgs.msg import BatteryState, PointCloud2, PointField from std_msgs.msg import String from std_srvs.srv import SetBool, Trigger diff --git a/src/robot_sim/robot_sim/world.py b/src/pashupati_sim/pashupati_sim/world.py similarity index 100% rename from src/robot_sim/robot_sim/world.py rename to src/pashupati_sim/pashupati_sim/world.py diff --git a/src/robot_sim/resource/robot_sim b/src/pashupati_sim/resource/pashupati_sim similarity index 100% rename from src/robot_sim/resource/robot_sim rename to src/pashupati_sim/resource/pashupati_sim diff --git a/src/pashupati_sim/setup.cfg b/src/pashupati_sim/setup.cfg new file mode 100644 index 0000000..6996012 --- /dev/null +++ b/src/pashupati_sim/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/pashupati_sim +[install] +install_scripts=$base/lib/pashupati_sim diff --git a/src/robot_sim/setup.py b/src/pashupati_sim/setup.py similarity index 91% rename from src/robot_sim/setup.py rename to src/pashupati_sim/setup.py index 2b6991c..148479c 100644 --- a/src/robot_sim/setup.py +++ b/src/pashupati_sim/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'robot_sim' +package_name = 'pashupati_sim' setup( name=package_name, @@ -30,7 +30,7 @@ }, entry_points={ 'console_scripts': [ - 'sim_robot_node = robot_sim.sim_robot_node:main', + 'sim_robot_node = pashupati_sim.sim_robot_node:main', ], }, ) diff --git a/src/robot_sim/test/test_copyright.py b/src/pashupati_sim/test/test_copyright.py similarity index 100% rename from src/robot_sim/test/test_copyright.py rename to src/pashupati_sim/test/test_copyright.py diff --git a/src/robot_sim/test/test_flake8.py b/src/pashupati_sim/test/test_flake8.py similarity index 100% rename from src/robot_sim/test/test_flake8.py rename to src/pashupati_sim/test/test_flake8.py diff --git a/src/robot_sim/test/test_node_members.py b/src/pashupati_sim/test/test_node_members.py similarity index 100% rename from src/robot_sim/test/test_node_members.py rename to src/pashupati_sim/test/test_node_members.py diff --git a/src/robot_sim/test/test_pep257.py b/src/pashupati_sim/test/test_pep257.py similarity index 100% rename from src/robot_sim/test/test_pep257.py rename to src/pashupati_sim/test/test_pep257.py diff --git a/src/robot_sim/test/test_sim_patrol.py b/src/pashupati_sim/test/test_sim_patrol.py similarity index 94% rename from src/robot_sim/test/test_sim_patrol.py rename to src/pashupati_sim/test/test_sim_patrol.py index 5b1b078..329ecc4 100644 --- a/src/robot_sim/test/test_sim_patrol.py +++ b/src/pashupati_sim/test/test_sim_patrol.py @@ -1,11 +1,11 @@ """ End to end: the whole stack patrols the simulated mall. -Starts `ros2 launch robot_sim sim.launch.py autostart:=true` (needs the workspace installed, as in -`colcon test`). A person steps onto the route: the robot slides around them without touching them -or straying far, and completes the inspection stop. A crowd blocks the corridor: it stops short -and drives on once they are gone. Then the handheld drives straight at a person, where only the -protective field stands in the way. Finally no node may have died or printed a traceback. Set +Starts `ros2 launch pashupati_sim sim.launch.py autostart:=true` (needs the workspace installed, as +in `colcon test`). A person steps onto the route: the robot slides around them without touching +them or straying far, and completes the inspection stop. A crowd blocks the corridor: it stops +short and drives on once they are gone. Then the handheld drives straight at a person, where only +the protective field stands in the way. Finally no node may have died or printed a traceback. Set PASHUPATI_SKIP_SIM=1 to skip it. """ @@ -132,7 +132,7 @@ def sim(): log = tempfile.NamedTemporaryFile('w+', prefix='pashupati_sim_', suffix='.log', delete=False) env = dict(os.environ, ROS_DOMAIN_ID=str(DOMAIN)) proc = subprocess.Popen( - ['ros2', 'launch', 'robot_sim', 'sim.launch.py', 'autostart:=true'], + ['ros2', 'launch', 'pashupati_sim', 'sim.launch.py', 'autostart:=true'], env=env, stdin=subprocess.DEVNULL, # non-interactive: launch itself stops every node, like systemd stdout=log, diff --git a/src/robot_sim/test/test_world.py b/src/pashupati_sim/test/test_world.py similarity index 97% rename from src/robot_sim/test/test_world.py rename to src/pashupati_sim/test/test_world.py index 61d213e..ab2e58e 100644 --- a/src/robot_sim/test/test_world.py +++ b/src/pashupati_sim/test/test_world.py @@ -1,7 +1,7 @@ import math import numpy as np -from robot_sim.world import Body, cast_rays, lio_pose, scan_points, World +from pashupati_sim.world import Body, cast_rays, lio_pose, scan_points, World BOX = World( segments=np.array([[-2, -2, 2, -2], [2, -2, 2, 2], [2, 2, -2, 2], [-2, 2, -2, -2]], float), diff --git a/src/robot_bridge/setup.cfg b/src/robot_bridge/setup.cfg deleted file mode 100644 index 3d92322..0000000 --- a/src/robot_bridge/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/robot_bridge -[install] -install_scripts=$base/lib/robot_bridge diff --git a/src/robot_fleet/setup.cfg b/src/robot_fleet/setup.cfg deleted file mode 100644 index 6876f67..0000000 --- a/src/robot_fleet/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/robot_fleet -[install] -install_scripts=$base/lib/robot_fleet diff --git a/src/robot_health/setup.cfg b/src/robot_health/setup.cfg deleted file mode 100644 index ddf3ca9..0000000 --- a/src/robot_health/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/robot_health -[install] -install_scripts=$base/lib/robot_health diff --git a/src/robot_inspection/setup.cfg b/src/robot_inspection/setup.cfg deleted file mode 100644 index dd288f9..0000000 --- a/src/robot_inspection/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/robot_inspection -[install] -install_scripts=$base/lib/robot_inspection diff --git a/src/robot_sim/setup.cfg b/src/robot_sim/setup.cfg deleted file mode 100644 index 24eb6e2..0000000 --- a/src/robot_sim/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/robot_sim -[install] -install_scripts=$base/lib/robot_sim