-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WorldObjectService, SpotCheckService, unit tests, Docker CI build pipeline #126
Merged
Merged
Changes from 59 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
b1eb4c0
Add unit tests (#1)
jeremysee2 0757fd7
Add unit tests (#1)
jeremysee2 bade44f
Merge branch 'master' of github.com:jeremysee2/spot_ros
jeremysee2 b602674
Ros module tests (#2)
jeremysee2 2ff4d31
spot_check service (#6)
jeremysee2 0bd58d8
Add VLP-16 LIDAR Support (#7)
jeremysee2 a8ee254
Merge branch 'master' of https://github.com/heuristicus/spot_ros into…
jeremysee2 8b95cf9
remove repeated merge pointcloud
jeremysee2 453ca78
remove repeated imports
jeremysee2 bdeb22e
Merge pull request #9 from jeremysee2/sync-with-upstream
jeremysee2 1b6e5a5
Merge branch 'feature/grasp_service' into feature/pick-service
jeremysee2 e1324ce
Merge branch 'master' of https://github.com/heuristicus/spot_ros into…
jeremysee2 c49067d
cleanup
jeremysee2 92239d0
added typing
jeremysee2 0ea15ed
point to spot_arm project
jeremysee2 21f0d5f
added grasp_3d service ros unit testing
jeremysee2 82642f1
Merge pull request #11 from jeremysee2/feature/pick-service
jeremysee2 0fde641
Add docker export (#12)
jeremysee2 4c365e6
Merge branch 'master' of https://github.com/heuristicus/spot_ros into…
jeremysee2 25f8d87
add tests for Dock Action
jeremysee2 8b63482
black formatter
jeremysee2 857a32c
Merge pull request #14 from jeremysee2/sync-with-upstream
jeremysee2 02e3ee7
Added WorldObjectService to retrieve world objects (e.g. fiducials)
jeremysee2 68f0321
run docker build only on push to master
jeremysee2 99dd2f6
WorldObjectClient ROS unit testing
jeremysee2 0234280
add worldobjecttask to async tasks
jeremysee2 2a5d7f2
testing with real data blob
jeremysee2 c90d82a
remove pkl test
jeremysee2 8f320b5
changed secs
jeremysee2 24ba451
increase test timeout
jeremysee2 cae091a
update CI pipeline
jeremysee2 7e0eac6
update doc
jeremysee2 2e3fe50
Merge pull request #15 from jeremysee2/add-worldobject-client
jeremysee2 50939cf
Merge branch 'master' of https://github.com/heuristicus/spot_ros into…
jeremysee2 49b8836
Merge pull request #17 from jeremysee2/heuristicus-master
jeremysee2 6f16994
graphnav fixes, tested on hardware
jeremysee2 14ebffc
cleanup logging
jeremysee2 c7d15ea
added downloadgraph, navigate_to, navigate_init
jeremysee2 08b893a
added loop closure and anchor optimization
jeremysee2 cae8ee2
added navigate_route support
jeremysee2 49d5976
cleanup unused code
jeremysee2 d31523a
Add arm_gaze as a service from the SDK demo, to showcase arm usage
jeremysee2 c790319
added unit tests
jeremysee2 26e744e
Merge pull request #18 from jeremysee2/graphnav-fixes
jeremysee2 2aca768
Merge branch 'master' into arm-gaze-service
jeremysee2 6d80eb0
added unit tests for arm_gaze
jeremysee2 5d654f1
Merge pull request #19 from jeremysee2/arm-gaze-service
jeremysee2 3caf2aa
remoe unused file
jeremysee2 e881f0a
Merge pull request #20 from jeremysee2/cleanup-unused
jeremysee2 3b64ab2
Add rosparam for switching depth and depth_in_visual images, build Do…
jeremysee2 fbf80f1
build spot_driver first
af065bf
entrypoint as script
jeremysee2 2fcd017
chmod +x entrypoint
jeremysee2 e8ee045
tested cmd_vel
jeremysee2 410e41a
use vision
jeremysee2 1369814
Merge branch 'master' of https://github.com/jeremysee2/spot_ros into …
jeremysee2 7b695b6
remove graph_nav_util
jeremysee2 776c0da
Merge pull request #24 from jeremysee2/merge-upstream-changes
jeremysee2 d52e289
Split wrapper (#23)
jeremysee2 59b2db4
remove duplicated get_corrected_odom
jeremysee2 9fbaa46
spot eap docs
jeremysee2 2e4cf7b
how to generate docs locally
jeremysee2 065a572
format eap usage
jeremysee2 3c134ca
arm usage
jeremysee2 0503f92
docker deployment
jeremysee2 49e1675
graphnav docs
jeremysee2 44bb37e
eap docs
jeremysee2 e20abe1
arm docs
jeremysee2 10ca432
graphnav images
jeremysee2 402a0ba
generated html docs
jeremysee2 ad7687f
added comments from PR feedback
jeremysee2 f884c88
remove spot_config
jeremysee2 c414be4
Merge branch 'master' into jeremysee-master
heuristicus 9460b50
update wrapper
heuristicus 18fe35f
Merge branch 'master' of github.com:jeremysee2/spot_ros into jeremyse…
heuristicus d46c1ec
update wrapper to latest
heuristicus 0220b9d
update wrapper
heuristicus f001bbd
functions used to update the published messages are now in threads
heuristicus 0d62561
formatting
heuristicus af8910f
reorder imports with pycharm organise imports
heuristicus 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 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,38 @@ | ||
name: Docker image upload | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Extract branch name | ||
run: echo "branch=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
- name: Print branch name for Docker Hub | ||
run: echo "${{ steps.extract_branch.outputs.branch }}" | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./deploy/Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/spot_ros:${{ steps.extract_branch.outputs.branch }} | ||
secrets: | | ||
"SPOTROS_GIT_BRANCH=${{ github.ref_name }}" |
This file contains 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,79 @@ | ||
name: spot_driver unit tests | ||
|
||
# Run on every push | ||
on: [push] | ||
|
||
# Environmental variables | ||
env: | ||
SPOT_ARM: 1 | ||
|
||
jobs: | ||
spot_driver-unit-tests: | ||
# All steps inside this job will run inside the ROS Noetic container | ||
container: public.ecr.aws/docker/library/ros:noetic | ||
runs-on: ubuntu-latest | ||
# Let's ensure we use bash, and work within our catkin worksapce | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
# Create directory to check out the code to | ||
- name: Create catkin_ws directory | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/catkin_ws/src | ||
|
||
# Check out the Spot ROS code | ||
- name: Checkout SpotROS | ||
uses: actions/checkout@v3 | ||
with: | ||
path: catkin_ws/src/spot_ros | ||
|
||
- name: Checkout Spot Wrapper | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: jeremysee2/spot_wrapper #TODO: Change to bdaiinstitute once merged | ||
path: catkin_ws/src/spot_ros/spot_wrapper | ||
|
||
# Install the required packages | ||
- name: Install dependencies (minus qttools) | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install -y \ | ||
python3-pip \ | ||
ros-noetic-tf2-bullet | ||
pip install cython \ | ||
bosdyn-client \ | ||
bosdyn-mission \ | ||
bosdyn-api \ | ||
bosdyn-core \ | ||
empy | ||
working-directory: catkin_ws/ | ||
|
||
# Install SpotWrapper | ||
- name: Install SpotWrapper | ||
run: | | ||
cd $GITHUB_WORKSPACE/catkin_ws/src/spot_ros | ||
pip install -r spot_wrapper/requirements.txt | ||
pip install -e spot_wrapper | ||
|
||
- name: Check that code has been downloaded correctly | ||
run: | | ||
ls $GITHUB_WORKSPACE/catkin_ws/src | ||
ls $GITHUB_WORKSPACE/catkin_ws/src/spot_ros | ||
|
||
# Build our workspace | ||
- name: Build workspace for spot_driver | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
rosdep update | ||
rosdep install --from-paths src --ignore-src -y | ||
ls $GITHUB_WORKSPACE/catkin_ws | ||
catkin_make --only-pkg-with-deps spot_driver | ||
working-directory: catkin_ws/ | ||
|
||
# Run our ROS test! | ||
- name: Run tests | ||
run: | | ||
source devel/setup.bash && | ||
rostest spot_driver run_tests.test --text | ||
working-directory: catkin_ws/ |
This file contains 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
*.pyc | ||
*.DS_Store |
This file contains 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,53 @@ | ||
FROM ros:noetic | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt update | ||
RUN DEBIAN_FRONTEND=noninteractive apt install -y git | ||
|
||
# Download the Spot ROS packages | ||
RUN mkdir -p /ros/catkin_ws/src | ||
WORKDIR /ros/catkin_ws/src | ||
# Get the secrets from Github Actions | ||
RUN --mount=type=secret,id=SPOTROS_GIT_BRANCH \ | ||
export SPOTROS_GIT_BRANCH=$(cat /run/secrets/SPOTROS_GIT_BRANCH) && \ | ||
echo $SPOTROS_GIT_BRANCH && \ | ||
git clone -b $SPOTROS_GIT_BRANCH https://github.com/jeremysee2/spot_ros.git /ros/catkin_ws/src/spot_ros | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt install -y python3-pip git qttools5-dev \ | ||
ros-noetic-tf2-bullet ros-noetic-roslint ros-noetic-pcl-ros ros-noetic-catkin \ | ||
python3-catkin-pkg nano vim ufw net-tools | ||
RUN python3 -m pip install cython bosdyn-client bosdyn-mission bosdyn-api bosdyn-core empy numpy | ||
RUN chmod +x /opt/ros/noetic/setup.sh | ||
RUN /opt/ros/noetic/setup.sh | ||
|
||
# Git clone Spot Wrapper | ||
WORKDIR /ros/catkin_ws/src/spot_ros | ||
RUN git clone https://github.com/jeremysee2/spot_wrapper.git /ros/catkin_ws/src/spot_ros/spot_wrapper | ||
RUN pip install -r /ros/catkin_ws/src/spot_ros/spot_wrapper/requirements.txt | ||
RUN pip install -e /ros/catkin_ws/src/spot_ros/spot_wrapper | ||
|
||
# Install ROS dependencies | ||
WORKDIR /ros/catkin_ws/ | ||
|
||
RUN rosdep install --from-paths /ros/catkin_ws/src --ignore-src -y | ||
|
||
# Build ROS packages, remember to source the setup.bash file in the same command | ||
WORKDIR /ros/catkin_ws/ | ||
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && \ | ||
catkin_make --only-pkg-with-deps spot_driver" | ||
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && \ | ||
catkin_make" | ||
|
||
# Source the new packages | ||
RUN chmod +x /ros/catkin_ws/devel/setup.sh && /ros/catkin_ws/devel/setup.sh | ||
|
||
# Setup the environmental variables for including these in the URDF | ||
ARG SPOT_ARM=1 | ||
ARG SPOT_PACK=1 | ||
ARG SPOT_LIDAR_MOUNT=1 | ||
ARG SPOT_VELODYNE=1 | ||
ARG SPOT_USERNAME=admin | ||
ARG SPOT_PASSWORD=dummypassword | ||
|
||
ARG ROS_MASTER_URI=http://localhost:21311 | ||
|
||
ENTRYPOINT /bin/bash -c "/ros/catkin_ws/src/spot_ros/deploy/entrypoint.sh" |
This file contains 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,3 @@ | ||
#!/bin/bash | ||
source /ros/catkin_ws/devel/setup.sh && \ | ||
roslaunch spot_driver driver.launch username:=admin password:=$SPOT_PASSWORD |
This file contains 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 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 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 | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
<launch> | ||||||
<arg name="username" default="dummyusername" /> | ||||||
<arg name="password" default="dummypassword" /> | ||||||
<arg name="hostname" default="192.168.50.3" /> | ||||||
<arg name="hostname" default="192.168.80.3" /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This would break things for anyone who was using the default value for this. |
||||||
<arg name="estop_timeout" default="9.0"/> | ||||||
<arg name="autonomy_enabled" default="true"/> | ||||||
<!-- In m/s. 0 applies spot's internal limits --> | ||||||
|
@@ -35,5 +35,5 @@ | |||||
<rosparam command="load" file="$(find spot_driver)/config/twist_mux.yaml" /> | ||||||
<remap from="cmd_vel_out" to="spot/cmd_vel"/> | ||||||
</node> | ||||||
|
||||||
</launch> |
This file contains 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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be specific about what these parameters are for.