-
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.
add workflow, dockerfile, build and install scripts (#1)
- Loading branch information
1 parent
160fc87
commit 83ade09
Showing
5 changed files
with
75 additions
and
1 deletion.
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,28 @@ | ||
name: catkin_build | ||
|
||
on: [push] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
catkin_build: | ||
runs-on: ubuntu-18.04 | ||
container: | ||
image: ros:melodic | ||
steps: | ||
- name: Install basic ROS requirements | ||
run: | | ||
apt-get update && \ | ||
apt-get install -y python-catkin-tools python-pip python3-pip && \ | ||
apt-get install -y python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential python-catkin-tools | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: catkin_ws/src/geographiclib_conversions | ||
|
||
- name: Install geographiclib_conversions requirements | ||
run: ./catkin_ws/src/geographiclib_conversions/scripts/install.sh | ||
|
||
- name: catkin build | ||
run: source /opt/ros/melodic/setup.bash && cd catkin_ws && 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,28 @@ | ||
ARG ROS_DISTRO=melodic | ||
|
||
FROM ros:$ROS_DISTRO | ||
LABEL description="geographiclib_conversions" | ||
SHELL ["/bin/bash", "-c"] | ||
WORKDIR /catkin_ws/src/geographiclib_conversions | ||
|
||
|
||
# 1. Install basic requirements | ||
RUN apt-get update && \ | ||
apt-get install -y 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. Copy repository | ||
COPY ./ ./ | ||
|
||
# 3. Setup packages | ||
RUN ./scripts/install.sh | ||
|
||
# 4. Build ROS | ||
RUN source /opt/ros/$ROS_DISTRO/setup.bash && cd ../../ && catkin build | ||
|
||
CMD echo "main process has been started" && \ | ||
source /opt/ros/$ROS_DISTRO/setup.bash && \ | ||
source /catkin_ws/devel/setup.bash && \ | ||
echo "container has been finished" |
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,3 +1,9 @@ | ||
# Wrapper library for Geographiclib | ||
|
||
Download `wmm2020` from [here](https://geographiclib.sourceforge.io/html/magnetic.html) and put them into corresponding folder or use it from `wmm2020` folder inside repository. | ||
[Geographiclib](https://geographiclib.sourceforge.io/) is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2020) calculations, and for solving geodesic problems. | ||
|
||
This repository is a ROS wrapper under this library. | ||
|
||
# Installation | ||
|
||
See [Dockerfile](Dockerfile) or [.github/workflows/catkin_build.yml](.github/workflows/catkin_build.yml) as an example of installation. |
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,4 @@ | ||
#!/bin/bash | ||
cd "$(dirname "$0")" | ||
|
||
sudo docker 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,8 @@ | ||
#!/bin/bash | ||
SCRIPT_FOLDER="$(dirname "$0")" | ||
PACKAGE_FOLDER=$SCRIPT_FOLDER/.. | ||
WMM_FOLDER=$PACKAGE_FOLDER/wmm2020/magnetic | ||
|
||
mkdir -p /usr/local/share/GeographicLib/magnetic && \ | ||
cp $WMM_FOLDER/wmm2020.wmm /usr/local/share/GeographicLib/magnetic/wmm2020.wmm && \ | ||
cp $WMM_FOLDER/wmm2020.wmm.cof /usr/local/share/GeographicLib/magnetic/wmm2020.wmm.cof |