Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit cruise planner test (Explicit ACC Nissan) #67

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion scripts/circlesplanner/speed-planner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ do
source /opt/ros/noetic/setup.bash

# now that we have a new file, re-calculate our speed
#/usr/local/sbin/publish-speed-plan.py
# /usr/local/sbin/publish-speed-plan.py

done
52 changes: 52 additions & 0 deletions update_explicit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash
# Author: Matt Bunting

echo "Running libpanda's update.sh"

if [[ $EUID == 0 ]];
then echo "Do NOT run this script as root"
exit
fi

source /opt/ros/noetic/setup.bash

cd /home/circles/libpanda # likely unnecessary
git pull

INSTALLED_LIBPANDA_GIT_VERSION=$(cat /etc/libpanda.d/libpanda_version)
CURRENT_LIBPANDA_GIT_VERSION=$(git rev-parse HEAD | tr -d "\n\r")
CURRENT_LIBPANDA_GIT_VERSION=00000

if [ "$INSTALLED_LIBPANDA_GIT_VERSION" = "$CURRENT_LIBPANDA_GIT_VERSION" ];
then
echo "Software stack is already up to date!"
exit 1
fi

echo "Update needed, Git hash mismatch: $INSTALLED_LIBPANDA_GIT_VERSION != $CURRENT_LIBPANDA_GIT_VERSION"


echo "Stopping can_to_ros..."
sudo systemctl stop rosnodeChecker
sudo systemctl stop can
sudo sh -c "echo 'ROS has been stopped for update!' > /etc/libpanda.d/logMessage"

echo "Updating libpanda..."
./install.sh

cd scripts
echo "Executing installMVTRosPackages..."
./installMVTRosPackages.sh

echo "Executing install_explicit_cruise_planner"
./install_explicit_cruise_planner.sh

# Do the following at the end of installs to ensure all other processes completed
echo "Saving current pandaversion to /etc/libpanda.d/libpanda_version"
sudo sh -c "pandaversion > /etc/libpanda.d/libpanda_version"

echo "Starting can_to_ros..."
sudo systemctl start can
sudo systemctl start rosnodeChecker

echo "libpanda update.sh done."