diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 842aaad..a73eb5d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { "name": "DevEnv", - "image": "ghcr.io/roboeagles4828/developer-environment:7", + "image": "ghcr.io/gold-rush-robotics/dev_env:5", "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/DevEnv,type=bind", "workspaceFolder": "/workspace/DevEnv", "containerEnv": { - "SHELL": "/usr/bin/zsh", + "SHELL": "zsh", "ROS_DOMAIN_ID": "0", "FASTRTPS_DEFAULT_PROFILES_FILE": "/usr/local/share/middleware_profiles/rtps_udp_profile.xml", "WORKSPACE_LOCAL_PATH": "${localWorkspaceFolder}", @@ -16,14 +16,14 @@ }, "postCreateCommand": "sh .devcontainer/postCreate.sh", - "postStartCommand": " sh .devcontainer/postStart.sh", + // "postStartCommand": " sh .devcontainer/postStart.sh", "initializeCommand": "sh .devcontainer/init.sh", "securityOpt": [ "seccomp=unconfined" ], "capAdd": ["SYS_PTRACE"], "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind", // docker - "source=${localEnv:HOME}/docker/vscode,target=/home/admin/.vscode-server,type=bind", // vscode - "source=${localEnv:HOME}/.ssh,target=/home/admin/.ssh,type=bind" // vscode + // "source=${localEnv:HOME}/docker/vscode,target=/home/admin/.vscode-server,type=bind", // vscode + // "source=${localEnv:HOME}/.ssh,target=/home/admin/.ssh,type=bind" // vscode ], "runArgs": [ "--privileged", @@ -37,11 +37,11 @@ "extensions": [ "ms-azuretools.vscode-docker", "ms-iot.vscode-ros", - "GitHub.copilot", "eamodio.gitlens", "appulate.filewatcher", "formulahendry.code-runner", ] } } + } \ No newline at end of file diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index d216d3c..ba20e2c 100644 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# Pull the actual image so it is saved locally -docker pull ghcr.io/roboeagles4828/developer-environment:7 -mkdir -p ~/docker/vscode -echo "Display to use: $DISPLAY" +#!/bin/bash +# Pull the actual image so it is saved locally +docker pull ghcr.io/gold-rush-robotics/dev_env:5 +mkdir -p ~/docker/vscode +echo "Display to use: $DISPLAY" diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 4f75f5d..1935aba 100644 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -1,26 +1,10 @@ #!/bin/bash -echo "source /opt/ros/humble/setup.bash" - -git config --global core.filemode false -git config --global user.email "git@swiftcreekrobotics.onmicrosoft.com" -git config --global user.name "roboeagles" -git config devcontainers-theme.show-dirty 1 +echo "source /opt/ros/jazzy/setup.zsh" | sudo tee -a ~/.zshrc > /dev/null +echo 'export ZSH="$HOME/.oh-my-zsh"' | sudo tee -a ~/.zshrc > /dev/null sed -i 's/ZSH_THEME="devcontainers"/ZSH_THEME="eastwood"/' ~/.zshrc +echo "source /opt/ros/jazzy/setup.zsh" | sudo tee -a ~/.zshrc > /dev/null +echo "export ROS_DISTRO=jazzy" | sudo tee -a ~/.zshrc > /dev/null +echo "export RCUTILS_COLORIZED_OUTPUT=1" | sudo tee -a ~/.zshrc > /dev/null +echo 'complete -o nospace -o default -F _python_argcomplete "ros2"' | sudo tee -a ~/.zshrc > /dev/null +echo 'alias python="python3"' | sudo tee -a ~/.zshrc > /dev/null -echo "source /opt/ros/humble/setup.zsh" >> ~/.zshrc -echo "source /home/admin/workspaces/rtab_ws/install/setup.zsh" >> ~/.zshrc -# echo "if [ ! -d /workspaces/edna2023/install ]; then" >> ~/.zshrc -echo "echo -e 'No install folder found remember to build with ctrl + shift + b\n';" >> ~/.zshrc -# echo "else source /workspaces/edna2023/install/setup.zsh; fi" >> ~/.zshrc -echo "export ROS_DISTRO=humble" >> ~/.zshrc -echo "export RCUTILS_COLORIZED_OUTPUT=1" >> ~/.zshrc -echo 'complete -o nospace -o default -F _python_argcomplete "ros2"' >> ~/.zshrc -echo 'alias python="python3"' >> ~/.zshrc - - -# Update apt list and rosdep -# Skipping since this will be done recently in docker file -# sudo apt-get update -# rosdep update --rosdistro=humble -# rosdep install --from-paths src --ignore-src -r -y -# rm -rf /workspaces/edna2023/install /workspaces/edna2023/build /workspaces/edna2023/log diff --git a/.devcontainer/postStart.sh b/.devcontainer/postStart.sh deleted file mode 100644 index 18e56c3..0000000 --- a/.devcontainer/postStart.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -ORANGE='\033[0;33m' -RED='\033[0;31m' -GREEN='\033[0;32m' -NC='\033[0m' - -# Change permissions on any joystick devices -# sudo chmod a+rw /dev/input/js* -source /opt/ros/humble/setup.bash - -echo -e "\n----JOYSTICKS CONNECTED----" -ros2 run joy joy_enumerate_devices - - -echo -e "\n----COMMANDS----" -echo "launch : Launch sim teleop code" -# echo "launch isaac : Launch sim teleop code" -echo "launch real : Launch real teleop code" -# echo "launch test_hw : Launch rviz with teleop code" -echo "restart-ros2 : restart ros2 daemon" - -echo -e "\n----Build Command----" -echo -e "ctrl + shift + b : Build" - -echo -e "\n----ROS DOMAIN ID: ${GREEN}$ROS_DOMAIN_ID${NC}" -echo -e "----ROS NAMESPACE: ${GREEN}$ROS_NAMESPACE${NC}" \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1b5543b..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -kernel.zip filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e99a8e0..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vmlinux -kernel.zip diff --git a/.vs/DevEnv/FileContentIndex/1fd538b6-d6eb-4c5d-9643-9fe0b2226647.vsidx b/.vs/DevEnv/FileContentIndex/1fd538b6-d6eb-4c5d-9643-9fe0b2226647.vsidx deleted file mode 100644 index 33113bb..0000000 Binary files a/.vs/DevEnv/FileContentIndex/1fd538b6-d6eb-4c5d-9643-9fe0b2226647.vsidx and /dev/null differ diff --git a/.vs/DevEnv/config/applicationhost.config b/.vs/DevEnv/config/applicationhost.config deleted file mode 100644 index a369b95..0000000 --- a/.vs/DevEnv/config/applicationhost.config +++ /dev/null @@ -1,1026 +0,0 @@ - - - - - - - -
-
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.vs/DevEnv/v17/.wsuo b/.vs/DevEnv/v17/.wsuo deleted file mode 100644 index d671d4c..0000000 Binary files a/.vs/DevEnv/v17/.wsuo and /dev/null differ diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json deleted file mode 100644 index 866f1e1..0000000 --- a/.vs/ProjectSettings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "CurrentProjectSetting": null -} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json deleted file mode 100644 index 99054a7..0000000 --- a/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ExpandedNodes": [ - "", - "\\.devcontainer" - ], - "SelectedNode": "\\.devcontainer\\devcontainer.json", - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite deleted file mode 100644 index 6b61224..0000000 Binary files a/.vs/slnx.sqlite and /dev/null differ diff --git a/.vscode/settings.json b/.vscode/settings.json index b2aeec7..0a013f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,11 +4,11 @@ { "match": "\\.xacro*$", "isAsync": true, - "cmd": "/bin/bash -c \u0027source /opt/ros/humble/setup.sh \u0026\u0026 source ${workspaceRoot}/install/setup.bash \u0026\u0026 xacro ${workspaceRoot}/src/edna_description/urdf/robots/edna.urdf.xacro \u003e ${workspaceRoot}/src/edna_description/urdf/edna.urdf namespace:=$ROS_NAMESPACE\u0027", + "cmd": "/bin/bash -c \u0027source /opt/ros/jazzy/setup.sh \u0026\u0026 source ${workspaceRoot}/install/setup.bash \u0026\u0026 xacro ${workspaceRoot}/src/edna_description/urdf/robots/edna.urdf.xacro \u003e ${workspaceRoot}/src/edna_description/urdf/edna.urdf namespace:=$ROS_NAMESPACE\u0027", "event": "onFileChange" } ], - "ros.distro": "humble", + "ros.distro": "jazzy", "ros.rosSetupScript": "${workspaceFolder}/install/setup.bash", "files.associations": { "string": "cpp", @@ -98,12 +98,12 @@ "/workspaces/edna2023/build/edna_debugger", "/workspaces/edna2023/install/edna_debugger/lib/python3.10/site-packages", "/home/admin/workspaces/rtab_ws/install/rtabmap_ros/local/lib/python3.10/dist-packages", - "/opt/ros/humble/lib/python3.10/site-packages", - "/opt/ros/humble/local/lib/python3.10/dist-packages" + "/opt/ros/jazzy/lib/python3.10/site-packages", + "/opt/ros/jazzy/local/lib/python3.10/dist-packages" ], "python.analysis.extraPaths": [ - "/opt/ros/humble/lib/python3.10/site-packages", - "/opt/ros/humble/local/lib/python3.10/dist-packages" + "/opt/ros/jazzy/lib/python3.10/site-packages", + "/opt/ros/jazzy/local/lib/python3.10/dist-packages" ] }, null, diff --git a/.wslconfig b/.wslconfig deleted file mode 100644 index 26d18a9..0000000 --- a/.wslconfig +++ /dev/null @@ -1,2 +0,0 @@ -[wsl2] -kernel=C:\\sources\\vmlinux diff --git a/README.md b/README.md index e13556f..cc17b6b 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,3 @@ # DevEnv -1) Ensure that virtualization is turned on in bios -2) Open Powershell as Administrator and run -```Set-ExecutionPolicy unrestricted``` -3) cd into the DevEnv directory -```cd C:\path\to\DevEnv``` -3) Run setup.ps1 which installs - - WSL2 - - WSL2 kernel that support cameras, multicasting, xbox controllers and blueooth - - winget - - docker-desktop - - git - - usbipd -4) Run code-setup.ps1 - - vscode - - dev container extension - - remote explorer extension -5) Restart your PC - -6) Open the DevEnv folder in vscode and reopen container - - Installs ROS2 Humble docker image - + diff --git a/code-setup.ps1 b/code-setup.ps1 deleted file mode 100644 index 23d040c..0000000 --- a/code-setup.ps1 +++ /dev/null @@ -1,44 +0,0 @@ -if ((Get-Location).Path -notmatch 'DevEnv$') { - Write-Error "This script must be run from the DevEnv directory" - exit 1 -} -code --install-extension ms-vscode.remote-explorer -code --install-extension ms-vscode-remote.remote-containers -# Get the path to the settings.json file -$path = "C:\Users\$env:UserName\AppData\Roaming\Code\User\settings.json" - -# Check if the file exists -if (-not (Test-Path $path)) { - # Write-Error "File not found: $path" - # return - "Vscode settings does not exist, creating new settings file." - New-Item C:\Users\$env:UserName\AppData\Roaming\Code\User\settings.json -type file - Set-Content $path "{`n`"dev.containers.executeInWSL`":true`n}" -} - -# Read the contents of the file -$content = Get-Content $path -Raw - -# Convert the contents to a JSON object -$json = ConvertFrom-Json $content - - -# Check if the property already exists - -if ($json | Get-Member -Name 'dev.containers.executeInWSL') { - Write-Host "Property already exists in $path" - return -} - -# Add the new property to the existing object -$json | add-member -Name "dev.containers.executeInWSL" -value $true -MemberType NoteProperty - -# Convert the JSON object back to a string -$newContent = ConvertTo-Json $json -Depth 100 - -# Write the new contents to the file -Set-Content $path $newContent - -Write-Host "Property added to $path" - -code \ No newline at end of file diff --git a/docker/developer-isaac-ros/Dockerfile b/docker/developer-isaac-ros/Dockerfile deleted file mode 100644 index 0287c77..0000000 --- a/docker/developer-isaac-ros/Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -FROM nvcr.io/nvidia/isaac/ros:x86_64-humble-nav2_7356480e8a4f3484b21ae13ec5c959ee -RUN mkdir -p /opt/install-scripts - -################ -# Config Setup # -################ - -# Copy middleware profiles -RUN mkdir -p /usr/local/share/middleware_profiles -COPY config/*_profile.xml /usr/local/share/middleware_profiles/ - -###################### -# User configuration # -###################### - -ARG USERNAME=admin -ARG USER_UID=1000 -ARG USER_GID=1000 - -# Install prerequisites -RUN apt-get update && apt-get install -y \ - sudo \ -&& rm -rf /var/lib/apt/lists/* \ -&& apt-get clean - -# Reuse triton-server user as 'admin' user if exists -RUN if [ $(getent group triton-server) ]; then \ - groupmod --gid ${USER_GID} -n ${USERNAME} triton-server ; \ - usermod -l ${USERNAME} -u ${USER_UID} -m -d /home/${USERNAME} triton-server ; \ - mkdir -p /home/${USERNAME} ; \ - sudo chown ${USERNAME}:${USERNAME} /home/${USERNAME} ; \ - fi - -# Create the 'admin' user if not already exists -RUN if [ ! $(getent passwd ${USERNAME}) ]; then \ - groupadd --gid ${USER_GID} ${USERNAME} ; \ - useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} ; \ - fi - -# Update 'admin' user -RUN echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ - && chmod 0440 /etc/sudoers.d/${USERNAME} \ - && adduser ${USERNAME} video && adduser ${USERNAME} sudo - -# Add docker group -RUN groupadd --system docker -RUN usermod -aG docker ${USERNAME} - -ENV USERNAME=${USERNAME} -ENV USER_GID=${USER_GID} -ENV USER_UID=${USER_UID} - -#################################### -# Install and Build Isaac ROS Pkgs # -#################################### -USER ${USERNAME} - -# Download -COPY install-scripts/install-isaac-pkgs /opt/install-scripts/install-isaac-pkgs -RUN sudo chmod +x /opt/install-scripts/install-isaac-pkgs -RUN /opt/install-scripts/install-isaac-pkgs - -# Build -RUN sudo rm /usr/lib/x86_64-linux-gnu/libcuda.so.1 -RUN sudo ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/lib/x86_64-linux-gnu/libcuda.so.1 -RUN cd /home/${USERNAME}/workspaces/isaac_ros-dev && source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --symlink-install - -##################### -# Interactive Setup # -##################### - -WORKDIR /home/${USERNAME}/workspaces/isaac_ros-dev -RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/${USERNAME}/.bashrc -RUN echo "source /home/${USERNAME}/workspaces/isaac_ros-dev/install/setup.bash" >> /home/${USERNAME}/.bashrc -COPY entrypoint.sh /home/${USERNAME}/entrypoint.sh -RUN sudo chmod +x /home/${USERNAME}/entrypoint.sh \ No newline at end of file diff --git a/docker/developer-isaac-ros/README.md b/docker/developer-isaac-ros/README.md deleted file mode 100644 index 1938b65..0000000 --- a/docker/developer-isaac-ros/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Docker for isaac ros - -This directory has the configuration for building the image used for isaac utilities that require l4t. -It uses the isaac ros common container as a base and installs edna related software on top. - -# Build - -1. Docker Login to the nvidia NGC registry. [Guide](https://docs.nvidia.com/ngc/ngc-catalog-user-guide/index.html)\ -This will be used to download nvidia images. -2. Docker Login to github registry. [Guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic) \ -This will be used to push the image to the registry -3. Run `./build` to build the image. \ -The script will prompt you if you would like to do a quick test or push to the registry. \ No newline at end of file diff --git a/docker/developer-isaac-ros/build b/docker/developer-isaac-ros/build deleted file mode 100644 index d6a7c9c..0000000 --- a/docker/developer-isaac-ros/build +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -VERSION="1" # Increment manually for now -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -IMAGE_NAME="developer-isaac-ros:$VERSION" - -nvidia-docker build -t "$GITHUB_REGISTRY/$IMAGE_NAME" \ - --network host . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it \ - --privileged \ - --network host \ - --runtime nvidia \ - -e NVIDIA_VISIBLE_DEVICES=all \ - -e NVIDIA_DRIVER_CAPABILITIES=all \ - -e FASTRTPS_DEFAULT_PROFILES_FILE="/usr/local/share/middleware_profiles/rtps_udp_profile.xml" \ - -e ACCEPT_EULA=y "$GITHUB_REGISTRY/$IMAGE_NAME" '/bin/bash' -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push "$GITHUB_REGISTRY/$IMAGE_NAME" -fi \ No newline at end of file diff --git a/docker/developer-isaac-ros/config/rtps_udp_profile.xml b/docker/developer-isaac-ros/config/rtps_udp_profile.xml deleted file mode 100644 index 9a66187..0000000 --- a/docker/developer-isaac-ros/config/rtps_udp_profile.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - -NVIDIA Isaac ROS Software License - - - - UdpTransport - UDPv4 - - - - - - - UdpTransport - - false - - - \ No newline at end of file diff --git a/docker/developer-isaac-ros/entrypoint.sh b/docker/developer-isaac-ros/entrypoint.sh deleted file mode 100644 index 18f127a..0000000 --- a/docker/developer-isaac-ros/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -source /opt/ros/${ROS_DISTRO}/setup.bash -if [ -d "/home/${USERNAME}/workspaces/isaac_ros-dev/install" ]; then - source /home/${USERNAME}/workspaces/isaac_ros-dev/install/setup.bash -fi -$@ \ No newline at end of file diff --git a/docker/developer-isaac-ros/install-scripts/install-isaac-pkgs b/docker/developer-isaac-ros/install-scripts/install-isaac-pkgs deleted file mode 100644 index d12958d..0000000 --- a/docker/developer-isaac-ros/install-scripts/install-isaac-pkgs +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Followed basic instructions from isaac ros github - -# Create workspace -mkdir -p ~/workspaces/isaac_ros-dev/src - -# Deps -cd ~/workspaces/isaac_ros-dev/src && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nitros && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_pose_estimation && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_apriltag && \ - git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_compression \ No newline at end of file diff --git a/docker/developer-zed/Dockerfile b/docker/developer-zed/Dockerfile deleted file mode 100644 index a24dcf7..0000000 --- a/docker/developer-zed/Dockerfile +++ /dev/null @@ -1,111 +0,0 @@ -ARG IMAGE_NAME=nvcr.io/nvidia/cuda:11.7.1-devel-ubuntu22.04 - -FROM ${IMAGE_NAME} - -ARG UBUNTU_RELEASE_YEAR=22 -ARG CUDA_MAJOR=11 -ARG CUDA_MINOR=7 -ARG ZED_SDK_MAJOR=3 -ARG ZED_SDK_MINOR=8 - -ARG ROS2_DIST=humble # ROS2 distribution - -ARG DEBIAN_FRONTEND=noninteractive - -ENV NVIDIA_DRIVER_CAPABILITIES \ - ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}compute,video,utility - -# Disable apt-get warnings -RUN apt-get update || true && apt-get install -y --no-install-recommends apt-utils dialog && \ - rm -rf /var/lib/apt/lists/* - -ENV TZ=Europe/Paris - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ - apt-get update && \ - apt-get install --yes lsb-release wget less udev sudo build-essential cmake python3 python3-dev python3-pip python3-wheel git jq libopencv-dev libpq-dev zstd usbutils && \ - rm -rf /var/lib/apt/lists/* - -############ Install ROS2 ############ - -# Set and Check Locale -RUN apt-get update || true && \ - apt-get install --no-install-recommends -y locales && \ - locale-gen en_US en_US.UTF-8 && \ - update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - export LANG=en_US.UTF-8 && \ - locale # verify settings && \ - rm -rf /var/lib/apt/lists/* - -# Setup Sources -RUN apt-get update || true && \ - apt-get install --no-install-recommends -y software-properties-common && \ - add-apt-repository universe && \ - apt-get install -y curl && \ - curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ - rm -rf /var/lib/apt/lists/* - -# Install ROS 2 Base packages and Python dependencies -RUN apt-get update || true && \ - apt-get install --no-install-recommends -y \ - ros-${ROS2_DIST}-ros-base \ - ros-${ROS2_DIST}-ament-cmake-clang-format \ - ros-${ROS2_DIST}-image-transport \ - ros-${ROS2_DIST}-image-transport-plugins \ - ros-${ROS2_DIST}-diagnostic-updater \ - ros-${ROS2_DIST}-xacro \ - python3-flake8-docstrings \ - python3-pip \ - python3-pytest-cov \ - ros-dev-tools && \ - pip3 install \ - argcomplete \ - numpy \ - empy \ - lark && \ - rm -rf /var/lib/apt/lists/* - -# Initialize rosdep -RUN rosdep init && rosdep update - -# Install the ZED SDK -RUN echo "CUDA Version $CUDA_VERSION" > /usr/local/cuda/version.txt - -# Setup the ZED SDK -RUN apt-get update -y || true && \ - apt-get install --no-install-recommends dialog bash-completion lsb-release wget less udev sudo build-essential cmake zstd python3 python3-pip libpng-dev libgomp1 -y && \ - python3 -m pip install --upgrade pip; python3 -m pip install numpy opencv-python-headless && \ - wget -q -O ZED_SDK_Linux_Ubuntu.run https://download.stereolabs.com/zedsdk/$ZED_SDK_MAJOR.$ZED_SDK_MINOR/cu$CUDA_MAJOR$CUDA_MINOR/ubuntu$UBUNTU_RELEASE_YEAR && \ - chmod +x ZED_SDK_Linux_Ubuntu.run && \ - ./ZED_SDK_Linux_Ubuntu.run -- silent skip_tools skip_cuda && \ - ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/lib/x86_64-linux-gnu/libusb-1.0.so && \ - rm ZED_SDK_Linux_Ubuntu.run && \ - rm -rf /var/lib/apt/lists/* - -# Install the ZED ROS2 Wrapper -ENV ROS_DISTRO ${ROS2_DIST} - -# Copy the sources in the Docker image -WORKDIR /root/ros2_ws/src -RUN git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git - -# RUN ls -lah /root/ros2_ws/src/ -WORKDIR /root/ros2_ws/ - -RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && \ - rosdep install --from-paths src --ignore-src -r -y && \ - colcon build --parallel-workers $(nproc) --symlink-install \ - --event-handlers console_direct+ --base-paths src \ - --cmake-args ' -DCMAKE_BUILD_TYPE=Release' \ - ' -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs' \ - ' -DCMAKE_CXX_FLAGS="-Wl,--allow-shlib-undefined"' " - -WORKDIR /root/ros2_ws - -# Setup environment variables -COPY ros_entrypoint.sh /sbin/ros_entrypoint.sh -RUN sudo chmod 755 /sbin/ros_entrypoint.sh - -ENTRYPOINT ["/sbin/ros_entrypoint.sh"] -CMD ["bash"] \ No newline at end of file diff --git a/docker/developer-zed/build b/docker/developer-zed/build deleted file mode 100644 index 0ab7e3a..0000000 --- a/docker/developer-zed/build +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -echo "ONLY USE THIS SCRIPT ON THE JETSON" - -VERSION=1 -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -IMAGE_NAME="developer-zed" - -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it -e ACCEPT_EULA=y $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then wxxd - docker push $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi \ No newline at end of file diff --git a/docker/developer-zed/ros_entrypoint_jetson.sh b/docker/developer-zed/ros_entrypoint_jetson.sh deleted file mode 100644 index 30d1aae..0000000 --- a/docker/developer-zed/ros_entrypoint_jetson.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e - -# setup ros2 environment -source "/opt/ros/$ROS_DISTRO/install/setup.bash" -- -source "/root/ros2_ws/install/local_setup.bash" -- - -# Welcome information -echo "ZED ROS2 Docker Image" -echo "---------------------" -echo 'ROS distro: ' $ROS_DISTRO -echo 'DDS middleware: ' $RMW_IMPLEMENTATION -echo "---" -echo 'Available ZED packages:' -ros2 pkg list | grep zed -echo "---------------------" -exec "$@" \ No newline at end of file diff --git a/docker/developer/Dockerfile b/docker/developer/Dockerfile deleted file mode 100644 index a753bab..0000000 --- a/docker/developer/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -ARG BASE_IMAGE=osrf/ros:humble-desktop -FROM $BASE_IMAGE -RUN mkdir -p /opt/install-scripts -ARG INSTALL_COMMON="true" -ARG INSTALL_DOCKER="true" -ARG INSTALL_RTAB="true" - -###################### -# User configuration # -###################### - -ARG USERNAME=admin -ARG USER_UID=1000 -ARG USER_GID=1000 - -# Install prerequisites -RUN apt-get update && apt-get install -y \ - sudo \ -&& rm -rf /var/lib/apt/lists/* \ -&& apt-get clean - -# Create the 'admin' user if not already exists -RUN if [ ! $(getent passwd ${USERNAME}) ]; then \ - groupadd --gid ${USER_GID} ${USERNAME} ; \ - useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} ; \ - fi - -# Update 'admin' user -RUN echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ - && chmod 0440 /etc/sudoers.d/${USERNAME} \ - && adduser ${USERNAME} video && adduser ${USERNAME} sudo - -ENV USERNAME=${USERNAME} -ENV USER_GID=${USER_GID} -ENV USER_UID=${USER_UID} - -################ -# Config Setup # -################ - -# Copy middleware profiles -RUN mkdir -p /usr/local/share/middleware_profiles -COPY config/*_profile.xml /usr/local/share/middleware_profiles/ - -################## -# Common Utility # -################## - -# Copy and install common -COPY install-scripts/install-common /opt/install-scripts/install-common -RUN chmod +x /opt/install-scripts/install-common -RUN /opt/install-scripts/install-common ${INSTALL_COMMON} - -############## -# Docker CLI # -############## - -# Copy and isntall docker -COPY install-scripts/install-docker /opt/install-scripts/install-docker -RUN chmod +x /opt/install-scripts/install-docker -RUN /opt/install-scripts/install-docker ${INSTALL_DOCKER} - -# Add docker group -RUN groupadd --system docker -RUN usermod -aG docker ${USERNAME} - -################ -# Install RTAB # -################ - - -COPY install-scripts/install-rtab /opt/install-scripts/install-rtab -RUN chmod +x /opt/install-scripts/install-rtab -USER ${USERNAME} -RUN sudo apt update && sudo apt-get install -y python3-pip -RUN /opt/install-scripts/install-rtab ${INSTALL_RTAB} -USER root - -#################### -# Preload ROS Deps # -#################### - -# Copy and install workspace rosdeps -COPY install-scripts/install-rosdeps /opt/install-scripts/install-rosdeps -RUN chmod +x /opt/install-scripts/install-rosdeps -COPY src /tmp/src -USER ${USERNAME} -RUN /opt/install-scripts/install-rosdeps -USER root -RUN mkdir -p /opt/workspace - -####################### -# Install Python deps # -####################### -RUN pip install rticonnextdds-connector \ -robotpy==2023.4.2.1 \ -robotpy[ctre] \ -robotpy[all] \ -robotpy[commands2] \ -robotpy[navx] \ -wpilib==2023.4.2.0 - -###################### -# Docker Permissions # -###################### -RUN echo "#!/bin/sh\n\ -sudoIf() { if [ \"\$(id -u)\" -ne 0 ]; then sudo \"\$@\"; else \"\$@\"; fi }\n\ -SOCKET_GID=\$(stat -c '%g' /var/run/docker.sock) \n\ -if [ \"${SOCKET_GID}\" != '0' ]; then\n\ - if [ \"\$(cat /etc/group | grep :\${SOCKET_GID}:)\" = '' ]; then sudoIf groupadd --gid \${SOCKET_GID} docker-host; fi \n\ - if [ \"\$(id ${USERNAME} | grep -E \"groups=.*(=|,)\${SOCKET_GID}\(\")\" = '' ]; then sudoIf usermod -aG \${SOCKET_GID} ${USERNAME}; fi\n\ -fi\n\ -exec \"\$@\"" > /usr/local/share/docker-init.sh \ -&& chmod +x /usr/local/share/docker-init.sh - -# VS Code overrides ENTRYPOINT and CMD when executing `docker run` by default. -# Setting the ENTRYPOINT to docker-init.sh will configure non-root access to -# the Docker socket if "overrideCommand": false is set in devcontainer.json. -# The script will also execute CMD if you need to alter startup behaviors. -ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] -CMD [ "sleep", "infinity" ] \ No newline at end of file diff --git a/docker/developer/README.md b/docker/developer/README.md deleted file mode 100644 index c2c410a..0000000 --- a/docker/developer/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Docker for Development - -This directory has the configuration for building the image used in the edna devcontainer. -It uses the osrf ros humble image as a base and installs edna related software on top. - - -When loading the devcontainer the common utils feature is used to update the user GID/UID to match local and setup zsh and other terminal nice to haves. - -**Common Utils**: `devcontainers/features/common-utils` \ -**URL**: https://github.com/devcontainers/features/tree/main/src/common-utils - - -# Build - -1. Docker Login to github registry. [Guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic) \ -This will be used to push the image to the registry -2. Run `./build` to build the image. \ -The script will prompt you if you would like to do a quick test or push to the registry. \ No newline at end of file diff --git a/docker/developer/build b/docker/developer/build deleted file mode 100755 index 13634c3..0000000 --- a/docker/developer/build +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -VERSION=7 # Increment manually for now -PREV_VERSION="$((VERSION-1))" -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -IMAGE_NAME="developer-environment" - -echo "Building image $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION from $GITHUB_REGISTRY/$IMAGE_NAME:$PREV_VERSION" - -rm -rf ./src -cp -r ../../src . -# Copy rio requirements to be installed -cp ../../rio/requirements.txt ./src/requirements.txt - -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION --cache-from $GITHUB_REGISTRY/$IMAGE_NAME:$PREV_VERSION . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock:rw --user="1000:1000" $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION zsh -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi - -rm -rf src diff --git a/docker/developer/config/rtps_udp_profile.xml b/docker/developer/config/rtps_udp_profile.xml deleted file mode 100644 index 9a66187..0000000 --- a/docker/developer/config/rtps_udp_profile.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - -NVIDIA Isaac ROS Software License - - - - UdpTransport - UDPv4 - - - - - - - UdpTransport - - false - - - \ No newline at end of file diff --git a/docker/developer/install-scripts/install-common b/docker/developer/install-scripts/install-common deleted file mode 100644 index 84862b4..0000000 --- a/docker/developer/install-scripts/install-common +++ /dev/null @@ -1,180 +0,0 @@ -#!/bin/bash -# Installs Common dev packages. -# These are the same packages used in common devcontainer features. -# They are added into the docker image to speed up build times but does not have user setup config. - -set -e - -INSTALL_COMMON=$1 -if [ "$INSTALL_COMMON" != "true" ]; then - echo "Skipping common packages" - exit 0 -fi - -INSTALL_ZSH="true" -INSTALL_OH_MY_ZSH="true" -CONFIGURE_ZSH_AS_DEFAULT_SHELL="true" - -# Debian / Ubuntu packages -install_debian_packages() { - # Ensure apt is in non-interactive to avoid prompts - export DEBIAN_FRONTEND=noninteractive - - local package_list="apt-utils \ - openssh-client \ - gnupg2 \ - dirmngr \ - iproute2 \ - procps \ - lsof \ - htop \ - net-tools \ - psmisc \ - curl \ - tree \ - wget \ - rsync \ - ca-certificates \ - unzip \ - bzip2 \ - zip \ - nano \ - vim-tiny \ - less \ - jq \ - lsb-release \ - apt-transport-https \ - dialog \ - libc6 \ - libgcc1 \ - libkrb5-3 \ - libgssapi-krb5-2 \ - libicu[0-9][0-9] \ - liblttng-ust[0-9] \ - libstdc++6 \ - zlib1g \ - locales \ - sudo \ - ncdu \ - man-db \ - strace \ - manpages \ - manpages-dev \ - libnss3 \ - init-system-helpers" - - # Include libssl1.1 if available - if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then - package_list="${package_list} libssl1.1" - fi - - # Include libssl3 if available - if [[ ! -z $(apt-cache --names-only search ^libssl3$) ]]; then - package_list="${package_list} libssl3" - fi - - # Include appropriate version of libssl1.0.x if available - local libssl_package=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '') - if [ "$(echo "$libssl_package" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then - if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then - # Debian 9 - package_list="${package_list} libssl1.0.2" - elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then - # Ubuntu 18.04 - package_list="${package_list} libssl1.0.0" - fi - fi - - # Include git if not already installed (may be more recent than distro version) - if ! type git > /dev/null 2>&1; then - package_list="${package_list} git" - fi - - # Install the list of packages - echo "Packages to verify are installed: ${package_list}" - rm -rf /var/lib/apt/lists/* - apt-get update -y - apt-get -y install --no-install-recommends ${package_list} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 ) - - # Install zsh (and recommended packages) if needed - if [ "${INSTALL_ZSH}" = "true" ] && ! type zsh > /dev/null 2>&1; then - apt-get install -y zsh - fi - - # Ensure at least the en_US.UTF-8 UTF-8 locale is available = common need for both applications and things like the agnoster ZSH theme. - if [ "${LOCALE_ALREADY_SET}" != "true" ] && ! grep -o -E '^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen - LOCALE_ALREADY_SET="true" - fi - - # Clean up - apt-get -y clean - rm -rf /var/lib/apt/lists/* - PACKAGES_ALREADY_INSTALLED="true" -} -install_debian_packages - -# ********************************* -# ** Shell customization section ** -# ********************************* -group_name="${USERNAME}" -if [ "${USERNAME}" = "root" ]; then - user_rc_path="/root" -else - user_rc_path="/home/${USERNAME}" - if [ ! -d "${user_rc_path}" ]; then - mkdir -p "${user_rc_path}" - chown ${USERNAME}:${group_name} "${user_rc_path}" - fi -fi - -# Restore user .bashrc / .profile / .zshrc defaults from skeleton file if it doesn't exist or is empty -possible_rc_files=( ".bashrc" ".profile" ".zshrc" ) -for rc_file in "${possible_rc_files[@]}"; do - if [ -f "/etc/skel/${rc_file}" ]; then - if [ ! -e "${user_rc_path}/${rc_file}" ] || [ ! -s "${user_rc_path}/${rc_file}" ]; then - cp "/etc/skel/${rc_file}" "${user_rc_path}/${rc_file}" - chown ${USERNAME}:${group_name} "${user_rc_path}/${rc_file}" - fi - fi -done - -# Optionally configure zsh and Oh My Zsh! -if [ "${INSTALL_ZSH}" = "true" ]; then - - if [ "${CONFIGURE_ZSH_AS_DEFAULT_SHELL}" == "true" ]; then - chsh --shell /bin/zsh ${USERNAME} - fi - - # Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme. - # See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script. - oh_my_install_dir="${user_rc_path}/.oh-my-zsh" - if [ ! -d "${oh_my_install_dir}" ] && [ "${INSTALL_OH_MY_ZSH}" = "true" ]; then - template_path="${oh_my_install_dir}/templates/zshrc.zsh-template" - user_rc_file="${user_rc_path}/.zshrc" - umask g-w,o-w - mkdir -p ${oh_my_install_dir} - git clone --depth=1 \ - -c core.eol=lf \ - -c core.autocrlf=false \ - -c fsck.zeroPaddedFilemode=ignore \ - -c fetch.fsck.zeroPaddedFilemode=ignore \ - -c receive.fsck.zeroPaddedFilemode=ignore \ - "https://github.com/ohmyzsh/ohmyzsh" "${oh_my_install_dir}" 2>&1 - echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file} - sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="devcontainers"/g' ${user_rc_file} - - - # Shrink git while still enabling updates - cd "${oh_my_install_dir}" - git repack -a -d -f --depth=1 --window=1 - # Copy to non-root user if one is specified - if [ "${USERNAME}" != "root" ]; then - cp -rf "${user_rc_file}" "${oh_my_install_dir}" /root - chown -R ${USERNAME}:${group_name} "${oh_my_install_dir}" "${user_rc_file}" - fi - fi -fi - -echo "Done!" diff --git a/docker/developer/install-scripts/install-docker b/docker/developer/install-scripts/install-docker deleted file mode 100644 index f4ea500..0000000 --- a/docker/developer/install-scripts/install-docker +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -INSTALL_DOCKER=$1 -if [ "$INSTALL_DOCKER" != "true" ]; then - echo "Skipping docker install" - exit 0 -fi - - -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg -echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null -apt-get update -apt-get install -y --no-install-recommends docker-ce-cli diff --git a/docker/developer/install-scripts/install-rosdeps b/docker/developer/install-scripts/install-rosdeps deleted file mode 100644 index 6018c8f..0000000 --- a/docker/developer/install-scripts/install-rosdeps +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Get pip -sudo apt-get install -y python3-pip - -# Preload workspace dependencies -cd /tmp && - sudo apt-get update -y && - rosdep update --rosdistro=humble && - rosdep install --from-paths src --ignore-src -r -y && - pip install -r src/requirements.txt && - sudo rm -rf /tmp/src diff --git a/docker/developer/install-scripts/install-rtab b/docker/developer/install-scripts/install-rtab deleted file mode 100644 index ccefa5f..0000000 --- a/docker/developer/install-scripts/install-rtab +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -INSTALL_RTAB=$1 -if [ "$INSTALL_RTAB" != "true" ]; then - echo "Skipping rtab install" - exit 0 -fi - -mkdir -p ~/workspaces/rtab_ws/src - -export MAKEFLAGS="-j6" - -sudo apt-get update -y && rosdep update --rosdistro=humble - -source /opt/ros/humble/setup.bash -cd ~/workspaces/rtab_ws && \ - git clone --branch humble-devel https://github.com/introlab/rtabmap.git src/rtabmap && \ - git clone --branch humble-devel https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros && \ - rosdep install --from-paths src --ignore-src -r -y && \ - colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release diff --git a/docker/isaac-sim/Dockerfile b/docker/isaac-sim/Dockerfile deleted file mode 100644 index 051933e..0000000 --- a/docker/isaac-sim/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM nvcr.io/nvidia/isaac-sim:2022.2.1 - -# Set ROS2 Humble as the default ROS Bridge -RUN sed -i 's/# "omni.isaac.ros_bridge/"omni.isaac.ros2_bridge-humble/' /isaac-sim/apps/omni.isaac.sim.base.kit - -# Add allow root to warm up -RUN echo " --allow-root" >> /isaac-sim/omni.isaac.sim.warmup.sh \ No newline at end of file diff --git a/docker/isaac-sim/build b/docker/isaac-sim/build deleted file mode 100644 index 125c9ab..0000000 --- a/docker/isaac-sim/build +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -VERSION="2022.2.1" -IMAGE_NAME="isaac-sim:$VERSION" - -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME --cache-from $GITHUB_REGISTRY/$IMAGE_NAME . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it -e ACCEPT_EULA=y --entrypoint /bin/bash $GITHUB_REGISTRY/$IMAGE_NAME -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push $GITHUB_REGISTRY/$IMAGE_NAME -fi \ No newline at end of file diff --git a/docker/jetson-isaac-ros/Dockerfile b/docker/jetson-isaac-ros/Dockerfile deleted file mode 100644 index 072476a..0000000 --- a/docker/jetson-isaac-ros/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nvcr.io/nvidia/isaac/ros:aarch64-humble-nav2_6dfaf7adbe190f1181c3a0a2f2418760 \ No newline at end of file diff --git a/docker/jetson-isaac-ros/README.md b/docker/jetson-isaac-ros/README.md deleted file mode 100644 index f972d06..0000000 --- a/docker/jetson-isaac-ros/README.md +++ /dev/null @@ -1 +0,0 @@ -# Jetson Docker Image with Isaac ROS \ No newline at end of file diff --git a/docker/jetson-zed/Dockerfile b/docker/jetson-zed/Dockerfile deleted file mode 100644 index 10ad062..0000000 --- a/docker/jetson-zed/Dockerfile +++ /dev/null @@ -1,88 +0,0 @@ -ARG IMAGE_NAME=dustynv/ros:humble-ros-base-l4t-r35.1.0 - -FROM ${IMAGE_NAME} - -ARG ZED_SDK_MAJOR=3 -ARG ZED_SDK_MINOR=8 -ARG JETPACK_MAJOR=5 -ARG JETPACK_MINOR=0 -ARG L4T_MAJOR=35 -ARG L4T_MINOR=1 - -ARG ROS2_DIST=humble # ROS2 distribution - -# ZED ROS2 Wrapper dependencies version -ARG XACRO_VERSION=2.0.8 -ARG DIAGNOSTICS_VERSION=3.0.0 -ARG AMENT_LINT_VERSION=0.12.4 - -ENV DEBIAN_FRONTEND noninteractive - -# Enable required NVIDIA drivers -#ENV NVIDIA_DRIVER_CAPABILITIES \ -# ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}compute,video,utility - -# Disable apt-get warnings - -RUN apt-get update --allow-unauthenticated || true && apt-get install --allow-unauthenticated -y --no-install-recommends apt-utils dialog - -ENV TZ=Europe/Paris - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ - apt-get install --allow-unauthenticated --yes lsb-release wget less udev sudo build-essential cmake python3 python3-dev python3-pip python3-wheel git jq libpq-dev zstd usbutils && \ - rm -rf /var/lib/apt/lists/* - -# Install the ZED SDK -RUN echo "# R${L4T_MAJOR} (release), REVISION: ${L4T_MINOR}" > /etc/nv_tegra_release && \ - apt-get update -y --allow-unauthenticated || true && \ - apt-get install -y --allow-unauthenticated --no-install-recommends zstd wget less cmake curl gnupg2 \ - build-essential python3 python3-pip python3-dev python3-setuptools libusb-1.0-0-dev -y && \ - pip install protobuf && \ - wget -q --no-check-certificate -O ZED_SDK_Linux_JP.run \ - https://download.stereolabs.com/zedsdk/${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}/l4t${L4T_MAJOR}.${L4T_MINOR}/jetsons && \ - chmod +x ZED_SDK_Linux_JP.run ; ./ZED_SDK_Linux_JP.run silent skip_tools && \ - rm -rf /usr/local/zed/resources/* && \ - rm -rf ZED_SDK_Linux_JP.run && \ - rm -rf /var/lib/apt/lists/* - -# Install the ZED ROS2 Wrapper -ENV ROS_DISTRO ${ROS2_DIST} - -# Copy the sources in the Docker image -WORKDIR /root/ros2_ws/src -RUN git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git - -# Install missing dependencies -WORKDIR /root/ros2_ws/src -RUN wget https://github.com/ros/xacro/archive/refs/tags/${XACRO_VERSION}.tar.gz -O - | tar -xvz && mv xacro-${XACRO_VERSION} xacro && \ - wget https://github.com/ros/diagnostics/archive/refs/tags/${DIAGNOSTICS_VERSION}.tar.gz -O - | tar -xvz && mv diagnostics-${DIAGNOSTICS_VERSION} diagnostics && \ - wget https://github.com/ament/ament_lint/archive/refs/tags/${AMENT_LINT_VERSION}.tar.gz -O - | tar -xvz && mv ament_lint-${AMENT_LINT_VERSION} ament-lint - - -# Check that all the dependencies are satisfied -WORKDIR /root/ros2_ws -RUN apt-get update -y --allow-unauthenticated || true && rosdep update && \ - rosdep install --from-paths src --ignore-src -r -y && \ - rm -rf /var/lib/apt/lists/* - -# Build the dependencies and the ZED ROS2 Wrapper -RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/install/setup.bash && \ - colcon build --parallel-workers $(nproc) --symlink-install \ - --event-handlers console_direct+ --base-paths src \ - --cmake-args ' -DCMAKE_BUILD_TYPE=Release' \ - ' -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs' \ - ' -DCMAKE_CXX_FLAGS="-Wl,--allow-shlib-undefined"' \ - ' --no-warn-unused-cli' " - -WORKDIR /root/ros2_ws - -# Copy middleware profiles -RUN mkdir -p /usr/local/share/middleware_profiles -COPY config/*_profile.xml /usr/local/share/middleware_profiles/ - -# Setup environment variables -COPY ros_entrypoint_jetson.sh /sbin/ros_entrypoint.sh -RUN sudo chmod 755 /sbin/ros_entrypoint.sh - -ENTRYPOINT ["/sbin/ros_entrypoint.sh"] -CMD ["bash"] diff --git a/docker/jetson-zed/build b/docker/jetson-zed/build deleted file mode 100644 index 257e362..0000000 --- a/docker/jetson-zed/build +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -echo "ONLY USE THIS SCRIPT ON THE JETSON" - -VERSION=1 -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -IMAGE_NAME="jetson-zed" - -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it -e ACCEPT_EULA=y $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi \ No newline at end of file diff --git a/docker/jetson-zed/config/rtps_udp_profile.xml b/docker/jetson-zed/config/rtps_udp_profile.xml deleted file mode 100644 index 9a66187..0000000 --- a/docker/jetson-zed/config/rtps_udp_profile.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - -NVIDIA Isaac ROS Software License - - - - UdpTransport - UDPv4 - - - - - - - UdpTransport - - false - - - \ No newline at end of file diff --git a/docker/jetson-zed/ros_entrypoint_jetson.sh b/docker/jetson-zed/ros_entrypoint_jetson.sh deleted file mode 100644 index 30d1aae..0000000 --- a/docker/jetson-zed/ros_entrypoint_jetson.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e - -# setup ros2 environment -source "/opt/ros/$ROS_DISTRO/install/setup.bash" -- -source "/root/ros2_ws/install/local_setup.bash" -- - -# Welcome information -echo "ZED ROS2 Docker Image" -echo "---------------------" -echo 'ROS distro: ' $ROS_DISTRO -echo 'DDS middleware: ' $RMW_IMPLEMENTATION -echo "---" -echo 'Available ZED packages:' -ros2 pkg list | grep zed -echo "---------------------" -exec "$@" \ No newline at end of file diff --git a/docker/jetson/README.md b/docker/jetson/README.md deleted file mode 100644 index 8dce4da..0000000 --- a/docker/jetson/README.md +++ /dev/null @@ -1 +0,0 @@ -# Jetson Docker Image \ No newline at end of file diff --git a/docker/jetson/build b/docker/jetson/build deleted file mode 100644 index d8b6b77..0000000 --- a/docker/jetson/build +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -echo "ONLY USE THIS SCRIPT ON THE JETSON" -VERSION=3 # Increment manually for now -PREV_VERSION="$((VERSION-1))" -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -IMAGE_NAME="jetson" - -# Build Image -echo "Building image : jetson-base:$VERSION" -cd ../developer - -rm -rf ./src -cp -r ../../src . -# Copy rio requirements to be installed -touch ./src/requirements.txt - -# Build from the Dockerfile in the developer folder making an intermediate image -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION \ - --cache-from $GITHUB_REGISTRY/$IMAGE_NAME:$PREV_VERSION \ - --build-arg BASE_IMAGE=ros:humble-ros-base \ - --build-arg INSTALL_RTAB="false" \ - --build-arg INSTALL_DOCKER="false" . - -echo "Build finished" -cd ../jetson - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push $GITHUB_REGISTRY/$IMAGE_NAME:$VERSION -fi - -rm -rf ../developer/src \ No newline at end of file diff --git a/docker/jetson/entrypoint.sh b/docker/jetson/entrypoint.sh deleted file mode 100644 index 9500ab9..0000000 --- a/docker/jetson/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -source /opt/ros/${ROS_DISTRO}/setup.bash -source install/setup.bash -ros2 launch edna_bringup real.launch.py \ No newline at end of file diff --git a/docker/vision-devel/Dockerfile b/docker/vision-devel/Dockerfile deleted file mode 100644 index f84cac3..0000000 --- a/docker/vision-devel/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -FROM stereolabs/zed:4.0-devel-cuda11.8-ubuntu22.04 - -# Install dependencies -RUN apt-get update && apt-get install -y \ - sudo \ - wget \ - git \ - software-properties-common \ -&& rm -rf /var/lib/apt/lists/* \ -&& apt-get clean -# Install libcudnn8 -ENV OS=ubuntu2204 - -RUN wget https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin - -RUN mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 -RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/7fa2af80.pub -RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /" -RUN apt-get update -ENV cudnn_version=8.9.3.28 -ENV cuda_version=cuda11.8 - -RUN apt-get install libcudnn8=${cudnn_version}-1+${cuda_version} -RUN pip install pyyaml -WORKDIR /usr/local -RUN git clone --recursive https://github.com/pytorch/pytorch -WORKDIR /usr/local/pytorch -RUN git submodule sync && git submodule update --init --recursive -RUN python3 setup.py develop -WORKDIR /usr/local -RUN git clone https://github.com/pytorch/vision.git -WORKDIR /usr/local/vision -RUN python3 setup.py develop -WORKDIR /usr/local -RUN git clone https://github.com/ultralytics/ultralytics -WORKDIR /usr/local/ultralytics -RUN sed -i 's/torch>=1.7.0/# torch>=1.7.0/g' requirements.txt -RUN sed -i 's/torchvision>=0.8.1/# torchvision>=0.8.1/g' requirements.txt -RUN pip install -e . -WORKDIR /usr/local - diff --git a/docker/vision-devel/build b/docker/vision-devel/build deleted file mode 100644 index 5c93004..0000000 --- a/docker/vision-devel/build +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -GITHUB_REGISTRY="ghcr.io/roboeagles4828" -VERSION="2" -IMAGE_NAME="vision-devel:$VERSION" - -docker build -t $GITHUB_REGISTRY/$IMAGE_NAME --cache-from $GITHUB_REGISTRY/$IMAGE_NAME . - -echo "Build finished" - -echo "Would you like to run the image in interactive mode? (y/n)" -read INTERACTIVE - -if [ "$INTERACTIVE" = "y" ]; then - docker run --rm -it -e ACCEPT_EULA=y --entrypoint /bin/bash $GITHUB_REGISTRY/$IMAGE_NAME -fi - -echo "Would you like to push the image to the registry? (y/n)" -read PUSH - -if [ "$PUSH" = "y" ]; then - docker push $GITHUB_REGISTRY/$IMAGE_NAME -fi \ No newline at end of file diff --git a/isaac.bat b/isaac.bat deleted file mode 100644 index 6b1ae3a..0000000 --- a/isaac.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -call C:\opt\ros\foxy\x64\setup.bat -call C:\Users\%USERNAME%\AppData\Local\ov\pkg\isaac_sim-2022.2.1\isaac-sim.bat -``` \ No newline at end of file diff --git a/isaac_setup.ps1 b/isaac_setup.ps1 deleted file mode 100644 index d1cf683..0000000 --- a/isaac_setup.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -$ProgressPreference = 'SilentlyContinue' -if (-not (Test-Path "$env:LOCALAPPDATA\ov")) { - "Omniverse not installed. Installing..." - Invoke-WebRequest 'https://install.launcher.omniverse.nvidia.com/installers/omniverse-launcher-win.exe' -OutFile isaac_sim_windows.exe - ./isaac_sim_windows.exe - "Omniverse installed!" -} -while (-not (Test-Path "$env:LOCALAPPDATA\ov\pkg\isaac_sim-2022.2.1")) { - "Isaac sim not installed. Please install it" - Write-Host "Press Enter when installed" - $null = Read-Host - -} -"Install ROS2..." -Invoke-WebRequest 'https://www.dropbox.com/scl/fi/chckfua0ontxc9t2hnvrk/ROS2_foxy.zip?rlkey=1zk4u7kjgzfxw85n24pavj9r7&dl=1' -OutFile ROS2_foxy.zip -Expand-Archive -LiteralPath .\ROS2_foxy.zip -DestinationPath .\C:\ -"ROS 2 installed!" -"Setup Isaac sim..." -(Get-Content -Path "$env:LOCALAPPDATA\ov\pkg\isaac_sim-2022.2.1/apps/omni.isaac.sim.base.kit") | ForEach-Object {$_ -replace 'isaac.startup.ros_bridge_extension = ""', 'isaac.startup.ros_bridge_extension = "omni.isaac.ros2_bridge"'} | Set-Content -Path "$env:LOCALAPPDATA\ov\pkg\isaac_sim-2022.2.1/apps/omni.isaac.sim.base.kit" -"Setup Done!" -"To run isaac sim, run isaac.bat outside of dev container" \ No newline at end of file diff --git a/.vs/DevEnv/FileContentIndex/read.lock b/jazzy_ws/src/README.MD similarity index 100% rename from .vs/DevEnv/FileContentIndex/read.lock rename to jazzy_ws/src/README.MD diff --git a/scripts/config/SN39192289.conf b/scripts/config/SN39192289.conf deleted file mode 100644 index 4a3e37f..0000000 --- a/scripts/config/SN39192289.conf +++ /dev/null @@ -1,129 +0,0 @@ -[LEFT_CAM_2K] -fx=1066.47 -fy=1066.69 -cx=1096.4 -cy=608.35 -k1=-0.0481392 -k2=0.0204418 -p1=-0.000164085 -p2=-0.000320881 -k3=-0.00848405 - -[RIGHT_CAM_2K] -fx=1067.68 -fy=1067.68 -cx=1119.35 -cy=638.421 -k1=-0.0488906 -k2=0.0210952 -p1=-0.000111085 -p2=-2.85138e-05 -k3=-0.00867969 - -[LEFT_CAM_FHD] -fx=1066.47 -fy=1066.69 -cx=952.4 -cy=527.35 -k1=-0.0481392 -k2=0.0204418 -p1=-0.000164085 -p2=-0.000320881 -k3=-0.00848405 - -[RIGHT_CAM_FHD] -fx=1067.68 -fy=1067.68 -cx=975.35 -cy=557.421 -k1=-0.0488906 -k2=0.0210952 -p1=-0.000111085 -p2=-2.85138e-05 -k3=-0.00867969 - -[LEFT_CAM_HD] -fx=533.235 -fy=533.345 -cx=634.7 -cy=352.175 -k1=-0.0481392 -k2=0.0204418 -p1=-0.000164085 -p2=-0.000320881 -k3=-0.00848405 - -[RIGHT_CAM_HD] -fx=533.84 -fy=533.84 -cx=646.175 -cy=367.2105 -k1=-0.0488906 -k2=0.0210952 -p1=-0.000111085 -p2=-2.85138e-05 -k3=-0.00867969 - -[LEFT_CAM_VGA] -fx=266.6175 -fy=266.6725 -cx=332.85 -cy=183.5875 -k1=-0.0481392 -k2=0.0204418 -p1=-0.000164085 -p2=-0.000320881 -k3=-0.00848405 - -[RIGHT_CAM_VGA] -fx=266.92 -fy=266.92 -cx=338.5875 -cy=191.10525 -k1=-0.0488906 -k2=0.0210952 -p1=-0.000111085 -p2=-2.85138e-05 -k3=-0.00867969 - -[LEFT_DISTO] -k1=-1.09881 -k2=2.26482 -k3=0.121642 -k4=-1.00398 -k5=2.11774 -k6=0.27731 -p1=-0.000104778 -p2=-0.00019719 - -[RIGHT_DISTO] -k1=-1.23005 -k2=2.54131 -k3=0.146487 -k4=-1.13444 -k5=2.38549 -k6=0.319041 -p1=-1.45179e-05 -p2=-0.000258106 - -[STEREO] -Baseline=119.769 -TY=-0.234338 -TZ=0.0178837 -CV_2K=0.00274884 -CV_FHD=0.00274884 -CV_HD=0.00274884 -CV_VGA=0.00274884 -RX_2K=0.00227577 -RX_FHD=0.00227577 -RX_HD=0.00227577 -RX_VGA=0.00227577 -RZ_2K=0.00172762 -RZ_FHD=0.00172762 -RZ_HD=0.00172762 -RZ_VGA=0.00172762 - -[MISC] -Sensor_ID=0 - - diff --git a/scripts/config/remote-config b/scripts/config/remote-config deleted file mode 100644 index 6b43d94..0000000 --- a/scripts/config/remote-config +++ /dev/null @@ -1,6 +0,0 @@ -USERNAME="roboeagles" -IP_ADDRESS="10.48.28.22" -PORT="5800" -REMOTE_PATH="/home/$USERNAME/edna2023" - -MACHINE_NAME=${5:-""} \ No newline at end of file diff --git a/scripts/config/remote-config-orin b/scripts/config/remote-config-orin deleted file mode 100644 index 6ce7b47..0000000 --- a/scripts/config/remote-config-orin +++ /dev/null @@ -1,6 +0,0 @@ -USERNAME="sorineagle" -IP_ADDRESS="192.168.1.171" -PORT="22" -REMOTE_PATH="/home/$USERNAME/edna2023" - -MACHINE_NAME=${5:-""} \ No newline at end of file diff --git a/scripts/dds-ping b/scripts/dds-ping deleted file mode 100644 index e12fdde..0000000 --- a/scripts/dds-ping +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/bash - -# Topic Publish -ros2 topic pub /ping std_msgs/msg/Header "{'stamp': 'now', frame_id: 'PING' }" \ No newline at end of file diff --git a/scripts/launch b/scripts/launch deleted file mode 100644 index d399d84..0000000 --- a/scripts/launch +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -default="isaac" -input=$1 -bringup=${input:-$default} - -echo "Quick Launching... ${bringup}" -ros2 launch edna_bringup $bringup.launch.py \ No newline at end of file diff --git a/scripts/local-setup.sh b/scripts/local-setup.sh deleted file mode 100644 index f353d3b..0000000 --- a/scripts/local-setup.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -ORANGE='\033[0;33m' -RED='\033[0;31m' -GREEN='\033[0;32m' -NC='\033[0m' -SCRIPT_PATH=$(dirname "$0") -devenv_path="$SCRIPT_PATH/../.devcontainer/.env" - -# Graphics Driver Check -hasDriver=$(nvidia-smi | grep "Version: 525") -if [[ -z "$hasDriver" ]]; then - echo -e "${RED}Please install nvidia driver 525 before this install script${NC}" - exit 1 -fi - -echo -e "${ORANGE}INSTALLING APT PACKAGES${NC}" -sudo apt-get update -sudo apt-get install \ - apt-transport-https \ - ca-certificates \ - curl \ - gnupg-agent \ - software-properties-common \ - git-lfs -y - -# Stop ubuntu pop ups that applications are not responding -gsettings set org.gnome.mutter check-alive-timeout 60000 - -# Setup a unique domain -# Avoids conflicts with others on the same network -if [ -z "$(cat $devenv_path | grep ROS_NAMESPACE)" ]; then - echo -e "${ORANGE}SETTING ROS_NAMESPACE${NC}" - read -p "Enter a name for your ROS_NAMESPACE: " ros_namespace - echo "ROS_NAMESPACE=${ros_namespace}" >> $devenv_path -else - echo -e "${GREEN}ROS_NAMESPACE ALREADY SET${NC}" -fi - -# Docker -if [[ -z "$(which docker)" ]]; then - echo -e "${ORANGE}INSTALLING DOCKER${NC}" - curl https://get.docker.com | sh \ - && sudo systemctl --now enable docker - sudo usermod -aG docker $USER -else - echo -e "${GREEN}DOCKER ALREADY INSTALLED${NC}" -fi - - -# Nividia Docker -if ! dpkg -s nvidia-docker2 > /dev/null; then - echo -e "${ORANGE}INSTALLING NVIDIA DOCKER${NC}" - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ - && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - sudo apt-get update - sudo apt-get install -y nvidia-docker2 - sudo systemctl restart docker -else - echo -e "${GREEN}NVIDIA DOCKER ALREADY INSTALLED${NC}" -fi - -# Deployment Keys -if [ ! -f ~/.ssh/robot_deploy ]; then - echo -e "${ORANGE}SETTING UP DEPLOY KEYS${NC}" - ssh-keygen -b 2048 -t rsa -f ~/.ssh/robot_deploy -q -N "" -else - echo -e "${GREEN}DEPLOY KEYS ALREADY SET${NC}" -fi \ No newline at end of file diff --git a/scripts/quickpub.py b/scripts/quickpub.py deleted file mode 100644 index a9ccdc9..0000000 --- a/scripts/quickpub.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/python3 -import time -import rclpy -from rclpy.node import Node -from sensor_msgs.msg import JointState -from threading import Thread - -JOINT_NAMES = [ - # Pneumatics - 'arm_roller_bar_joint', - 'top_slider_joint', - 'top_gripper_left_arm_joint', - 'bottom_gripper_left_arm_joint', - # Wheels - 'elevator_center_joint', - 'bottom_intake_joint', -] - -class ROSNode(Node): - def __init__(self): - super().__init__('quickpublisher') - self.publish_positions = [0.0]*6 - self.publisher = self.create_publisher(JointState, "/real/real_arm_commands", 10) - self.publishTimer = self.create_timer(0.5, self.publish) - - def publish(self): - msg = JointState() - msg.name = JOINT_NAMES - msg.position = self.publish_positions - self.publisher.publish(msg) - - -def main(): - rclpy.init() - node = ROSNode() - Thread(target=rclpy.spin, args=(node,)).start() - while True: - try: - joint_index = int(input("Joint index: ")) - position = float(input("Position: ")) - node.publish_positions[joint_index] = position - except: - print("Invalid input") - continue - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/scripts/real-startup/README.md b/scripts/real-startup/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/real-startup/jetson/startup.sh b/scripts/real-startup/jetson/startup.sh deleted file mode 100644 index 58b655f..0000000 --- a/scripts/real-startup/jetson/startup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd /home/sorineagle/edna2023/ -docker compose up \ No newline at end of file diff --git a/scripts/real-startup/jetson/stop.sh b/scripts/real-startup/jetson/stop.sh deleted file mode 100644 index 5d99f1c..0000000 --- a/scripts/real-startup/jetson/stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd /home/sorineagle/edna2023/ -docker compose down \ No newline at end of file diff --git a/scripts/real-startup/pi/edna.service b/scripts/real-startup/pi/edna.service deleted file mode 100644 index 1f70761..0000000 --- a/scripts/real-startup/pi/edna.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=edna launch real on startup -Wants=network-online.target -After=network.target network-online.target - -[Service] -Type=simple -User=ubuntu -RemainAfterExit=yes -ExecStart=/usr/bin/bash /home/ubuntu/edna2023/scripts/real-startup/pi/startup.sh -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/real-startup/pi/post-recieve b/scripts/real-startup/pi/post-recieve deleted file mode 100644 index 7d1916b..0000000 --- a/scripts/real-startup/pi/post-recieve +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -cd /home/ubuntu/edna2023 -source /opt/ros/humble/setup.bash -colcon build --symlink-install --paths src/* -sudo systemctl restart edna.service \ No newline at end of file diff --git a/scripts/real-startup/pi/startup.sh b/scripts/real-startup/pi/startup.sh deleted file mode 100644 index ba712ce..0000000 --- a/scripts/real-startup/pi/startup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -cd /home/ubuntu/edna2023/ -source /opt/ros/humble/setup.bash -source ./install/setup.bash -export ROS_NAMESPACE=real -export ROS_DOMAIN_ID=0 -ros2 launch edna_bringup real.launch.py \ No newline at end of file diff --git a/scripts/remote b/scripts/remote deleted file mode 100644 index e22f507..0000000 --- a/scripts/remote +++ /dev/null @@ -1,242 +0,0 @@ -#!/bin/bash - -ORANGE='\033[0;33m' -GREEN='\033[0;32m' -RED='\033[0;31m' -PURPLE='\033[0;35m' -NC='\033[0m' - -# Check /scripts/config/remote-config for script configuration -source /workspaces/edna2023/scripts/config/remote-config - -smart-deploy() { - echo "Deploying to $USERNAME@$IP_ADDRESS:$REMOTE_PATH (port $PORT) via rsync..." - - echo "Generating rsync metadata..." - rsync -azPin --checksum -e "ssh -p $PORT" \ - --exclude .git/ \ - --exclude .vscode/ \ - --exclude .devcontainer/ \ - --exclude build/ \ - --exclude install/ \ - --exclude log/ \ - --exclude rio/ \ - --exclude isaac/ \ - --exclude *.rviz \ - --exclude __pycache__ \ - --exclude joy \ - --exclude edna_debugger \ - --exclude edna_tests \ - --exclude .rsyncmetadata \ - /workspaces/edna2023/ $USERNAME@$IP_ADDRESS:$REMOTE_PATH \ - | egrep -v "sending incremental file list" | egrep -v "^\." | awk '{print $2}' | tr ' ' '\n' >> /workspaces/edna2023/.rsyncmetadata - - echo "Files that will be changed:" - printf '%s\n' $( /dev/null -ros2 daemon start \ No newline at end of file diff --git a/scripts/tests b/scripts/tests deleted file mode 100644 index 33ff582..0000000 --- a/scripts/tests +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -default="arm-tests" -input=$1 -test=${input:-$default} - -echo "Quick Running Test ${test}..." -ros2 run edna_tests $test \ No newline at end of file diff --git a/scripts/yolo b/scripts/yolo deleted file mode 100644 index e69de29..0000000