Skip to content

Commit d96bdbf

Browse files
heuristicusjeremysee2amessing-bdaikzheng-bdaimyeatman-bdai
authored
Module for graphnav (#44)
* refactored code into modules * refactored image service * cleanup imports * add unit tests for some graph_nav_util functions * pip install requirements * typing changes * absolute paths * clone to specific directory * check file structure for CI * check files * check files * add test script * install spot wrapper * install script * remove asyncimageservice * use robot_params to share state variables * Pytest replacement (#1) * use pytest instead * add pytest dependency * fail test on purpose * remove failing test * replace print() with self._logger.error() * image publishing works well * moved SPOT_CLIENT_NAME * static typing for claim() * black formatting * comments and passing error feedback * remove spot_config * use fstring for short code, move wrench from msg function to class body * Add changes from [SW-62] Elements for publishing the hand camera in spot_ros2 (#7) Co-authored-by: Andrew Messing <129519955+amessing-bdai@users.noreply.github.com> * Wrapper for spot cam interaction (#4) * simple led brightness control, only able to set all leds to same value * Add power control, but unclear if it is actually possible to set power for aux and external mic * most basic functional image stream publisher with webrtc * add compositor to handle IR and webrtc stream selection with services Add timestamp for the webrtc images Add compressed version of the webrtc image stream * Add health wrapper, move body of robotToLocalTime out of spot wrapper object robotToLocalTime now takes the timestamp and a robot object, which allows it to be used by the spot cam wrapper as well. * add handler and wrapper for audio commands * update webrtc_client to 3.2 version * add stream quality wrapper and ros handler * initial implementation of ptz wrapper and handler, can list ptzs * ptz handler publishes position and velocity of ptzs, can set position and velocity * add egg info to gitignore * fix bad indent after cherry-pick * fix formatting * fix short code conversion * Always include exception message in response strings (#8) * fix trajectory status unknown not being reset in trajectory command and async idle (#10) * Add changes from [SW-127] Add function to get images by cameras (#11) Co-authored-by: Kaiyu Zheng <125413689+kaiyu-zheng@users.noreply.github.com> * fix dataclass typing issue for older python versions (20.04), check lease object is initialised in claim function (#14) * remove old camera task mapping introduced in merge * formatting * Add changes from [WUD-126] Add manipulation client (#13) Co-authored-by: myeatman-bdai <129521731+myeatman-bdai@users.noreply.github.com> * Add changes for added support for the rgb_cameras parameter in spot_ros2 (#15) Co-authored-by: Philip Keller <keller@fzi.de> Co-authored-by: Shubham <52372631+skpawar1305@users.noreply.github.com> * Add changes from [SW-141] Checking edge cases in upload_graph (#12) Co-authored-by: kzheng <125413689+kaiyu-zheng@users.noreply.github.com> * Updated bosdyn to 3.2.3 (#16) * [OC-4] Build a Spot Dance Interface (#17) * [OC-5] add method to upload hardcoded file * [OC-4] Code cleanup for PR * [OC-4] Create separate SpotDacing class * [OC-4] remove old execute_dance code * [OC-4] Fix authentication method for compatibility with WUD test * [OC-5] format files with black * [OC-4] Modify code based on PR comments * delete execute_dance from wrapper.py * [OC-4] Get lease from decorator * [OC-4] Remove print statements * [OC-4] Remove extra imports * [OC-4] Remove extra argument * formatting * fix startup issues when choreography or arm is not present * small changes to choreo check and output when services are not available * better choreo ordering * message when choreo module is missing * cleanup unused spot_image and renamed graphnav private methods * update graph_nav private methods * custom arm not found Exception * _get_lease private method in graphNav * fix black * import ordering and removal of unused imports * wait for arm commands to complete rather than sleeping, using block_until_arm_arrives SDK function * no longer use convenience dict to access robot params in wrapper class * missed some robot params usages in wrapper * add block_until_manipulation_completes method * improve arm module comments, manipulation request actually makes use of the timesync endpoint and end time * restore wrapper to main branch state * restore cam wrapper to main * restore graph nav util to main * unnecessary change * remove other modules and old graph nav util * wrapper changes and explicit clients * doesn't actually need robot_params * Remove import of graph nav utils * Commented out some decorator functions which are no longer in the wrapper.py. Will get rid of these comments upon final revision * Updated some minor bug fixes with modular-graphnav and tested on hardware * formatting --------- Co-authored-by: jeremysee2 <32976023+jeremysee2@users.noreply.github.com> Co-authored-by: Andrew Messing <129519955+amessing-bdai@users.noreply.github.com> Co-authored-by: Kaiyu Zheng <125413689+kaiyu-zheng@users.noreply.github.com> Co-authored-by: myeatman-bdai <129521731+myeatman-bdai@users.noreply.github.com> Co-authored-by: Philip Keller <keller@fzi.de> Co-authored-by: Shubham <52372631+skpawar1305@users.noreply.github.com> Co-authored-by: David Watkins <129521611+davidwatkins-bdai@users.noreply.github.com> Co-authored-by: Vedant Gupta <134331854+Guptabot@users.noreply.github.com> Co-authored-by: Ming Jie See <jeremysee_2@hotmail.com> Co-authored-by: Brandon Hung <bhung@theaiinstitute.com>
1 parent dca6c69 commit d96bdbf

6 files changed

Lines changed: 1185 additions & 715 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: graph_nav_util unit tests
2+
3+
# Run on every push
4+
on: push
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
steps:
14+
- name: Make directory
15+
run: mkdir -p ~/spot_wrapper
16+
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
path: spot_wrapper
21+
22+
- name: Check files
23+
run: ls spot_wrapper
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: "3.8"
29+
30+
- name: Install dependencies
31+
run: |
32+
pip install -r spot_wrapper/requirements.txt
33+
pip install -e spot_wrapper
34+
35+
- name: Run tests
36+
run: pytest --junit-xml=test-results.xml
37+
38+
- name: Surface failing tests
39+
if: always()
40+
uses: pmeier/pytest-summary-gha@main
41+
with:
42+
# A list of JUnit XML files, directories containing the former, and wildcard patterns to process.
43+
path: test-results.xml
44+
45+
# Add a summary of the results at the top of the report
46+
summary: true
47+
48+
# Select which results should be included in the report.
49+
# Follows the same syntax as `pytest -r`
50+
display-options: fEX
51+
52+
# Fail the workflow if no JUnit XML was found.
53+
fail-on-empty: true

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bosdyn_core==3.2.3
22
protobuf==4.22.1
33
setuptools==45.2.0
4+
pytest==7.3.1

spot_wrapper/graph_nav_util.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)