Browse Source

Merge branch 'main' into development

Signed-off-by: Steve Pham <[email protected]>
Steve Pham 2 years ago
parent
commit
e62e0e6f13
8 changed files with 365 additions and 3 deletions
  1. 128 0
      CODE_OF_CONDUCT.md
  2. 20 0
      CONTRIBUTING.md
  3. 4 0
      LICENSE-CC-BY-4.0.txt
  4. 5 0
      LICENSE-CC-BY-NC-4.0.txt
  5. 19 0
      LICENSE.txt
  6. 3 3
      README.md
  7. 143 0
      docker/Dockerfile
  8. 43 0
      docker/README.md

+ 128 - 0
CODE_OF_CONDUCT.md

@@ -0,0 +1,128 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+  and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+  overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+  advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+  address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+  professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
[email protected].
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior,  harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.

+ 20 - 0
CONTRIBUTING.md

@@ -0,0 +1,20 @@
+# Contributing
+
+
+### Code of conduct
+
+Please refer to and respect the [O3DE Code of Conduct](https://www.o3de.org/docs/contributing/code-of-conduct/).
+
+### Authorship and Developer Certificate of Origin (DCO)
+
+When creating a pull request to this repository, make sure that:
+- Authorship of the code is properly attributed. You need to agree with the [Developer Certificate of Origin](https://developercertificate.org/) to contribute. Some important points:
+  - Make sure your username and user email are [set up](https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git).
+  - If you commit parts of code which are not yours, make sure you are allowed to do so (in terms of license) and respect all the requirements of the license, such as Attribution.
+  - If you are not the author of the commit, indicate authorship with `--author` flag of `git commit` command.
+  - Try to divide your work into commits done by a single author. If you decide to use a single commit for a multi-author work, use the [Co-authored-by syntax](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) in the commit message.
+- Your commits are signed, indicating complience with the DCO: use `git commit -s` to ensure that.
+
+### Additional information
+
+We recommend you to read [O3DE contribution guide](https://github.com/o3de/community/blob/main/CONTRIBUTING.md) and [ROS contribution guide](https://docs.ros.org/en/humble/Contributing.html) as well.

+ 4 - 0
LICENSE-CC-BY-4.0.txt

@@ -0,0 +1,4 @@
+Copyright 2022 Amazon.com, Inc. or its affiliates, all rights reserved.
+
+Documentation content excluding code, and including images, is licensed under a Creative Commons Attribution 4.0 International License, available at https://creativecommons.org/licenses/by/4.0/.
+

+ 5 - 0
LICENSE-CC-BY-NC-4.0.txt

@@ -0,0 +1,5 @@
+ROSCon Demo Assets
+Copyright 2022 Amazon.com, Inc. or its affiliates, all rights reserved.
+
+3D models, image textures, and other asset files are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available at http://creativecommons.org/licenses/by-nc/4.0/.
+

+ 19 - 0
LICENSE.txt

@@ -1,3 +1,22 @@
+## LICENSE
+
+PROJECT DATA: "ROSConDemo/Project"
+URL: https://github.com/aws-lumberyard/ROSConDemo/tree/main/Project/Assets
+The project data and code samples, including inline code, and related data
+are dual-licensed under Apache 2.0 and the MIT licenses.
+(see LICENSE-APACHE2.txt and LICENSE_MIT.TXT)
+
+ASSET DATA: "ROSConDemo/tree/main/Project/Assets"
+URL: https://github.com/aws-lumberyard/ROSConDemo/tree/main/Project/Assets
+The ROSConDemo Project and it's contents including 3D models, image textures,
+and other game asset files are licensed under the Creative Commons license
+Attribution-NonCommercial 4.0 International (see LICENSE-CC-BY-NC-4.0.txt)
+
+DOCUMENTATION
+Any additional documentation content excluding code, and including images,
+is licensed under the Creative Commons license Attribution 4.0 International
+(See LICENSE-CC-BY-4.0.txt)
+
 OPEN 3D ENGINE LICENSING
 The default license for Open 3D Engine is the Apache License, Version 2.0 
 (see LICENSE_APACHE2.TXT); you may elect at your option to use the Open 3D 

+ 3 - 3
README.md

@@ -55,12 +55,12 @@ The project supports the following platforms:
    sure that the system/hardware requirements are met.
 2. Please follow the instructions
    to [set up O3DE from GitHub](https://o3de.org/docs/welcome-guide/setup/setup-from-github/).
-3. **Use the `roscon_2022` branch**: `git checkout roscon_2022`.
+3. **Use the `development` branch**: `git checkout development`.
 
 The following commands should prepare O3DE:
 
 ```
-~$ git clone https://github.com/aws-lumberyard-dev/o3de.git
+~$ git clone https://github.com/o3de/o3de.git
 ~$ cd o3de
 ~/o3de$ git lfs install
 ~/o3de$ git lfs pull
@@ -119,7 +119,7 @@ export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
 1. Clone this project:
 
 ```
-git clone https://github.com/aws-lumberyard/ROSConDemo.git
+git clone https://github.com/o3de/ROSConDemo.git
 ```
 
 2. Register this project in O3DE engine. In O3DE directory:

+ 143 - 0
docker/Dockerfile

@@ -0,0 +1,143 @@
+FROM ros:humble-ros-core-jammy
+
+ENV WORKDIR=/data/workspace
+WORKDIR $WORKDIR
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+# Setup time zone and locale data (necessary for SSL and HTTPS packages)
+RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get -y \
+    install \
+    tzdata \
+    locales \
+    keyboard-configuration \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
+    && dpkg-reconfigure --frontend=noninteractive locales \
+    && update-locale LANG=en_US.UTF-8
+
+ENV LANG=en_US.UTF-8
+
+# Install common tools
+# deps in https://github.com/o3de/o3de/blob/development/scripts/build/build_node/Platform/Linux/package-list.ubuntu-jammy.txt
+RUN apt-get update && apt-get install -y \
+    bc \
+    bind9-utils \
+    binutils \
+    ca-certificates \
+    clang \
+    cmake \
+    file \
+    firewalld \
+    git \
+    git-lfs \
+    jq \
+    kbd \
+    kmod \
+    less \
+    lsb-release \
+    libglu1-mesa-dev \
+    libxcb-xinerama0 \
+    libfontconfig1-dev \
+    libcurl4-openssl-dev \
+    libnvidia-gl-470 \
+    libssl-dev \
+    libxcb-xkb-dev \
+    libxkbcommon-x11-dev \
+    libxkbcommon-dev \
+    libxcb-xfixes0-dev \
+    libxcb-xinput-dev \
+    libxcb-xinput0 \
+    libpcre2-16-0 \
+    lsof \
+    net-tools \
+    ninja-build \
+    pciutils \
+    python3-pip \
+    software-properties-common \
+    sudo \
+    tar \
+    unzip \
+    vim \
+    wget \
+    xz-utils \
+    && rm -rf /var/lib/apt/lists/*
+
+# Gem + ROSConDemo ROS pacakges
+RUN apt-get update && apt-get install -y \
+    ros-humble-ackermann-msgs \
+    ros-humble-control-toolbox \
+    ros-humble-gazebo-msgs \
+    ros-humble-navigation2 \
+    ros-humble-rviz2 \
+    ros-humble-tf2-ros \
+    ros-humble-urdfdom \
+    ros-humble-vision-msgs \
+    && rm -rf /var/lib/apt/lists/*
+
+## Symlink clang version to non-versioned clang and set cc to clang
+RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 \
+    && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
+
+# Assumes a local checkout of private ROSConDemo
+RUN git clone https://github.com/o3de/ROSConDemo.git \
+    && cd ROSConDemo \
+    && git lfs install \
+    && git lfs pull
+
+# Install o3de
+RUN git clone https://github.com/o3de/o3de.git -b development \
+    && cd o3de \
+    && git lfs install \
+    && git lfs pull \
+    && python/get_python.sh
+
+RUN git clone https://github.com/RobotecAI/o3de-ros2-gem.git
+
+RUN ./o3de/scripts/o3de.sh register --this-engine \
+    && ./o3de/scripts/o3de.sh register --gem-path ./o3de-ros2-gem \
+    && ./o3de/scripts/o3de.sh register -pp ./ROSConDemo/Project \
+    && ./o3de/scripts/o3de.sh enable-gem -gn ROS2 -pp ./ROSConDemo/Project \
+    && cat /root/.o3de/o3de_manifest.json
+
+WORKDIR $WORKDIR/ROSConDemo/Project
+
+RUN git lfs pull \
+    && . /opt/ros/humble/setup.sh \
+    && cmake -B build/linux -S . -G "Ninja Multi-Config" -DLY_STRIP_DEBUG_SYMBOLS=ON
+
+RUN . /opt/ros/humble/setup.sh \
+    && cmake --build build/linux --config profile --target ROSConDemo Editor AssetProcessor
+
+# This final step takes long since they Assets will be downloading
+RUN . /opt/ros/humble/setup.sh \
+    && echo "This final step can take more than 1 hour. Good time for going for a coffee :)" \
+    && cmake --build build/linux --config profile --target ROSConDemo.Assets
+
+# Installing o3de_kraken_nav
+RUN apt-get update && apt-get install -y \
+    python3-colcon-common-extensions \
+    ros-humble-cyclonedds \
+    ros-humble-rmw-cyclonedds-cpp \
+    ros-humble-slam-toolbox \
+    ros-humble-navigation2 \
+    ros-humble-nav2-bringup \
+    ros-humble-pointcloud-to-laserscan \
+    ros-humble-teleop-twist-keyboard \
+    ros-humble-ackermann-msgs \
+    ros-humble-topic-tools \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN pip install python-statemachine
+
+WORKDIR $WORKDIR
+
+RUN mkdir -p o3de_kraken_ws/src \
+    && cd o3de_kraken_ws/src \
+    && git clone https://github.com/RobotecAI/o3de_kraken_nav.git
+
+RUN cd o3de_kraken_ws \
+    && colcon build --symlink-install
+
+ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

+ 43 - 0
docker/README.md

@@ -0,0 +1,43 @@
+# Dockerfile for running the ROSConDemo
+
+The Dockerfile is going to create an Ubuntu Jammy + ROS Humble platform
+that prepares the O3DE simulator together with the o3de-ros2-gem to run
+the demo in this repository.
+
+## Requisites
+
+ * [Hardware requirements of o3de](https://www.o3de.org/docs/welcome-guide/requirements/)
+ * At least 40GB of free disk space
+ * The build process can take more than 2 hours
+
+## Building the Docker Image
+
+To build the Dockerfile the only required step is to clone first the ROSConDemo:
+```
+git clone [email protected]:aws-lumberyard/ROSConDemo.git
+docker build -t roscon_demo -f ROSConDemo/docker/Dockerfile .
+```
+
+Note: the build process is going to download all the necessary assets for running
+the demo so it can take several hours depending on the Internet connection.
+
+## Running the Docker Image
+
+GPU acceleration is required for running O3DE correctly. For running docker
+with support for GPU please follow the documentation for
+[docker run](https://docs.docker.com/engine/reference/commandline/run/).
+
+Another option is to install and use [rocker](https://github.com/osrf/rocker).
+
+```
+rocker --x11 --nvidia roscon_demo
+```
+
+The `Dockerfile` leaves ready the compilation of all the O3DE artifacts to be able
+to execute the Editor.
+```
+/data/workspace/ROSConDemo/Project/build/linux/bin/profile/Editor
+```
+
+Continue with the instruction in the
+[main README file](https://github.com/aws-lumberyard/ROSConDemo/blob/main/README.md).