Compare commits

...

24 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
Oleg Kalachev
566d6e266a Add /etc/clover_vm_version file (#8)
* Add etc assets directory

* Name directory for version file `version`

* Simplify

* Put actual version to /etc/clover_vm_version

* Fix

* Fix

* Fix
2022-06-15 20:13:46 +03:00
4 changed files with 34 additions and 12 deletions

1
assets/clover_vm_version Normal file
View File

@@ -0,0 +1 @@
unknown

View File

@@ -5,6 +5,18 @@ set -ex
# FIXME: Use system Packer if possible
#PACKER=$(which packer)
echo "--- Fill version asset"
# if [[ $GITHUB_REF == refs/tags/*-rc* ]]; then
# remove rc label
# VERSION=${GITHUB_REF#refs/tags/}
# VERSION=${VERSION/-rc*/}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
else
VERSION=$(git describe --always)
fi
echo $VERSION > assets/clover_vm_version
#if [ "x${PACKER}" == "x" ]; then
PACKER="./packer"
if [ ! -f ${PACKER} ]; then
@@ -32,16 +44,6 @@ ${PACKER} build ros_ide_vm.json
echo "--- Marking the VM"
# if [[ $GITHUB_REF == refs/tags/*-rc* ]]; then
# remove rc label
# VERSION=${GITHUB_REF#refs/tags/}
# VERSION=${VERSION/-rc*/}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
else
VERSION=$(git describe --always)
fi
VM_NAME="clover-devel_${VERSION}.ova"
mv ./output-virtualbox-ovf/clover-devel.ova ./output-virtualbox-ovf/${VM_NAME}
ls -l output-virtualbox-ovf

View File

@@ -63,6 +63,11 @@
"source": "{{user `assetsDir`}}/patches",
"destination": "/tmp"
},
{
"type": "file",
"source": "{{user `assetsDir`}}/clover_vm_version",
"destination": "/tmp/clover_vm_version"
},
{
"type": "shell",
"script": "scripts/install_software.sh",

View File

@@ -55,10 +55,11 @@ echo "--- Installing Clover's Python dependencies"
sudo -E sh -c '/usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt'
echo "--- Downloading PX4"
git clone --recursive --depth 1 --branch v1.12.3 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/Tools/sitl_gazebo ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/mavlink ~/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"
~/PX4-Autopilot/Tools/setup/ubuntu.sh
@@ -80,8 +81,17 @@ ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS
echo "--- Installing geographiclib datasets"
sudo -E sh -c '/opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh'
echo "--- Build PX4"
cd ~/PX4-Autopilot
make px4_sitl
echo "--- Building the workspace"
# 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"
@@ -154,6 +164,10 @@ sudo -E sh -c 'hostnamectl set-hostname clover-dev; sed -i "s/ubuntu/clover-dev
echo "export ROS_HOSTNAME=\`hostname\`.local" >> ${HOME}/.bashrc
chmod a+x ${HOME}/Desktop/*
echo "--- Creating /etc/clover_vm_version"
sudo -E sh -c 'mv /tmp/clover_vm_version /etc/clover_vm_version'
cat /etc/clover_vm_version
echo "--- Cleaning up"
sudo -E sh -c 'apt-get -y autoremove; apt-get -y autoclean; apt-get -y clean; fstrim -v /'