Skip to content

Commit

Permalink
Merge branch 'main' into refactor/walk_vizualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova authored Nov 23, 2024
2 parents 664bd2b + 89c7035 commit e91429e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,26 @@ def frame_select(self):
selected_frame_name = self._widget.frameList.currentItem().text()
selected_frame = self._recorder.get_keyframe(selected_frame_name)
if selected_frame is not None:
# check if unrecorded changes would be lost
unrecorded_changes = []
current_keyframe_goals = self._recorder.get_keyframe(self._selected_frame)["goals"]

for motor_name, text_field in self._motor_controller_text_fields.items():
# Get the angle from the textfield
angle = text_field.value()
# compare with angles in current keyframe
if not current_keyframe_goals[motor_name] == math.radians(angle):
unrecorded_changes.append(motor_name)

# warn user about unrecorded changes
if unrecorded_changes:
message = (
f"""This will discard your unrecorded changes for {", ".join(unrecorded_changes)}. Continue?"""
)
sure = QMessageBox.question(self._widget, "Sure?", message, QMessageBox.Yes | QMessageBox.No)
# Cancel the open if the user does not want to discard the changes
if sure == QMessageBox.No:
return
# Update state so we have a new selected frame
self._selected_frame = selected_frame_name

Expand Down
7 changes: 5 additions & 2 deletions scripts/make_basler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eEo pipefail
# The pylon driver can be found in the download section of the following link:
# https://www.baslerweb.com/en/downloads/software-downloads/
# Go to the download button and copy the link address.
PYLON_DOWNLOAD_URL="https://www2.baslerweb.com/media/downloads/software/pylon_software/pylon_7_4_0_14900_linux_x86_64_debs.tar.gz"
PYLON_DOWNLOAD_URL="https://data.bit-bots.de/pylon_7_4_0_14900_linux_x86_64_debs.tar.gz.gpg"
PYLON_VERSION="7.4.0"

# Check let the user confirm that they read the license agreement on the basler website and agree with it.
Expand Down Expand Up @@ -47,9 +47,12 @@ else
exit 1
fi
# Download the pylon driver to temp folder
wget --no-verbose $SHOW_PROGRESS $PYLON_DOWNLOAD_URL -O /tmp/pylon_${PYLON_VERSION}.tar.gz
wget --no-verbose $SHOW_PROGRESS $PYLON_DOWNLOAD_URL -O /tmp/pylon_${PYLON_VERSION}.tar.gz.gpg
# Extract the pylon driver
mkdir /tmp/pylon
# Decrypt the pylon driver
gpg --batch --yes --passphrase "12987318371043223" -o /tmp/pylon_${PYLON_VERSION}.tar.gz -d /tmp/pylon_${PYLON_VERSION}.tar.gz.gpg
# Extract the pylon driver
tar -xzf /tmp/pylon_${PYLON_VERSION}.tar.gz -C /tmp/pylon/
# Install the pylon driver
sudo apt-get install /tmp/pylon/pylon_${PYLON_VERSION}*.deb -y
Expand Down

0 comments on commit e91429e

Please sign in to comment.