Browse Source

Removed reference to non-existing file in template (#802)

Signed-off-by: Michał Pełka <[email protected]>
Michał Pełka 8 months ago
parent
commit
f18a22fce5

+ 0 - 114
Templates/Ros2ProjectTemplate/Docker/Dockerfile

@@ -1,114 +0,0 @@
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-ARG ROS_VERSION=jazzy
-
-FROM ros:${ROS_VERSION}-ros-base
-
-# Argument to determining the image type ('simulation' or 'navstack')
-ARG IMAGE_TYPE=simulation  # Default to 'simulation'
-
-# Arguments for the source repos needed for the Ros2Template sample docker
-ARG O3DE_REPO=https://github.com/o3de/o3de.git
-ARG O3DE_BRANCH=main
-
-ARG O3DE_EXTRAS_REPO=https://github.com/o3de/o3de-extras.git
-ARG O3DE_EXTRAS_BRANCH=main
-
-# Additional argument to control build concurrency
-ARG CMAKE_JOBS=8
-
-ENV WORKSPACE=/data/workspace
-
-ENV PROJECT_PATH=/data/workspace/Ros2Project
-
-WORKDIR $WORKSPACE
-
-RUN apt-get update && apt-get upgrade -y
-
-# Install packages needed for cloning and building from the source repos
-RUN apt-get install -y --no-install-recommends \
-    git \
-    git-lfs \
-    clang \
-    ninja-build \
-    cmake \
-    libglu1-mesa-dev \
-    libxcb-xinerama0 \
-    libxcb-xinput0 \
-    libxcb-xinput-dev \
-    libxcb-xfixes0-dev \
-    libxcb-xkb-dev \
-    libxkbcommon-dev \
-    libxkbcommon-x11-dev \
-    libfontconfig1-dev \
-    libcurl4-openssl-dev \
-    libsdl2-dev \
-    zlib1g-dev \
-    mesa-common-dev \
-    libssl-dev libxcb-icccm4 \
-    libxcb-image0 \
-    libxcb-keysyms1 \
-    libxcb-render-util0 \
-    libxcb-randr0 \
-    libnvidia-gl-470 \
-    ufw \
-    ros-${ROS_DISTRO}-slam-toolbox \
-    ros-${ROS_DISTRO}-navigation2 \
-    ros-${ROS_DISTRO}-nav2-bringup \
-    ros-${ROS_DISTRO}-pointcloud-to-laserscan \
-    ros-${ROS_DISTRO}-gazebo-msgs \
-    ros-${ROS_DISTRO}-ackermann-msgs \
-    ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
-    ros-${ROS_DISTRO}-control-toolbox \
-    ros-${ROS_DISTRO}-nav-msgs \
-    ros-${ROS_DISTRO}-desktop
-
-
-# Copy script used to remove build artifacts
-COPY cleanup.bash /data/workspace/cleanup.bash
-
-# Clone and register O3DE repos 
-RUN if [ "${IMAGE_TYPE}" = "simulation" ]; then \
-        cd $WORKSPACE && \
-        git clone --recursive $O3DE_REPO && \
-        git -C $WORKSPACE/o3de checkout $O3DE_BRANCH &&\
-        git -C $WORKSPACE/o3de lfs install && \
-        git -C $WORKSPACE/o3de lfs pull && \
-        $WORKSPACE/o3de/python/get_python.sh && \
-        $WORKSPACE/o3de/scripts/o3de.sh register -ep $WORKSPACE/o3de && \
-        git clone $O3DE_EXTRAS_REPO && \
-        git -C $WORKSPACE/o3de-extras checkout $O3DE_EXTRAS_BRANCH && \
-        $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-extras/Gems/ROS2 && \
-        $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-extras/Gems/RosRobotSample && \
-        $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-extras/Gems/WarehouseAssets && \
-        $WORKSPACE/o3de/scripts/o3de.sh register -gp $WORKSPACE/o3de-extras/Gems/WarehouseSample; \
-    elif [  "${IMAGE_TYPE}" = "navstack" ]; then \
-        cd $WORKSPACE && \
-        git clone $O3DE_EXTRAS_REPO && \
-        git -C $WORKSPACE/o3de-extras checkout $O3DE_EXTRAS_BRANCH; \
-    else \
-        echo "Unsupported IMAGE_TYPE: ${IMAGE_TYPE}" && exit 1; \
-    fi
-
-# Build and cleanup in the same layer to reduce the size
-RUN if [ "${IMAGE_TYPE}" = "simulation" ]; then \
-        . /opt/ros/${ROS_DISTRO}/setup.sh && \
-        $WORKSPACE/o3de/scripts/o3de.sh create-project --project-path $PROJECT_PATH --template-path $WORKSPACE/o3de-extras/Templates/Ros2ProjectTemplate && \
-        cmake -B $PROJECT_PATH/build/linux -S $PROJECT_PATH -G "Ninja Multi-Config" -DLY_STRIP_DEBUG_SYMBOLS=TRUE -DLY_DISABLE_TEST_MODULES=ON && \
-        cmake --build $PROJECT_PATH/build/linux --config profile --target Ros2Project Editor Ros2Project.Assets Ros2Project.GameLauncher -j $CMAKE_JOBS && \
-        $WORKSPACE/cleanup.bash ; \
-    fi
-
-COPY LaunchSimulation.bash /data/workspace/LaunchSimulation.bash
-COPY LaunchNavStack.bash /data/workspace/LaunchNavStack.bash
-
-ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp 
-ENV LAUNCH_FULLSCREEN_OPT=0
-ENV NVIDIA_VISIBLE_DEVICES all
-ENV NVIDIA_DRIVER_CAPABILITIES all
-
-ENTRYPOINT ["/bin/bash"]

+ 0 - 15
Templates/Ros2ProjectTemplate/Docker/LaunchNavStack.bash

@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-unset LD_LIBRARY_PATH
-
-source /opt/ros/$ROS_DISTRO/setup.bash
-
-cd /data/workspace/o3de-extras/Templates/Ros2ProjectTemplate/Template/Examples/slam_navigation/launch
-
-ros2 launch navigation.launch.py

+ 0 - 22
Templates/Ros2ProjectTemplate/Docker/LaunchSimulation.bash

@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-unset LD_LIBRARY_PATH
-
-source /opt/ros/$ROS_DISTRO/setup.bash
-
-export LD_LIBRARY_PATH=/data/workspace/Ros2Project/build/linux/bin/profile:$LD_LIBRARY_PATH
-
-if [ -d /data/workspace/Ros2Project/build/linux/bin/profile ]
-then
-    cd /data/workspace/Ros2Project/build/linux/bin/profile
-    ./Ros2Project.GameLauncher -r_fullscreen=$LAUNCH_FULLSCREEN_OPT -bg_ConnectToAssetProcessor=0 > /data/workspace/simulation_launch.log 2>&1
-else
-    echo "Simulation not installed on this image"
-fi
-

+ 0 - 119
Templates/Ros2ProjectTemplate/Docker/README.md

@@ -1,119 +0,0 @@
-# Docker scripts for running the O3DE Ros2Project based on O3DE Ros2ProjectTemplate
-
-The following Dockerfiles defined in this path will prepare the appropriate ROS2 package (Ubuntu 20.04/Focal + Galactic or Ubuntu 22.04/Jammy + Iron) based environment and build the components necessary to run the O3DE demo project simulator through the O3DE engine using the Ros2Project template.
-
-## Prerequisites
-
-* [Hardware requirements of o3de](https://www.o3de.org/docs/welcome-guide/requirements/)
-* Ubuntu 20.04 (Focal) or 22.04 (Jammy)
-* At least 60 GB of free disk space
-* Docker 24.0 installed and configured
-  * **Note** It is recommended to have Docker installed correctly and in a secure manner so that the docker commands in this guide do not require elevated privileges (sudo) to run them. See [Docker Engine post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) for more details.
-* [NVidia container toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker)
-
-## Building the Docker Image
-
-By default, the docker script provided in this template will build a docker image to run the Ros2Project sample using Ubuntu 22.04 (jammy) with the ROS2 Iron distribution. All obsolete source code, git artifacts, and build artifacts will be removed by the 'cleanup.bash' script when completed. 
-
-Run the following command to build the docker image with a default configuration:
-
-```
-docker build -t o3de_ros2project:latest -f Dockerfile .
-```
-
-**Note** 
-The above command example tags specific commits for O3DE, and the ROS2 gem repos based on known working commits. See the Advanced Options section below for more information.
-
-This will create a docker image named 'o3de_ros2project' with the tag 'latest' that contains both the simulation launcher and the navigation stack. 
-
-It will also contain helper scripts that will launch either the simulation (LaunchSimulation.bash) or the RViz2 (LaunchNavStack.bash).
-
-You can also create a separate docker image that only contains the navigation stack and RViz2 by supplying the argument `IMAGE_TYPE` and setting it to 'navstack':
-
-```
-docker build --build-arg IMAGE_TYPE=navstack -t o3de_ros2project_nav:latest .
-```
-
-ROS2 allows for communication across multiple docker images running on the same host, provided that they specify the 'bridge' network type when launching.
-
-## Running the Docker Image
-
-Launching O3DE applications in a Docker container requires GPU acceleration support. (Make sure that the [nvidia-docker 2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker) is installed.)
-
-### Direct Access to the X Server
-The simulation docker image should be launched before bringing up the robot application. To run the robot application, first, allow the container root user to access the running X server for display
-
-```
-xhost +local:root
-```
-
-Then launch the built simulation docker image with the following command
-
-```
-docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_ros2project:latest /data/workspace/LaunchSimulation.bash
-```
-
-Once the simulation is up and running, launch the navigation stack inside the simulation docker image, which will bring up RViz to control the robot.
-
-```
-docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_ros2project:latest /data/workspace/LaunchNavStack.bash
-
-```
-
-If you created a separate docker image 'o3de_ros2project_nav:latest', which only contains the navigation stack and RViz2, you can launch it using that image, provided that the simulation docker image 'o3de_ros2project' is running.
-
-```
-docker run --rm --network="bridge" --gpus all -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -it o3de_ros2project_nav:latest /data/workspace/LaunchNavStack.bash
-```
-Make sure to revoke access to the X server when the simulation ends.
-
-```
-xhost -local:root
-```
-
-### Running using Rocker
-
-Alternatively, you can use [Rocker](https://github.com/osrf/rocker) to run a GPU-accelerated docker image. 
-
-Launch the built simulation docker image with the following rocker command
-
-```
-rocker --x11 --nvidia o3de_ros2project:latest /data/workspace/LaunchSimulation.bash
-```
-
-Once the simulation is up and running, launch the robot application docker image, which will bring up RViz to control the robot.
-
-```
-rocker --x11 --nvidia o3de_ros2project:latest /data/workspace/LaunchNavStack.bash
-```
-
-## Advanced Options
-
-### Target ROS2 Distribution
-The Docker script defaults to building an image based on Ubuntu 22.04 (jammy) and the ROS2 Iron distribution. This can be overridden with a combination if the `ROS_VERSION` and `UBUNTU_VERSION` arguments.
-
-| ROS2 Distro   | Repository                                |
-|---------------|-------------------------------------------|
-| galactic      | ROS_VERSION=galactic UBUNTU_VERSION=focal |
-| humble        | ROS_VERSION=humble   UBUNTU_VERSION=jammy |
-| iron          | ROS_VERSION=iron     UBUNTU_VERSION=jammy |
-
-### Custom source repos and branches
-
-The Dockerscripts use the following arguments to determine the repository to pull the source: 
-
-| Argument              | Repository                 | Default                                      |
-|-----------------------|----------------------------|----------------------------------------------|
-| O3DE_REPO             | O3DE                       | https://github.com/o3de/o3de.git             |
-| O3DE_EXTRAS_REPO      | O3DE Extras                | https://github.com/o3de/o3de-extras.git      |
-
-In addition to repositories, the following arguments target the branch, commit, or tag to pull from their corresponding repository:
-
-| Argument                | Repository                       | Default     |
-|-------------------------|----------------------------------|-------------|
-| O3DE_BRANCH             | O3DE                             | 2305.0      |
-| O3DE_EXTRAS_BRANCH      | O3DE Extras                      | 2305.0      |
-
-### Optimizing the build process ###
-The docker script provides a cmake-specific argument override to control the number of parallel jobs that can be used during the build of the docker image. `CMAKE_JOBS` sets the maximum number of concurrent jobs cmake will run during its build process and defaults to 8 jobs. This number can be adjusted to better suit the hardware which is running the docker image build.
-

+ 0 - 43
Templates/Ros2ProjectTemplate/Docker/cleanup.bash

@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-# Delete obsolete files after the build of the code and assets are complete
-
-DELETE_LIST=(~/.o3de/3rdParty/ \
-             o3de/.git \
-             o3de/AutomatedTesting \
-             o3de/python/downloaded_packages \
-             o3de/Code \
-             o3de/Gems \
-             Ros2Project/build/linux/Azcg/ \
-             Ros2Project/build/linux/CMake \
-             Ros2Project/build/linux/CMakeFiles/ \
-             Ros2Project/build/linux/External/ \
-             Ros2Project/build/linux/Testing/ \
-             Ros2Project/build/linux/_deps/ \
-             Ros2Project/build/linux/cmake \
-             Ros2Project/build/linux/lib/ \
-             Ros2Project/build/linux/o3de/ \
-             Ros2Project/build/linux/packages/ \
-             Ros2Project/build/linux/runtime_dependencies/ 
-             Ros2Project/build/linux/bin/profile/EditorPlugins \
-             Ros2Project/build/linux/bin/profile/Editor \
-             Ros2Project/build/linux/bin/profile/AssetProcessor \
-             Ros2Project/build/linux/bin/profile/AssetProcessorBatch \
-             Ros2Project/build/linux/bin/profile/MaterialEditor \
-             Ros2Project/build/linux/bin/profile/AssetBuilder \
-             Ros2Project/build/linux/bin/profile/MaterialCanvas )
-
-for i in ${DELETE_LIST[@]}
-do
-   echo "Deleting /data/workspace/$i"
-   rm -rf $i
-done
-
-exit 0
-

+ 0 - 4
Templates/Ros2ProjectTemplate/template.json

@@ -402,10 +402,6 @@
             "file": "ShaderLib/viewsrg.srgi",
             "isTemplated": true
         },
-        {
-            "file": "autoexec.cfg",
-            "isTemplated": false
-        },
         {
             "file": "game.cfg",
             "isTemplated": false