-
Notifications
You must be signed in to change notification settings - Fork 2
Add Scripts API support to all demos #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82571f0
feat(lib): add shared Scripts API helper for host-side wrappers
bburda 87aaed1
feat(sensor_diagnostics): add Scripts API support
bburda 511ce69
docs(sensor_diagnostics): add Scripts API documentation to README
bburda 37e3abd
feat(turtlebot3): add Scripts API support
bburda f7f939b
feat(moveit): add Scripts API support, remove docker exec
bburda c554a89
chore: add TODO(#49) for manifest-based scripts migration
bburda 59c38c0
fix: address review findings - error handling, UX, and hardening
bburda 7af95a8
docs: address review findings - README consistency and gaps
bburda c766a90
fix: resolve shellcheck warnings (SC2034, SC1091)
bburda db0e325
fix: shellcheck SC1091 - disable for sourced lib path
bburda de39b82
fix: address PR review feedback (mfaferek93 + Copilot)
bburda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
bburda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Arm self-test via Scripts API | ||
| set -eu | ||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| # shellcheck disable=SC1091 | ||
| source "${SCRIPT_DIR}/../../lib/scripts-api.sh" | ||
|
|
||
| execute_script "components" "moveit-planning" "arm-self-test" "Arm self-test" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
demos/moveit_pick_place/container_scripts/moveit-planning/arm-self-test/metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Arm Self-Test", | ||
| "description": "Check joint states via REST API, verify values are reasonable", | ||
| "format": "bash" | ||
| } |
26 changes: 26 additions & 0 deletions
26
demos/moveit_pick_place/container_scripts/moveit-planning/arm-self-test/script.bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/bin/bash | ||
| # Arm self-test - verify joint states are within expected limits | ||
| set -eu | ||
| GATEWAY_URL="${GATEWAY_URL:-http://localhost:8080}" | ||
| API_BASE="${GATEWAY_URL}/api/v1" | ||
|
|
||
| echo "Running arm self-test..." | ||
| echo "Checking joint state broadcaster..." | ||
| if ! curl -sf "${API_BASE}/apps/joint-state-broadcaster" > /dev/null 2>&1; then | ||
| echo "FAIL: joint-state-broadcaster not responding" | ||
| exit 1 | ||
| fi | ||
| echo "OK: joint-state-broadcaster responding" | ||
|
|
||
| echo "Checking move-group..." | ||
| if ! curl -sf "${API_BASE}/apps/move-group" > /dev/null 2>&1; then | ||
| echo "FAIL: move-group not responding" | ||
| exit 1 | ||
| fi | ||
| echo "OK: move-group responding" | ||
|
|
||
| echo "Checking fault status..." | ||
| FAULT_COUNT=$(curl -sf "${API_BASE}/faults" | jq '.items | length' 2>/dev/null || echo "?") | ||
| echo "Active faults: $FAULT_COUNT" | ||
|
|
||
| echo "Arm self-test passed" |
5 changes: 5 additions & 0 deletions
5
demos/moveit_pick_place/container_scripts/moveit-planning/inject-collision/metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Inject Collision", | ||
| "description": "Spawn a surprise obstacle in the robot workspace (Gazebo + MoveIt planning scene)", | ||
| "format": "bash" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...moveit_pick_place/container_scripts/moveit-planning/inject-planning-failure/metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Inject Planning Failure", | ||
| "description": "Add collision wall blocking the pick-place path (Gazebo + MoveIt planning scene)", | ||
| "format": "bash" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
demos/moveit_pick_place/container_scripts/moveit-planning/planning-benchmark/metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Planning Benchmark", | ||
| "description": "Verify MoveIt planning is functional by checking key nodes and operations", | ||
| "format": "bash" | ||
| } |
29 changes: 29 additions & 0 deletions
29
demos/moveit_pick_place/container_scripts/moveit-planning/planning-benchmark/script.bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/bin/bash | ||
| # Planning benchmark - verify MoveIt planning is functional | ||
| set -eu | ||
| GATEWAY_URL="${GATEWAY_URL:-http://localhost:8080}" | ||
| API_BASE="${GATEWAY_URL}/api/v1" | ||
|
|
||
| echo "Running planning benchmark..." | ||
| echo "Checking move-group operations..." | ||
| if ! curl -sf "${API_BASE}/apps/move-group/operations" > /dev/null 2>&1; then | ||
| echo "FAIL: Cannot list move-group operations" | ||
| exit 1 | ||
| fi | ||
| echo "OK: move-group operations available" | ||
|
|
||
| echo "Checking pick-place-node..." | ||
| if ! curl -sf "${API_BASE}/apps/pick-place-node" > /dev/null 2>&1; then | ||
| echo "FAIL: pick-place-node not responding" | ||
| exit 1 | ||
| fi | ||
| echo "OK: pick-place-node responding" | ||
|
|
||
| echo "Checking manipulation monitor..." | ||
| if ! curl -sf "${API_BASE}/apps/manipulation-monitor" > /dev/null 2>&1; then | ||
| echo "FAIL: manipulation-monitor not responding" | ||
| exit 1 | ||
| fi | ||
| echo "OK: manipulation-monitor responding" | ||
|
|
||
| echo "Planning benchmark passed" |
5 changes: 5 additions & 0 deletions
5
demos/moveit_pick_place/container_scripts/moveit-planning/restore-normal/metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "Restore Normal", | ||
| "description": "Remove all injected obstacles from Gazebo and MoveIt planning scene, clear faults", | ||
| "format": "bash" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.