-
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.
update Dockerfile, install.sh and github workflow
- Loading branch information
1 parent
0d5262c
commit 0916ca9
Showing
9 changed files
with
55 additions
and
61 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 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 |
---|---|---|
|
@@ -51,9 +51,7 @@ cd catkin_ws/src | |
git clone --recursive [email protected]:RaccoonlabDev/uavcan_communicator.git | ||
cd uavcan_communicator | ||
git submodule update --init --recursive | ||
./scripts/install_requirements.sh | ||
./scripts/install_libuavcan.sh | ||
./scripts/compile_dsdl.sh | ||
./scripts/install.sh | ||
``` | ||
|
||
## 3. Running | ||
|
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,38 +1,20 @@ | ||
# This software is distributed under the terms of the GPL v3 License. | ||
# Copyright (c) 2022-2023 Dmitry Ponomarev. | ||
# Author: Dmitry Ponomarev <[email protected]> | ||
ARG ROS_DISTRO=noetic | ||
|
||
FROM ros:$ROS_DISTRO | ||
LABEL description="DroneCAN communicator" | ||
LABEL maintainer="[email protected]" | ||
SHELL ["/bin/bash", "-c"] | ||
WORKDIR /catkin_ws/src/dronecan_communicator | ||
|
||
# 1. Install basic requirements | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y git ros-$ROS_DISTRO-catkin python3-pip python3-catkin-tools | ||
RUN if [[ "$ROS_DISTRO" = "melodic" ]] ; then apt-get install -y python-pip python-catkin-tools ; fi | ||
|
||
# 2. Install package requirements | ||
COPY scripts/install_libuavcan.sh scripts/install_libuavcan.sh | ||
COPY scripts/install_requirements.sh scripts/install_requirements.sh | ||
COPY scripts/requirements.txt scripts/requirements.txt | ||
COPY libs/ libs/ | ||
RUN scripts/install_requirements.sh | ||
RUN scripts/install_libuavcan.sh | ||
|
||
# 3. Copy main package files | ||
COPY CMakeLists.txt CMakeLists.txt | ||
COPY package.xml package.xml | ||
COPY src/ src/ | ||
|
||
# 4. For custom DroneCAN msgs | ||
# COPY custom_msgs/ custom_msgs/ | ||
# RUN ./scripts/compile_dsdl.sh | ||
|
||
# 5. Build | ||
RUN source /opt/ros/$ROS_DISTRO/setup.bash && cd /catkin_ws && catkin build | ||
# 1. Install requirements | ||
COPY scripts/install.sh scripts/install.sh | ||
RUN ./scripts/install.sh | ||
|
||
# 6. Copy auxilliary package files | ||
COPY config/ config/ | ||
COPY launch/ launch/ | ||
# 2. Build ROS | ||
COPY . /catkin_ws/src/dronecan_communicator | ||
RUN /catkin_ws/src/dronecan_communicator/scripts/catkin_build.sh | ||
|
||
CMD source /opt/ros/$ROS_DISTRO/setup.bash && \ | ||
source /catkin_ws/devel/setup.bash && \ | ||
|
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,9 @@ | ||
#!/bin/bash | ||
# This software is distributed under the terms of the GPL v3 License. | ||
# Copyright (c) 2022-2023 Dmitry Ponomarev. | ||
# Author: Dmitry Ponomarev <[email protected]> | ||
|
||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
cd /catkin_ws | ||
git config --global http.sslverify false | ||
catkin build |
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 @@ | ||
#!/bin/bash | ||
CRNT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
REPO_DIR="$(dirname "$CRNT_DIR")" | ||
|
||
set -e | ||
|
||
apt-get update | ||
apt-get install -y git \ | ||
can-utils \ | ||
ros-$ROS_DISTRO-catkin \ | ||
ros-$ROS_DISTRO-mavros-msgs \ | ||
python3-pip \ | ||
python3-catkin-tools |
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,11 +1,14 @@ | ||
#!/bin/bash | ||
# Instruction from https://github.com/UAVCAN/libuavcan/tree/legacy-v0#using-in-a-gnulinux-application | ||
CRNT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
REPO_DIR="$(dirname "$CRNT_DIR")" | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")" | ||
cd ../libs/libuavcan | ||
# Install libuavcan | ||
# Instruction from https://github.com/UAVCAN/libuavcan/tree/legacy-v0#using-in-a-gnulinux-application | ||
cd ${REPO_DIR}/libs/libuavcan | ||
mkdir -p build | ||
cd build | ||
rm -r * # handle case if build directory is not empty bacause it may lead to fail | ||
cmake .. | ||
make | ||
sudo make install |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.