Compare commits

..

23 Commits

Author SHA1 Message Date
Oleg Kalachev
5d92f8e381 Patch to fix building px4 binary 2022-07-26 06:27:13 +03:00
Oleg Kalachev
ef46ca93bb Attempt 2022-07-24 02:11:34 +03:00
Oleg Kalachev
7c8ced9790 Try target_include_directories 2022-07-23 20:48:31 +03:00
Oleg Kalachev
0e70776791 Fix 2022-07-23 20:46:06 +03:00
Oleg Kalachev
c540a1795b Attempt 2022-07-23 20:07:11 +03:00
Oleg Kalachev
a0db84361a Test 2022-07-23 19:25:29 +03:00
Oleg Kalachev
a6f6b29c68 Test 2022-07-23 17:34:21 +03:00
Oleg Kalachev
337a44a797 Another test 2022-07-23 16:39:26 +03:00
Oleg Kalachev
bb66b96268 And yet another 2022-07-23 14:53:16 +03:00
Oleg Kalachev
5c05441360 Another try to fix 2022-07-23 04:55:57 +03:00
Oleg Kalachev
3467bfcea7 Fix 2022-07-21 01:05:16 +03:00
Oleg Kalachev
781c9d6be4 Try to fix 2022-07-20 23:39:53 +03:00
Oleg Kalachev
2996d5fd59 Try to fix 2022-07-20 15:12:36 +03:00
Oleg Kalachev
19baebd635 Fix 2022-07-20 03:55:27 +03:00
Oleg Kalachev
9f02f76044 Try another approach to build the workspace 2022-07-19 23:49:03 +03:00
Oleg Kalachev
024a7280a9 Fix 2022-07-12 16:47:15 +03:00
Oleg Kalachev
5ccd5cf2ba Fix 2022-07-12 15:31:29 +03:00
Oleg Kalachev
c034418de0 Fix 2022-07-12 14:56:24 +03:00
Oleg Kalachev
b04ffbe41d Fix 2022-07-12 13:46:05 +03:00
Oleg Kalachev
47913a88a7 Fix 2022-07-12 13:44:12 +03:00
Oleg Kalachev
7997e219e3 Try to fix 2022-07-05 16:39:55 +03:00
Oleg Kalachev
c570ba4bac Fix 2022-07-05 14:42:22 +03:00
Oleg Kalachev
811d2e89e7 Update PX4 to v1.13.0 2022-07-05 14:38:04 +03:00
3 changed files with 18 additions and 39 deletions

View File

@@ -10,7 +10,7 @@ on:
jobs: jobs:
build: build:
runs-on: macos-12 # Using macOS as https://github.com/actions/virtual-environments/issues/183 runs-on: macos-10.15 # Using macOS as https://github.com/actions/virtual-environments/issues/183
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Download base image - name: Download base image
@@ -19,8 +19,6 @@ jobs:
wget --progress=dot:giga https://clovervm.ams3.digitaloceanspaces.com/base-focal.ova -O output-virtualbox-iso/clover-devel.ova wget --progress=dot:giga https://clovervm.ams3.digitaloceanspaces.com/base-focal.ova -O output-virtualbox-iso/clover-devel.ova
- name: Build - name: Build
run: ./build.sh run: ./build.sh
- name: Image size
run: ls -lh output-virtualbox-ovf
- name: Upload - name: Upload
if: ${{ github.event_name == 'release' }} if: ${{ github.event_name == 'release' }}
# Not using ready S3 actions, because they either don't run on macOS machines or don't support changing the endpoint # Not using ready S3 actions, because they either don't run on macOS machines or don't support changing the endpoint
@@ -28,15 +26,3 @@ jobs:
AWS_ACCESS_KEY_ID=${{secrets.S3_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.S3_SECRET_KEY}} aws s3 sync . s3://clovervm/ --acl public-read --endpoint-url https://ams3.digitaloceanspaces.com --no-progress AWS_ACCESS_KEY_ID=${{secrets.S3_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.S3_SECRET_KEY}} aws s3 sync . s3://clovervm/ --acl public-read --endpoint-url https://ams3.digitaloceanspaces.com --no-progress
echo Uploaded https://clovervm.ams3.digitaloceanspaces.com/$(ls) echo Uploaded https://clovervm.ams3.digitaloceanspaces.com/$(ls)
working-directory: output-virtualbox-ovf working-directory: output-virtualbox-ovf
- name: Install ovftool
run: sudo installer -pkg "VMware OVF Tool.pkg" -target /
- name: Convert to Parallels
run: |
mkdir parallels
/Applications/VMware\ OVF\ Tool/ovftool --lax output-virtualbox-ovf/*.ova parallels/clover-devel.vmx
ls -lh parallels
- name: Upload Parallels image
run: |
AWS_ACCESS_KEY_ID=${{secrets.S3_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.S3_SECRET_KEY}} aws s3 sync . s3://clovervm/ --acl public-read --endpoint-url https://ams3.digitaloceanspaces.com --no-progress
echo Uploaded https://clovervm.ams3.digitaloceanspaces.com/$(ls)
working-directory: parallels

Binary file not shown.

View File

@@ -58,13 +58,13 @@ echo "--- Downloading PX4"
git clone --recursive --depth 1 --branch v1.13.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot git clone --recursive --depth 1 --branch v1.13.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/ ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/ ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
#ln -s ~/PX4-Autopilot/src/modules/mavlink/mavlink ~/catkin_ws/src/
#git clone --depth 1 https://github.com/mavlink/c_library_v2.git ~/catkin_ws/src/mavlink/ # FIXME:
echo "--- Installing PX4 dependencies" echo "--- Installing PX4 dependencies"
echo "progress=dot:giga" > ~/.wgetrc # make wget don't spam to log ~/PX4-Autopilot/Tools/setup/ubuntu.sh
~/PX4-Autopilot/Tools/setup/ubuntu.sh --no-nuttx
rm ~/.wgetrc
pip3 install --user toml pip3 install --user toml
# sudo -E sh -c 'apt-get install -y ant openjdk-11-jdk' # Additional packages for jMAVSim sudo -E sh -c 'apt-get install -y ant openjdk-11-jdk' # Additional packages for jMAVSim
echo "--- Patching mavlink_sitl_gazebo" echo "--- Patching mavlink_sitl_gazebo"
# See https://github.com/PX4/PX4-SITL_gazebo/pull/872 # See https://github.com/PX4/PX4-SITL_gazebo/pull/872
@@ -81,13 +81,18 @@ ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS
echo "--- Installing geographiclib datasets" echo "--- Installing geographiclib datasets"
sudo -E sh -c '/opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh' sudo -E sh -c '/opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh'
echo "--- Build mavlink" echo "--- Build PX4"
cd ~/catkin_ws cd ~/PX4-Autopilot
catkin_make mavlink_c_generate -DCATKIN_WHITELIST_PACKAGES="px4" # at first build PX4's mavlink to enforce mavlink_sitl_gazebo using it make px4_sitl
ln -s "." build/mavlink/mavlink # fix https://github.com/PX4/PX4-Autopilot/pull/19964
echo "--- Building the workspace" echo "--- Building the workspace"
catkin_make -DCATKIN_WHITELIST_PACKAGES="" # sudo -E sh -c 'rm -rf /opt/ros/noetic/include/mavlink'
ls ~/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/mavlink
echo 'include_directories("/home/clover/PX4-Autopilot/build/px4_sitl_default/mavlink")' >> ~/catkin_ws/src/sitl_gazebo/CMakeLists.txt
sed -i 's|#include <mavlink/mavlink_types.h>|#include <mavlink_types.h>|' ~/catkin_ws/src/PX4-Autopilot/src/modules/mavlink/mavlink_bridge_header.h
cd ~/catkin_ws
catkin_make mavlink_c_generate
catkin_make
echo "--- Installing Visual Studio Code" echo "--- Installing Visual Studio Code"
sudo -E sh -c 'apt-get update; apt-get install -y curl' sudo -E sh -c 'apt-get update; apt-get install -y curl'
@@ -151,7 +156,7 @@ sudo cp ${HOME}/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/
sudo systemctl enable monkey sudo systemctl enable monkey
echo "--- Installing additional packages" echo "--- Installing additional packages"
sudo -E sh -c 'apt-get update; apt-get install -y sshfs gvfs-fuse gvfs-backends python3-opencv byobu ipython3 byobu nmap lsof tmux vim ros-noetic-rqt-multiplot ros-noetic-image-view' sudo -E sh -c 'apt-get update; apt-get install -y sshfs gvfs-fuse gvfs-backends python3-opencv byobu ipython3 byobu nmap lsof tmux vim ros-noetic-rqt-multiplot'
echo "--- Personalizing VM" echo "--- Personalizing VM"
sudo -E sh -c 'cp /usr/share/xfce4/backdrops/xubuntu-wallpaper.png /usr/share/xfce4/backdrops/xubuntu-wallpaper-old.png; cp ${HOME}/Pictures/Logo_COEX_2019_white_on_black.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png' sudo -E sh -c 'cp /usr/share/xfce4/backdrops/xubuntu-wallpaper.png /usr/share/xfce4/backdrops/xubuntu-wallpaper-old.png; cp ${HOME}/Pictures/Logo_COEX_2019_white_on_black.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png'
@@ -199,14 +204,6 @@ rosversion tf2_web_republisher
rosversion cv_camera rosversion cv_camera
rosversion web_video_server rosversion web_video_server
rosversion nodelet rosversion nodelet
rosversion image_view
echo "--- Validating PX4 builds"
cd ~/PX4-Autopilot
make px4_sitl # regular sitl build
# sudo -E sh -c 'apt-get install -y gcc-arm-none-eabi'
# make px4_fmu-v4_default
make clean
echo "--- Run Clover's Python libraries validation" echo "--- Run Clover's Python libraries validation"
$HOME/catkin_ws/src/clover/builder/test/tests_py3.py $HOME/catkin_ws/src/clover/builder/test/tests_py3.py
@@ -216,14 +213,10 @@ set +x
rospack list-names | while read line; do echo $line `rosversion $line`; done rospack list-names | while read line; do echo $line `rosversion $line`; done
set -x set -x
echo "--- Largest packages installed" echo "Trying running the Gazebo simulator, check the output"
sudo -E sh -c 'apt-get install -y debian-goodies'
dpigs -H -n 30
echo "--- Trying running the Gazebo simulator, check the output"
timeout --preserve-status 30 roslaunch clover_simulation simulator.launch gui:=false --screen timeout --preserve-status 30 roslaunch clover_simulation simulator.launch gui:=false --screen
echo "--- Trying running jMAVSim, check the output" echo "Trying running jMAVSim, check the output"
# cd ~/PX4-Autopilot # cd ~/PX4-Autopilot
# HEADLESS=1 timeout --preserve-status 30 make px4_sitl jmavsim # HEADLESS=1 timeout --preserve-status 30 make px4_sitl jmavsim
HEADLESS=1 timeout --preserve-status 30 roslaunch clover_simulation simulator.launch type:=jmavsim gui:=false --screen HEADLESS=1 timeout --preserve-status 30 roslaunch clover_simulation simulator.launch type:=jmavsim gui:=false --screen