Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mechazo11 committed Aug 23, 2024
0 parents commit c65743c
Show file tree
Hide file tree
Showing 107 changed files with 3,909 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Language: Cpp

AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: None
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
BeforeLambdaBody: true
AfterStruct: true
BeforeElse: true
SplitEmptyFunction: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: 140
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseBlocks: true
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
SortIncludes: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: c++17
UseTab: Never
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.FBX filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Bb]uild/
[Cc]ache/
[Uu]ser/
[Uu]ser_test*/
_savebackup/
**/__pycache__
CMakeUserPresets.json
/.vscode/
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

if(NOT PROJECT_NAME)
cmake_minimum_required(VERSION 3.22)
include(cmake/EngineFinder.cmake OPTIONAL)
find_package(o3de REQUIRED)
project(RobotSim
LANGUAGES C CXX
VERSION 1.0.0.0
)
o3de_initialize()
endif()
6 changes: 6 additions & 0 deletions Config/default_aws_resource_mappings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AWSResourceMappings": {},
"AccountId": "EMPTY",
"Region": "us-east-1",
"Version": "1.0.0"
}
11 changes: 11 additions & 0 deletions Config/shader_global_build_options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Type": "JsonSerialization",
"Version": 1,
"ClassName": "GlobalBuildOptions",
"ClassData": {
"ShaderCompilerArguments" : {
"DefaultMatrixOrder" : "Row",
"AzslcAdditionalFreeArguments" : "--strip-unused-srgs"
}
}
}
38 changes: 38 additions & 0 deletions Examples/slam_navigation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ROS 2 Project example

With this example you will learn how to run ROS 2 navigation with a project created with this template.

These instructions assume that you have created and built your project following the [Template README](https://github.com/o3de/o3de-extras/tree/development/Templates/Ros2ProjectTemplate/README.md).

[ROS 2 navigation stack](https://navigation.ros.org/) is a set of packages which can deliver robot navigation almost out of the box following configuration for your specific robot.
In other cases, it can serve as a great basis to build your custom robot navigation.

## How to run the example

### Install navigation packages

To run the navigation example with your project, you need to install ROS 2 navigation stack packages.

```shell
sudo apt install ros-${ROS_DISTRO}-slam-toolbox ros-${ROS_DISTRO}-navigation2 ros-${ROS_DISTRO}-nav2-bringup ros-${ROS_DISTRO}-pointcloud-to-laserscan
```

### Start the simulation

1. Run your project in O3DE editor and open the only level.
1. Start the simulation by clicking the `Play Game` button or pressing `CTRL+G`

### Launch the navigation stack

Open a bash console terminal (always make sure your [ROS 2 is sourced](https://development--o3deorg.netlify.app/docs/user-guide/interactivity/robotics/project-configuration/#ros-2-ecosystem)!) and run:

```shell
cd #{O3DE_EXTRAS_HOME}/Templates/Ros2ProjectTemplate/Template/Examples/slam_navigation/launch
ros2 launch navigation.launch.py
```
You should see RViz2, a ROS 2 visualisation tool.

### Set the goal

In RViz2, set robot target goal by using the `2D Goal Pose` tool (upper toolbar).
The robot in your simulation should be on its way to the goal! You will also notice it is building a map.
Loading

0 comments on commit c65743c

Please sign in to comment.