Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration' into tipdetection
Browse files Browse the repository at this point in the history
  • Loading branch information
qhdwight committed Apr 19, 2024
2 parents e4ae239 + 5eb699e commit 73c9320
Show file tree
Hide file tree
Showing 149 changed files with 24,394 additions and 3,433 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,8 @@ jobs:
lfs: "true"
# This makes sure that $GITHUB_WORKSPACE is the catkin workspace path
path: "src/mrover"
- name: Ensure Python Requirements
run: . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && pip install --no-cache-dir -e "$GITHUB_WORKSPACE/src/mrover[dev]"
- name: Style Check
run: . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && cd $GITHUB_WORKSPACE/src/mrover/ && ./style.sh
- name: Update ROS APT
if: github.event.pull_request.draft == false
run: runuser -u mrover -- rosdep update
- name: Ensure ROS APT Requirements
if: github.event.pull_request.draft == false
run: runuser -u mrover -- rosdep install --from-paths "$GITHUB_WORKSPACE/src" --ignore-src -r -y --rosdistro noetic
- name: Copy Catkin Profiles
if: github.event.pull_request.draft == false
run: rsync -r $GITHUB_WORKSPACE/src/mrover/ansible/roles/build/files/profiles $GITHUB_WORKSPACE/.catkin_tools
Expand All @@ -42,7 +34,7 @@ jobs:
if: github.event.pull_request.draft == false && github.event.pull_request.base.ref != 'refs/heads/master'
run: . /opt/ros/noetic/setup.sh && . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && catkin build
- name: Build With Clang Tidy
if : github.event_name == 'push' && github.event.pull_request.base.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.event.pull_request.base.ref == 'refs/heads/master'
run: . /opt/ros/noetic/setup.sh && . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && catkin build -DCMAKE_CXX_CLANG_TIDY=clang-tidy-16
- name: Test
if: github.event.pull_request.draft == false
Expand Down
12 changes: 1 addition & 11 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
[submodule "deps/libde265"]
path = deps/libde265
url = https://github.com/strukturag/libde265.git
shallow = true
branch = v1.0.15
[submodule "deps/dawn"]
path = deps/dawn
url = https://dawn.googlesource.com/dawn
shallow = true
branch = chromium/6108
[submodule "deps/emsdk"]
path = deps/emsdk
url = [email protected]:emscripten-core/emsdk.git
shallow = true
branch = 3.1.53
branch = chromium/6376
[submodule "deps/manif"]
path = deps/manif
url = https://github.com/artivis/manif.git
Expand Down
66 changes: 32 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,42 +143,40 @@ target_link_libraries(lie PUBLIC MANIF::manif)

## ESW

if (NOT APPLE)
mrover_add_vendor_header_only_library(moteus deps/mjbots)
mrover_add_header_only_library(can_device src/esw/can_device)
mrover_add_library(motor_library src/esw/motor_library/*.cpp src/esw/motor_library)
target_link_libraries(motor_library PUBLIC can_device moteus)

if (NetLink_FOUND AND NetLinkRoute_FOUND)
mrover_add_nodelet(can_driver src/esw/can_driver/*.cpp src/esw/can_driver src/esw/can_driver/pch.hpp)
mrover_nodelet_link_libraries(can_driver ${NetLink_LIBRARIES} ${NetLinkRoute_LIBRARIES})
mrover_nodelet_include_directories(can_driver ${NetLink_INCLUDE_DIRS} ${NetLinkRoute_INCLUDE_DIRS})
endif ()

macro(mrover_add_esw_bridge_node name sources)
mrover_add_node(${name} ${sources})
target_link_libraries(${name} PRIVATE can_device motor_library)
endmacro()

mrover_add_esw_bridge_node(arm_hw_bridge src/esw/arm_hw_bridge/*.cpp)
mrover_add_esw_bridge_node(arm_translator_bridge src/esw/arm_translator_bridge/*.cpp src/esw/arm_translator_bridge/*.hpp)
mrover_add_esw_bridge_node(cache_bridge src/esw/cache_bridge/*.cpp)
mrover_add_esw_bridge_node(drive_bridge src/esw/drive_bridge/*.cpp)
mrover_add_esw_bridge_node(led_hw_bridge src/esw/led_hw_bridge/*.cpp)
mrover_add_esw_bridge_node(led src/esw/led/*.cpp)
mrover_add_esw_bridge_node(mast_gimbal_bridge src/esw/mast_gimbal_bridge/*.cpp)
mrover_add_esw_bridge_node(pdb_bridge src/esw/pdb_bridge/*.cpp)
mrover_add_esw_bridge_node(sa_hw_bridge src/esw/sa_hw_bridge/*.cpp)
mrover_add_esw_bridge_node(sa_translator_bridge src/esw/sa_translator_bridge/*.cpp)
mrover_add_esw_bridge_node(science_bridge src/esw/science_bridge/*.cpp)
mrover_add_esw_bridge_node(brushless_test_bridge src/esw/brushless_test_bridge/*.cpp motor_library)
mrover_add_esw_bridge_node(brushed_test_bridge src/esw/brushed_test_bridge/*.cpp)
mrover_add_esw_bridge_node(test_arm_bridge src/esw/test_arm_bridge/*.cpp)
mrover_add_esw_bridge_node(pdb_test_bridge src/esw/pdb_test_bridge/*.cpp)
mrover_add_esw_bridge_node(arm_position_test_bridge src/esw/arm_position_test_bridge/*.cpp)
# mrover_add_esw_bridge_node(sa_sensor src/esw/fw/dirt_sensor/dirt_sensor_ros/dirt_sensor_ros.ino)
mrover_add_vendor_header_only_library(moteus deps/mjbots)
mrover_add_header_only_library(can_device src/esw/can_device)
mrover_add_library(motor_library src/esw/motor_library/*.cpp src/esw/motor_library)
target_link_libraries(motor_library PUBLIC can_device moteus)

if (NetLink_FOUND AND NetLinkRoute_FOUND)
mrover_add_nodelet(can_driver src/esw/can_driver/*.cpp src/esw/can_driver src/esw/can_driver/pch.hpp)
mrover_nodelet_link_libraries(can_driver ${NetLink_LIBRARIES} ${NetLinkRoute_LIBRARIES})
mrover_nodelet_include_directories(can_driver ${NetLink_INCLUDE_DIRS} ${NetLinkRoute_INCLUDE_DIRS})
endif ()

macro(mrover_add_esw_bridge_node name sources)
mrover_add_node(${name} ${sources})
target_link_libraries(${name} PRIVATE can_device motor_library)
endmacro()

mrover_add_esw_bridge_node(arm_hw_bridge src/esw/arm_hw_bridge/*.cpp)
mrover_add_esw_bridge_node(arm_translator_bridge src/esw/arm_translator_bridge/*.cpp src/esw/arm_translator_bridge/*.hpp)
mrover_add_esw_bridge_node(cache_bridge src/esw/cache_bridge/*.cpp)
mrover_add_esw_bridge_node(drive_bridge src/esw/drive_bridge/*.cpp)
mrover_add_esw_bridge_node(led_hw_bridge src/esw/led_hw_bridge/*.cpp)
mrover_add_esw_bridge_node(led src/esw/led/*.cpp)
mrover_add_esw_bridge_node(mast_gimbal_bridge src/esw/mast_gimbal_bridge/*.cpp)
mrover_add_esw_bridge_node(pdb_bridge src/esw/pdb_bridge/*.cpp)
mrover_add_esw_bridge_node(sa_bridge src/esw/sa_bridge/*.cpp)
mrover_add_esw_bridge_node(science_bridge src/esw/science_bridge/*.cpp)
mrover_add_esw_bridge_node(brushless_test_bridge src/esw/brushless_test_bridge/*.cpp)
mrover_add_esw_bridge_node(brushed_test_bridge src/esw/brushed_test_bridge/*.cpp)
mrover_add_esw_bridge_node(science_test_bridge src/esw/science_test_bridge/*.cpp)
mrover_add_esw_bridge_node(test_arm_bridge src/esw/test_arm_bridge/*.cpp)
mrover_add_esw_bridge_node(pdb_test_bridge src/esw/pdb_test_bridge/*.cpp)
# mrover_add_esw_bridge_node(arm_position_test_bridge src/esw/arm_position_test_bridge/*.cpp)
# mrover_add_esw_bridge_node(sa_sensor src/esw/fw/dirt_sensor/dirt_sensor_ros/dirt_sensor_ros.ino)

## Perception

mrover_add_library(websocket_server src/esw/websocket_server/*.cpp src/esw/websocket_server)
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
- libopencv-dev
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- vainfo

- name: Install Local APT Packages
become: True
Expand Down Expand Up @@ -205,3 +206,8 @@
- "{{ catkin_workspace }}/src/mrover[dev]"
virtualenv: "{{ catkin_workspace }}/src/mrover/venv"
virtualenv_command: /usr/bin/python3.10 -m venv

- name: Install Chromium
become: True
snap:
name: chromium
2 changes: 1 addition & 1 deletion ansible/roles/dev/files/home/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ZSH_THEME="mrover"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git virtualenvwrapper fzf)
plugins=(git virtualenvwrapper fzf zsh-autosuggestions zsh-syntax-highlighting)

source $ZSH/oh-my-zsh.sh

Expand Down
10 changes: 10 additions & 0 deletions ansible/roles/dev/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
dest: ~/
recursive: true

- name: ZSH Automatic Suggestions Plugin
git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

- name: ZSH Syntax Highlighting Plugin
git:
repo: https://github.com/zsh-users/zsh-syntax-highlighting
dest: ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

- name: Use ZSH as a default shell
become: true
command: chsh --shell /usr/bin/zsh {{ ansible_user_id }}
Expand Down
7 changes: 7 additions & 0 deletions ansible/roles/esw/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
become: true
command: udevadm trigger --subsystem-match=tty

- name: Install fdcanusb Binary
become: true
copy:
src: files/bin/fdcanusb_daemon
dest: /usr/local/bin/
mode: 0755

- name: Install Moteus GUI
pip:
name: moteus_gui
8 changes: 4 additions & 4 deletions ansible/roles/jetson_build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
state: latest
name:
- zstd # Required to unpack ZED installer
- cuda
- cuda-12-3
- nvidia-jetpack

- name: ZED SDK Download
get_url:
url: https://download.stereolabs.com/zedsdk/4.0/l4t35.4/jetsons
dest: /tmp/ZED_SDK_Tegra_L4T35.4_v4.0.7.zstd.run
url: https://download.stereolabs.com/zedsdk/4.1/l4t35.4/jetsons
dest: /tmp/ZED_SDK_Tegra_L4T35.4_v4.1.zstd.run
mode: 0755

- name: ZED SDK Install
# Silent mode prevents any user input prompting
command: /tmp/Downloads/ZED_SDK_Tegra_L4T35.4_v4.0.7.zstd.run -- silent
command: /tmp/Downloads/ZED_SDK_Tegra_L4T35.4_v4.1.zstd.run -- silent
args:
creates: /usr/local/zed
2 changes: 0 additions & 2 deletions ansible/roles/jetson_services/files/99-usb-serial.rules

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file removed bun.lockb
Binary file not shown.
9 changes: 9 additions & 0 deletions cmake/deps.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# The simulator will only be built if Dawn (low-level graphics API) is found:
# 1) Installed system-wide with the .deb package in the pkg/ folder. This is ONLY for Ubuntu 20
# If this is the case then "find_package" will set "dawn_FOUND" to true
# 2) Built from source with the build_dawn.sh script. This is for all other systems (non-Ubuntu, macOS, etc.)
# If this is the case libwebgpu_dawn.* will be found in deps/dawn/out/Release and "dawn_FOUND" will be set to true

find_package(dawn QUIET)
if (dawn_FOUND)
message(STATUS "Using Dawn system install")
Expand Down Expand Up @@ -43,6 +49,7 @@ find_package(OpenCV REQUIRED)
find_package(ZED QUIET)
find_package(Eigen3 REQUIRED)

# Same idea as dawn, ideally installed via a package, but if not then build from source
find_package(manif QUIET)
if (NOT manif_FOUND)
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/../deps/manif/include/manif)
Expand All @@ -55,6 +62,8 @@ if (NOT manif_FOUND)
endif ()
endif ()

# These are old packages so they do not support "find_package" and must be found with pkg-config
# Thankfully CMake has a built-in module for this
find_package(PkgConfig REQUIRED)
pkg_search_module(NetLink libnl-3.0 QUIET)
pkg_search_module(NetLinkRoute libnl-route-3.0 QUIET)
Expand Down
Loading

0 comments on commit 73c9320

Please sign in to comment.