mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
image_builder: move deploy folder to assets
This commit is contained in:
12
builder_scripts/assets/clever.service
Normal file
12
builder_scripts/assets/clever.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Clever ROS package
|
||||
Requires=roscore.service
|
||||
After=roscore.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/root/roscore.env
|
||||
ExecStart=/opt/ros/kinetic/bin/roslaunch clever clever.launch --wait
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
14
builder_scripts/assets/generate_ros_lib
Normal file
14
builder_scripts/assets/generate_ros_lib
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# @okalachev Oleg Kalachev
|
||||
# @urpylka Artem Smirnov
|
||||
#
|
||||
|
||||
# This script generates ros_lib library for Arduino for using with rosseial_arduino:
|
||||
# http://wiki.ros.org/rosserial_arduino/Tutorials
|
||||
# https://copterexpress.gitbooks.io/clever/content/docs/arduino.html
|
||||
|
||||
rm -rf ros_lib clever_arudino.tar.gz
|
||||
rosrun rosserial_arduino make_libraries.py .
|
||||
tar czf clever_arudino.tar.gz ros_lib
|
||||
10
builder_scripts/assets/roscore.env
Normal file
10
builder_scripts/assets/roscore.env
Normal file
@@ -0,0 +1,10 @@
|
||||
ROS_ROOT=/opt/ros/kinetic/share/ros
|
||||
ROS_DISTRO=kinetic
|
||||
ROS_PACKAGE_PATH=/home/pi/catkin_ws/src:/opt/ros/kinetic/share
|
||||
ROS_PORT=11311
|
||||
ROS_MASTER_URI=http://localhost:11311
|
||||
CMAKE_PREFIX_PATH=/home/pi/catkin_ws/devel:/opt/ros/kinetic
|
||||
PATH=/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
|
||||
LD_LIBRARY_PATH=/opt/ros/kinetic/lib
|
||||
PYTHONPATH=/home/pi/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
|
||||
ROS_IP=192.168.11.1
|
||||
11
builder_scripts/assets/roscore.service
Normal file
11
builder_scripts/assets/roscore.service
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Launcher for the ROS master, parameter server and rosout logging node
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/root/roscore.env
|
||||
ExecStart=/opt/ros/kinetic/bin/roscore
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -13,8 +13,8 @@ cd ${IMAGE_BUILDER}
|
||||
# Make free space
|
||||
# ./resize_fs.sh ${IMAGE_PATH} '7G'
|
||||
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/init_rpi.sh' '/root/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/hardware_setup.sh' '/root/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/init_rpi.sh' '/root/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/hardware_setup.sh' '/root/'
|
||||
|
||||
# ./image_config.sh execute ${IMAGE_PATH} ${SCRIPTS_DIR}'/init_image.sh' ${CLEVER_VERSION} $(jq '.source_image' -r ${TARGET_CONFIG})
|
||||
# ./image_config.sh execute ${IMAGE_PATH} ${SCRIPTS_DIR}'/software_install.sh'
|
||||
@@ -23,8 +23,12 @@ cd ${IMAGE_BUILDER}
|
||||
# # If RPi then use a one thread to build a ROS package on RPi, else use all
|
||||
# [[ $(arch) == 'armv7l' ]] && NUMBER_THREADS=1 || NUMBER_THREADS=$(nproc --all)
|
||||
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/kinetic-rosdep-clever.yaml' '/etc/ros/rosdep/'
|
||||
# #./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/kinetic-ros-clever.rosinstall' '/home/pi/ros_catkin_ws/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/clever.service' '/root/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/roscore.env' '/root/'
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/roscore.service' '/root/'
|
||||
|
||||
# ./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/kinetic-rosdep-clever.yaml' '/etc/ros/rosdep/'
|
||||
# #./image_config.sh copy_to_chroot ${IMAGE_PATH} ${SCRIPTS_DIR}'/assets/kinetic-ros-clever.rosinstall' '/home/pi/ros_catkin_ws/'
|
||||
# ./image_config.sh execute ${IMAGE_PATH} ${SCRIPTS_DIR}'/ros_install.sh' ${TARGET_REPO} ${TARGET_REF} False False ${NUMBER_THREADS}
|
||||
|
||||
# ./autosizer.sh ${IMAGE_PATH}
|
||||
|
||||
@@ -59,7 +59,6 @@ resolve_rosdep() {
|
||||
|| (echo_stamp "Rosdep installation was failed!" "ERROR"; exit 1)
|
||||
}
|
||||
|
||||
|
||||
INSTALL_ROS_PACK_SOURCES=${3:='False'}
|
||||
if [ "${INSTALL_ROS_PACK_SOURCES}" = "True" ]; then
|
||||
DISCOVER_ROS_PACK=${4:='True'}
|
||||
@@ -128,8 +127,8 @@ echo_stamp "#12 Creating catkin_ws & Installing CLEVER-BUNDLE" \
|
||||
&& ls -l /opt/ros/kinetic \
|
||||
&& source /opt/ros/kinetic/setup.bash \
|
||||
&& catkin_make -j$5 -DCMAKE_BUILD_TYPE=Release \
|
||||
&& ln -s /home/pi/catkin_ws/src/clever/deploy/roscore.service /lib/systemd/system/roscore.service \
|
||||
&& ln -s /home/pi/catkin_ws/src/clever/deploy/clever.service /lib/systemd/system/clever.service \
|
||||
&& ln -s /root/roscore.service /lib/systemd/system/roscore.service \
|
||||
&& ln -s /root/clever.service /lib/systemd/system/clever.service \
|
||||
&& systemctl enable roscore \
|
||||
&& systemctl enable clever \
|
||||
&& echo_stamp "All CLEVER-BUNDLE was installed!" "SUCCESS" \
|
||||
|
||||
Reference in New Issue
Block a user