Skip to content

Commit 84fc0c1

Browse files
author
Tyler Fedrizzi
committed
Update build script, remove old popd due to string issues and update for 24.04 main support
1 parent 2831bd2 commit 84fc0c1

11 files changed

Lines changed: 198 additions & 181 deletions

File tree

AUTHORS.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
This page has moved [here](https://github.com/microsoft/AirSim/blob/main/docs/CHANGELOG.md).
3+
This page has moved [here](https://codexlabsllc.github.io/Colosseum/CHANGELOG/).

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Below are the list of officially supported Operating Systems, with full Unreal E
2626

2727
### Linux
2828
- ~~Ubuntu 18.04~~ (NO LONGER SUPPORTED. 18.04 is EOL so we will not be checking this anymore and GitHub doesn't support CI builds)
29-
- Ubuntu 20.04
29+
- Ubuntu 20.04 (use branch `ubuntu-22.04`)
30+
- Ubuntu 22.04
31+
- Ubuntu 24.04
3032

3133
**NOTE** Ubuntu 22.04 is not currently supported due to Vulkan support. If this changes, we will notify you here. If you want to use Colosseum on 22.04, we highly recommend that you use Docker.
3234

@@ -44,6 +46,9 @@ Below are the list of officially supported Operating Systems, with full Unreal E
4446
Colosseum is a simulator for robotic, autonomous systems, built on [Unreal Engine](https://www.unrealengine.com/) (we now also have an experimental [Unity](https://unity3d.com/) release). It is open-source, cross platform, and supports software-in-the-loop simulation with popular flight controllers such as PX4 & ArduPilot and hardware-in-loop with PX4 for physically and visually realistic simulations. It is developed as an Unreal plugin that can simply be dropped into any Unreal environment. Similarly, we have an experimental release for a Unity plugin.
4547

4648
This is a fork of the AirSim repository, which Microsoft decided to shutdown in July of 2022. This fork serves as a waypoint to building a new and better simulation platform. The creater and maintainer of this fork is Codex Laboratories LLC (our website is [here](https://www.codex-labs-llc.com)). Colosseum is one of the underlying simulation systems that we use in our product, the [SWARM Simulation Platform](https://www.swarmsim.io). This platform exists to provide pre-built tools and low-code/no-code autonomy solutions. Please feel free to check this platform out and reach out if interested.
49+
50+
## Docs
51+
Please find the docs [here](https://codexlabsllc.github.io/Colosseum/)
4752

4853
## Join the Community
4954
We have decided to create a Discord channel to better allow for community engagement. Join here: [Colosseum Robotics Discord](https://discord.gg/y9ZJKKKn8J).

SECURITY.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

SUPPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Support
22

3-
This page has moved [here](https://github.com/microsoft/AirSim/blob/main/docs/SUPPORT.md).
3+
This page has moved [here](https://codexlabsllc.github.io/Colosseum/SUPPORT/).

build.sh

100755100644
Lines changed: 30 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,18 @@
1-
#!/usr/bin/env bash
1+
#! /bin/bash
22

3-
# get path of current script: https://stackoverflow.com/a/39340259/207661
4-
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5-
pushd "$SCRIPT_DIR" >/dev/null
6-
7-
set -e
8-
set -x
9-
10-
debug=false
11-
gcc=false
12-
# Parse command line arguments
13-
while [[ $# -gt 0 ]]
14-
do
15-
key="$1"
16-
17-
case $key in
18-
--debug)
19-
debug=true
20-
shift # past argument
21-
;;
22-
--gcc)
23-
gcc=true
24-
shift # past argument
25-
;;
26-
esac
27-
28-
done
29-
30-
function version_less_than_equal_to() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$1"; }
31-
32-
# check for rpclib
333
RPC_VERSION_FOLDER="rpclib-2.3.0"
34-
if [ ! -d "./external/rpclib/$RPC_VERSION_FOLDER" ]; then
35-
echo "ERROR: new version of AirSim requires newer rpclib."
36-
echo "please run setup.sh first and then run build.sh again."
37-
exit 1
38-
fi
39-
40-
# check for local cmake build created by setup.sh
41-
if [ -d "./cmake_build" ]; then
42-
if [ "$(uname)" == "Darwin" ]; then
43-
CMAKE="$(greadlink -f cmake_build/bin/cmake)"
44-
else
45-
CMAKE="$(readlink -f cmake_build/bin/cmake)"
46-
fi
47-
else
48-
CMAKE=$(which cmake)
49-
fi
50-
51-
# variable for build output
52-
if $debug; then
53-
build_dir=build_debug
54-
else
55-
build_dir=build_release
56-
fi
57-
if [ "$(uname)" == "Darwin" ]; then
58-
# llvm v8 is too old for Big Sur see
59-
# https://github.com/microsoft/AirSim/issues/3691
60-
#export CC=/usr/local/opt/llvm@8/bin/clang
61-
#export CXX=/usr/local/opt/llvm@8/bin/clang++
62-
#now pick up whatever setup.sh installs
63-
export CC="$(brew --prefix)/opt/llvm/bin/clang"
64-
export CXX="$(brew --prefix)/opt/llvm/bin/clang++"
65-
else
66-
if $gcc; then
67-
export CC="gcc-12"
68-
export CXX="g++-12"
69-
else
70-
export CC="clang-12"
71-
export CXX="clang++-12"
72-
fi
73-
fi
4+
folder_name="Release"
5+
build_dir=build
746

75-
#install EIGEN library
76-
if [[ ! -d "./AirLib/deps/eigen3/Eigen" ]]; then
77-
echo "### Eigen is not installed. Please run setup.sh first."
78-
exit 1
79-
fi
807

81-
echo "putting build in $build_dir folder, to clean, just delete the directory..."
8+
mkdir -p build
9+
cd build
8210

83-
# this ensures the cmake files will be built in our $build_dir instead.
84-
if [[ -f "./cmake/CMakeCache.txt" ]]; then
85-
rm "./cmake/CMakeCache.txt"
86-
fi
87-
if [[ -d "./cmake/CMakeFiles" ]]; then
88-
rm -rf "./cmake/CMakeFiles"
89-
fi
11+
CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++ -I/usr/lib/llvm-17/include/c++/v1~'
9012

13+
make -j$(nproc)
9114

92-
93-
if [[ ! -d $build_dir ]]; then
94-
mkdir -p $build_dir
95-
fi
96-
97-
pushd $build_dir >/dev/null
98-
if $debug; then
99-
folder_name="Debug"
100-
"$CMAKE" ../cmake -DCMAKE_BUILD_TYPE=Debug $CMAKE_VARS \
101-
|| (popd && rm -r $build_dir && exit 1)
102-
else
103-
folder_name="Release"
104-
"$CMAKE" ../cmake -DCMAKE_BUILD_TYPE=Release $CMAKE_VARS \
105-
|| (popd && rm -r $build_dir && exit 1)
106-
fi
107-
popd >/dev/null
108-
109-
110-
pushd $build_dir >/dev/null
111-
# final linking of the binaries can fail due to a missing libc++abi library
112-
# (happens on Fedora, see https://bugzilla.redhat.com/show_bug.cgi?id=1332306).
113-
# So we only build the libraries here for now
114-
make -j"$(nproc)"
115-
popd >/dev/null
15+
cd ..
11616

11717
mkdir -p AirLib/lib/x64/$folder_name
11818
mkdir -p AirLib/deps/rpclib/lib
@@ -122,31 +22,38 @@ cp $build_dir/output/lib/libMavLinkCom.a AirLib/deps/MavLinkCom/lib
12222
cp $build_dir/output/lib/librpc.a AirLib/deps/rpclib/lib/librpc.a
12323

12424
# Update AirLib/lib, AirLib/deps, Plugins folders with new binaries
125-
rsync -a --delete $build_dir/output/lib/ AirLib/lib/x64/$folder_name
25+
rsync -a --delete build/output/lib/ AirLib/lib/x64/$folder_name
12626
rsync -a --delete external/rpclib/$RPC_VERSION_FOLDER/include AirLib/deps/rpclib
12727
rsync -a --delete MavLinkCom/include AirLib/deps/MavLinkCom
12828
rsync -a --delete AirLib Unreal/Plugins/AirSim/Source
12929
rm -rf Unreal/Plugins/AirSim/Source/AirLib/src
13030

131-
# Update all environment projects
132-
# for d in Unreal/Environments/* ; do
133-
# [ -L "${d%/}" ] && continue
134-
# $d/clean.sh
135-
# mkdir -p $d/Plugins
136-
# rsync -a --delete Unreal/Plugins/AirSim $d/Plugins
137-
# done
31+
# Update all environment projects
32+
for d in ~/Documents/Unreal\ Projects/*; do
33+
# Skip if not a directory
34+
[ -d "$d" ] || continue
35+
# Skip if symbolic link
36+
[ -L "${d%/}" ] && continue
37+
38+
# Execute clean.sh if it exists and is executable
39+
if [ -x "$d/clean.sh" ]; then
40+
"$d/clean.sh"
41+
fi
42+
43+
# Ensure Plugins directory exists
44+
mkdir -p "$d/Plugins"
13845

139-
set +x
46+
# Sync AirSim plugin into Plugins directory
47+
rsync -a --delete Unreal/Plugins/AirSim/ "$d/Plugins/AirSim/"
48+
done
14049

14150
echo ""
14251
echo ""
14352
echo "=================================================================="
144-
echo " AirSim plugin is built! Here's how to build Unreal project."
53+
echo " Colosseum plugin is built! Here's how to build Unreal project."
14554
echo "=================================================================="
14655
echo "All environments under Unreal/Environments have been updated."
14756
echo ""
148-
echo "For further info see:"
149-
echo "https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md"
150-
echo "=================================================================="
151-
152-
popd >/dev/null
57+
echo "For further info see the docs:"
58+
echo "https://codexlabsllc.github.io/Colosseum/build_linux/"
59+
echo "=================================================================="

0 commit comments

Comments
 (0)