|
3 gadi atpakaļ | |
---|---|---|
.github | 2 gadi atpakaļ | |
Assets | 2 gadi atpakaļ | |
Config | 2 gadi atpakaļ | |
Gem | 2 gadi atpakaļ | |
Levels | 2 gadi atpakaļ | |
LightingPresets | 2 gadi atpakaļ | |
Platform | 2 gadi atpakaļ | |
ReflectionProbes | 2 gadi atpakaļ | |
Registry | 2 gadi atpakaļ | |
Resources | 2 gadi atpakaļ | |
ShaderLib | 2 gadi atpakaļ | |
Shaders | 2 gadi atpakaļ | |
cmake | 2 gadi atpakaļ | |
launch | 2 gadi atpakaļ | |
.gitattributes | 2 gadi atpakaļ | |
.gitignore | 2 gadi atpakaļ | |
.lfsconfig | 2 gadi atpakaļ | |
CMakeLists.txt | 2 gadi atpakaļ | |
CODE_OF_CONDUCT.md | 2 gadi atpakaļ | |
CONTRIBUTING.md | 2 gadi atpakaļ | |
LICENSE | 2 gadi atpakaļ | |
LICENSE.txt | 2 gadi atpakaļ | |
LICENSE_APACHE2.TXT | 2 gadi atpakaļ | |
LICENSE_MIT.TXT | 2 gadi atpakaļ | |
README.md | 2 gadi atpakaļ | |
SurfaceTypeMaterialLibrary.physmaterial | 2 gadi atpakaļ | |
autoexec.cfg | 2 gadi atpakaļ | |
build.sh | 2 gadi atpakaļ | |
dev_notes.md | 2 gadi atpakaļ | |
game.cfg | 2 gadi atpakaļ | |
preview.png | 2 gadi atpakaļ | |
project.json | 2 gadi atpakaļ | |
surface_tags.surfaceTagNameList | 2 gadi atpakaļ | |
user.cfg | 2 gadi atpakaļ |
This project demonstrates how ROS2 Gem for O3DE can be used with a scene (The Loft project) and ROS 2 navigation stack.
This project will only run on Ubuntu 20.04 since the ROS 2 Gem is not yet developed for Windows.
Refer to the O3DE System Requirements documentation to make sure that the system/hardware requirements are met
This project has the following dependencies:
develop
branch and newest releases, but the project was tested with commit #381a6e0f
.develop
branch (the default) should work. The project was tested with version tag 0.3
.scene_fixes
branchThe following steps will assume the following
source /opt/ros/galactic/setup.bash
.profile
echo $ROS_DISTRO
. You should see galactic
.$ cd $DEMO_BASE
~$ git clone https://github.com/o3de/o3de.git
~$ cd o3de
~/o3de$ git lfs install
~/o3de$ git lfs pull
~/o3de$ scripts/o3de.sh register --this-engine
$ cd $DEMO_BASE
~$ git clone https://github.com/RobotecAI/o3de-ros2-gem.git
~$ $DEMO_BASE/o3de/scripts/o3de.sh register --gem-path $DEMO_BASE/o3de-ros2-gem
$ cd $DEMO_BASE
~$ git clone https://github.com/aws-lumberyard/loft-arch-vis-sample.git
~$ cd loft-arch-vis-sample
~/loft-arch-vis-sample$ git checkout scene_fixes
~/loft-arch-vis-sample$ git lfs install
~/loft-arch-vis-sample$ git lfs pull
~$ $DEMO_BASE/o3de/scripts/o3de.sh register --gem-path $DEMO_BASE/loft-arch-vis-sample/Gems/ArchVis
$ cd $DEMO_BASE
~/$ o3de/scripts/o3de.sh register -pp $DEMO_BASE/o3de-demo-project
~/$ cd o3de-demo-project
~/o3de-demo-project$ cmake -B build/linux -G "Ninja Multi-Config" -DLY_UNITY_BUILD=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLY_PARALLEL_LINK_JOBS=16 -DLY_STRIP_DEBUG_SYMBOLS=OFF
~/o3de-demo-project$ cmake --build build/linux --config profile --target ROS2-Gem-Demo Editor AssetProcessor
$ cd $DEMO_BASE
~/$ cd o3de-demo-project/build/linux/bin/profile
~/o3de-demo-project/build/linux/bin/profile$ ./Editor
We can run ROS2 navigation stack with our simulation scene and robot. When we run the navigation stack, it will start SLAM and build the map of environment based on Lidar sensor data. You can set navigation goals for the robot using RViz2 (which is also started with the launch file).
These packages are required to run ROS 2 navigation stack for our robot:
sudo apt install ros-galactic-slam-toolbox
sudo apt install ros-galactic-navigation2
sudo apt install ros-galactic-nav2-bringup
sudo apt install ros-galactic-pointcloud-to-laserscan
O3DE
Editor, select the Loft
Level.Play Game
button or press CTRL+G
The launch file is included in this repository
~/o3de-demo-project/launch$ ros2 launch navigation.launch.py
You should see output in the console as well as RViz2 window.
Use RViz GUI to set the goal by using the 2D Goal Pose
tool (upper toolbar).
You can drag it to indicate direction you would like your robot to face when reaching the goal.
Watch your robot go. You can set subsequent goals.
Sometimes when there were problems while the AssetProcessor was working (for example, disk space ran out), subsequent executions of the Editor fail to re-start the process for such Assets. This might be due to a limitation of the number of files that can be watched by a single user. You can fix this by increasing the value, for example:
sudo sysctl -w fs.inotify.max_user_watches=524288
To make this setting permanent, add it to /etc/systctl.conf
file.
This could be caused by a firewall, disabled multicast or issues with docker.
Please refer to ROS 2 troubleshooting guide.
If your machine is a bit less powerful, you can try a lightweight, simple Warehouse scene instead of the Loft scene.