mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
@@ -4,7 +4,7 @@ Requires=roscore.service
|
||||
After=roscore.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/root/roscore.env
|
||||
EnvironmentFile=/lib/systemd/system/roscore.env
|
||||
ExecStart=/opt/ros/kinetic/bin/roslaunch clever clever.launch --wait
|
||||
Restart=on-abort
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ cv_bridge:
|
||||
stretch: [ros-kinetic-cv-bridge]
|
||||
cv_camera:
|
||||
debian:
|
||||
stretch: [ros-kinetic-cv-camera]
|
||||
stretch: [ros-kinetic-cv-camera=0.3.1-0stretch]
|
||||
diagnostic_msgs:
|
||||
debian:
|
||||
stretch: [ros-kinetic-diagnostic-msgs]
|
||||
@@ -511,3 +511,18 @@ yaml-cpp:
|
||||
zlib:
|
||||
debian:
|
||||
stretch: [zlib1g-dev]
|
||||
compressed_depth_image_transport:
|
||||
debian:
|
||||
stretch: [ros-kinetic-compressed-depth-image-transport]
|
||||
compressed_image_transport:
|
||||
debian:
|
||||
stretch: [ros-kinetic-compressed-image-transport]
|
||||
dynamic_reconfigure:
|
||||
debian:
|
||||
stretch: [ros-kinetic-dynamic-reconfigure]
|
||||
theora_image_transport:
|
||||
debian:
|
||||
stretch: [ros-kinetic-theora-image-transport]
|
||||
libogg:
|
||||
debian:
|
||||
stretch: [libtheora0=1.1.1+dfsg.1-14]
|
||||
|
||||
9
builder/assets/monkey.service
Normal file
9
builder/assets/monkey.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Monkey web-server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/monkey
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -3,7 +3,7 @@ Description=Launcher for the ROS master, parameter server and rosout logging nod
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/root/roscore.env
|
||||
EnvironmentFile=/lib/systemd/system/roscore.env
|
||||
ExecStart=/opt/ros/kinetic/bin/roscore
|
||||
Restart=on-abort
|
||||
|
||||
|
||||
@@ -85,8 +85,9 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey-
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/index.html' '/usr/share/monkey-static/'
|
||||
|
||||
# Butterfly
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.service' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.socket' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.socket' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey.service' '/lib/systemd/system/'
|
||||
# software install
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh'
|
||||
# network setup
|
||||
@@ -95,9 +96,9 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-network.
|
||||
# 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)
|
||||
# Clever
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/clever.service' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.env' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.service' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/clever.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.env' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.service' '/lib/systemd/system/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/kinetic-rosdep-clever.yaml' '/etc/ros/rosdep/'
|
||||
# ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/kinetic-ros-clever.rosinstall' '/home/pi/ros_catkin_ws/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-ros.sh' ${REPO_URL} ${IMAGE_VERSION} false false ${NUMBER_THREADS}
|
||||
|
||||
@@ -75,20 +75,7 @@ resolve_rosdep() {
|
||||
|
||||
echo_stamp "Installing dependencies apps with rosdep in ${CATKIN_PATH}"
|
||||
cd ${CATKIN_PATH}
|
||||
set +e
|
||||
# Successfull unmount flag (false at thismoment)
|
||||
install_ok=false
|
||||
# Repeat 5 times
|
||||
for i in {1..5}; do
|
||||
# Resolving Dependencies with rosdep
|
||||
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION} \
|
||||
&& install_ok=true && break || (echo_stamp "rosdep iteration #$i failed!" "ERROR"; sleep 2)
|
||||
done
|
||||
set -e
|
||||
# Stage fail if this condition is not true
|
||||
[[ $install_ok ]] \
|
||||
&& echo_stamp "All rosdep dependencies was installed!" "SUCCESS" \
|
||||
|| (echo_stamp "Rosdep installation was failed!" "ERROR"; exit 1)
|
||||
my_travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION}
|
||||
}
|
||||
|
||||
INSTALL_ROS_PACK_SOURCES=${INSTALL_ROS_PACK_SOURCES:='false'}
|
||||
@@ -148,6 +135,7 @@ fi
|
||||
echo_stamp "Installing CLEVER" \
|
||||
&& git clone ${REPO} /home/pi/catkin_ws/src/clever \
|
||||
&& cd /home/pi/catkin_ws/src/clever \
|
||||
&& echo "REF: ${REF}" \
|
||||
&& git checkout ${REF} \
|
||||
&& cd /home/pi/catkin_ws \
|
||||
&& resolve_rosdep $(pwd) \
|
||||
@@ -155,8 +143,6 @@ echo_stamp "Installing CLEVER" \
|
||||
&& my_travis_retry pip install -r /home/pi/catkin_ws/src/clever/clever/requirements.txt \
|
||||
&& source /opt/ros/kinetic/setup.bash \
|
||||
&& catkin_make -j${NUMBER_THREADS} -DCMAKE_BUILD_TYPE=Release \
|
||||
&& 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 was installed!" "SUCCESS" \
|
||||
|
||||
@@ -103,8 +103,8 @@ monkey=1.6.9-1 \
|
||||
|| (echo_stamp "Some packages wasn't installed!" "ERROR"; exit 1)
|
||||
|
||||
# Deny byobu to check available updates
|
||||
sudo sed -i "s/updates_available//" /usr/share/byobu/status/status
|
||||
# sudo sed -i "s/updates_available//" /home/pi/.byobu/status
|
||||
sed -i "s/updates_available//" /usr/share/byobu/status/status
|
||||
# sed -i "s/updates_available//" /home/pi/.byobu/status
|
||||
|
||||
echo_stamp "Upgrade pip"
|
||||
my_travis_retry pip install --upgrade pip
|
||||
@@ -113,13 +113,12 @@ my_travis_retry pip3 install --upgrade pip3
|
||||
echo_stamp "Install and enable Butterfly (web terminal)"
|
||||
my_travis_retry pip3 install butterfly
|
||||
my_travis_retry pip3 install butterfly[systemd]
|
||||
ln -s /root/butterfly.service /lib/systemd/system/
|
||||
ln -s /root/butterfly.socket /lib/systemd/system/
|
||||
systemctl enable butterfly.socket
|
||||
|
||||
echo_stamp "Setup Monkey"
|
||||
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
|
||||
ln -s /root/monkey-clever /etc/monkey/sites/default
|
||||
mv /root/monkey-clever /etc/monkey/sites/default
|
||||
systemctl enable monkey.service
|
||||
|
||||
echo_stamp "Add .vimrc"
|
||||
cat << EOF > /home/pi/.vimrc
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<arg name="fcu_conn" default="usb"/>
|
||||
<arg name="fcu_ip" default="127.0.0.1"/>
|
||||
<arg name="gcs_bridge" default="tcp"/>
|
||||
<arg name="web_server" default="true"/>
|
||||
<arg name="web_video_server" default="true"/>
|
||||
<arg name="rosbridge" default="true"/>
|
||||
<arg name="main_camera" default="true"/>
|
||||
@@ -20,10 +19,6 @@
|
||||
<arg name="viz" value="true"/>
|
||||
</include>
|
||||
|
||||
|
||||
<!-- web server, serving /usr/share/clever-static -->
|
||||
<node name="web_server" pkg="clever" type="monkey" output="screen" if="$(arg web_server)" respawn="true" respawn_delay="5"/>
|
||||
|
||||
<!-- web video server -->
|
||||
<node name="web_video_server" pkg="web_video_server" type="web_video_server" if="$(arg web_video_server)" required="false" respawn="true" respawn_delay="5"/>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<!-- Use run_depend for packages you need at runtime: -->
|
||||
<run_depend>catkin</run_depend>
|
||||
<run_depend>ros_cpp</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>nodelet</run_depend>
|
||||
<run_depend>mavros</run_depend>
|
||||
<run_depend>mavros_extras</run_depend>
|
||||
@@ -29,6 +29,7 @@
|
||||
<run_depend>mjpg-streamer</run_depend>
|
||||
<run_depend>rosbridge_server</run_depend>
|
||||
<run_depend>web_video_server</run_depend>
|
||||
<run_depend>ros_comm</run_depend>r
|
||||
<!-- Use test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
exec /usr/sbin/monkey --port 80 --workers 1
|
||||
Reference in New Issue
Block a user