-
Notifications
You must be signed in to change notification settings - Fork 63
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
1 parent
9c3307c
commit 8c0dd94
Showing
17 changed files
with
372 additions
and
207 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
This file was deleted.
Oops, something went wrong.
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
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,34 @@ | ||
#!/bin/bash | ||
|
||
# Check if env HUSARION_ROS_BUILD_TYPE is set | ||
if [ -z "$HUSARION_ROS_BUILD_TYPE" ]; then | ||
echo "HUSARION_ROS_BUILD_TYPE is not set. Please set it to 'hardware' or 'simulation'" | ||
exit 1 | ||
fi | ||
|
||
# Define a function to run commands with or without sudo | ||
run_with_sudo() { | ||
if [ "$(id -u)" -ne 0 ]; then | ||
sudo "$@" | ||
else | ||
"$@" | ||
fi | ||
} | ||
|
||
# Install tools | ||
run_with_sudo apt-get update | ||
run_with_sudo apt-get install -y python3-pip ros-dev-tools stm32flash | ||
|
||
# Import repositories | ||
vcs import src < src/rosbot_ros/rosbot/rosbot_$HUSARION_ROS_BUILD_TYPE.repos | ||
if [ "$HUSARION_ROS_BUILD_TYPE" == "simulation" ]; then | ||
cp -r src/ros2_controllers/imu_sensor_broadcaster src | ||
rm -rf src/ros2_controllers | ||
fi | ||
|
||
# Install dependencies | ||
if ! [ -d /etc/ros/rosdep ]; then | ||
run_with_sudo rosdep init | ||
fi | ||
rosdep update --rosdistro $ROS_DISTRO | ||
rosdep install --from-paths src -y -i |
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
Oops, something went wrong.