-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial integration behaviortreecpp (#13008)
This is an initial integration for BehaviorTree.CPP ([website](https://www.behaviortree.dev/), [repo](https://github.com/BehaviorTree/BehaviorTree.CPP)) a popular library that allows to e.g., structure the switching between different tasks in an autonomous agent, such as a robot or a virtual entity in a computer game. This PR can be reviewed but needs to wait until the BehaviorTree/BehaviorTree.CPP#925 PR is merged and the harnesses land upstream. Also, @facontidavide or @miccol either of you as a core-maintainer need to agree on this onboarding of the project here, so if you do, please just ACK this. --------- Co-authored-by: cktii <mytupre@gmail.com>
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2025 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
################################################################################ | ||
|
||
FROM gcr.io/oss-fuzz-base/base-builder | ||
RUN apt-get update && apt-get install -y make autoconf automake libtool cmake pkg-config wget libsodium-dev | ||
RUN git clone --depth 1 https://github.com/BehaviorTree/BehaviorTree.CPP.git behaviortreecpp | ||
WORKDIR behaviortreecpp | ||
COPY build.sh $SRC/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash -eu | ||
# Copyright 2025 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
################################################################################ | ||
|
||
# ===== BUILD Sqlite ===== | ||
SQLITE_VER=sqlite-autoconf-3480000 | ||
|
||
wget https://www.sqlite.org/2025/${SQLITE_VER}.tar.gz | ||
tar xzf ${SQLITE_VER}.tar.gz | ||
cd ${SQLITE_VER} | ||
./configure --enable-static --disable-shared | ||
make -j"$(nproc)" | ||
make install | ||
cd .. | ||
|
||
# ===== BUILD zeroMQ ===== | ||
git clone https://github.com/zeromq/libzmq.git | ||
cd libzmq | ||
mkdir build && cd build | ||
cmake .. -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DZMQ_BUILD_TESTS=OFF | ||
make -j"$(nproc)" | ||
make install | ||
cd ../.. | ||
|
||
# ===== Build BehaviorTree.CPP ===== | ||
mkdir build && cd build | ||
|
||
CMAKE_FLAGS=( | ||
"-DCMAKE_BUILD_TYPE=Release" | ||
"-DENABLE_FUZZING=ON" | ||
"-DFORCE_STATIC_LINKING=ON" | ||
) | ||
|
||
cmake .. "${CMAKE_FLAGS[@]}" | ||
make -j"$(nproc)" | ||
|
||
for fuzzer in bt_fuzzer script_fuzzer bb_fuzzer; do | ||
cp $fuzzer "$OUT/" | ||
|
||
if [ -d ../fuzzing/corpus/${fuzzer} ]; then | ||
zip -j "$OUT/${fuzzer}_seed_corpus.zip" ../fuzzing/corpus/${fuzzer}/* | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
homepage: "https://www.behaviortree.dev/" | ||
language: c++ | ||
primary_contact: "christopher.krah@tii.ae" | ||
main_repo: "https://github.com/BehaviorTree/BehaviorTree.CPP" | ||
file_github_issue: true | ||
vendor_ccs: | ||
- "dfaconti@aurynrobotics.com" | ||
fuzzing_engines: | ||
- libfuzzer | ||
- afl | ||
sanitizers: | ||
- address | ||
- undefined |