Skip to content

Commit

Permalink
CI: Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Aug 28, 2024
1 parent 429a4b0 commit 3108376
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,25 @@ jobs:
name: "${{ matrix.distro }}${{ matrix.env.CLANG_TIDY && (github.event_name != 'workflow_dispatch' && ' • clang-tidy (delta)' || ' • clang-tidy (all)') || '' }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache ccache
uses: rhaschke/cache@main
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
env:
GHA_CACHE_SAVE: always
- name: industrial_ci
id: ici
uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env || env }}

- name: Upload test artifacts (on failure)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
with:
name: test-results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
name: pre-commit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install clang-format-10
run: sudo apt-get install clang-format-10
- uses: rhaschke/[email protected]
with:
distro: noetic
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
id: precommit
- name: Upload pre-commit changes
if: failure() && steps.precommit.outcome == 'failure'
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -28,12 +28,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.7
rev: v2.0.4
hooks:
- id: autopep8

- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
rev: v3.2.6
hooks: []

- repo: local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

from tactile_calibration_tools.calibration_utils import *

#import curses
#import os
# import curses
# import os


#import curses
#stdscr = curses.initscr()
# import curses
# stdscr = curses.initscr()
# curses.noecho()
# stdscr.nodelay(1) # set getch() non-blocking

Expand Down Expand Up @@ -179,7 +179,7 @@ def wait_key_press(timeout):
return True
return False
# def wait_key_press(win, timeout):
#now = rospy.Time.now()
# now = rospy.Time.now()
# while((rospy.Time.now()-now).to_sec() < timeout):
# try:
# key = win.getkey()
Expand All @@ -198,7 +198,7 @@ def user_menu(choices={'c': "continue", 'r': "retry", 's': "save", 'q': "quit wi
letter_string += ") ?\n"
# print "press c to continue, r to retry, d to detect a new channel, s to save and quit, or q to quit without saving"
tcflush(sys.stdin, TCIFLUSH)
#user_choice = stdscr.getch()
# user_choice = stdscr.getch()
return input(letter_string)


Expand All @@ -208,7 +208,7 @@ def user_yesno(default=True):
else:
text = "y/[n] ?"
tcflush(sys.stdin, TCIFLUSH)
while(1):
while (1):
ret = input(text)
if ret == "":
return default
Expand Down Expand Up @@ -355,7 +355,7 @@ def select_color(prev_raw, raw, threshold):
raw_sub = message_filters.Subscriber(args.raw_topic, TactileState)
ref_sub = message_filters.Subscriber(args.ref_topic, TactileState)
ts = message_filters.ApproximateTimeSynchronizer([raw_sub, ref_sub], 10, 0.1, allow_headerless=False)
#ts = message_filters.TimeSynchronizer([raw_sub, ref_sub], 10)
# ts = message_filters.TimeSynchronizer([raw_sub, ref_sub], 10)
ts.registerCallback(raw_ref_topic_cb)
else:
print("Initializing topic subscriber")
Expand Down Expand Up @@ -479,7 +479,7 @@ def select_color(prev_raw, raw, threshold):
print("Use the calibtool upright and press and release your selected channel evenly over",
args.repetition, "iterations. \n\n")
# display vector and detection level
#channel_display_str = display_channel(raw_previous_vec, raw_vec, args.detect_threshold)
# channel_display_str = display_channel(raw_previous_vec, raw_vec, args.detect_threshold)
channel_display_str = display_channel_color(raw_previous_vec, raw_vec, args.detect_threshold)
if channel_display_str is not None:
print("\033[0m\r chan:", '\033[0m|'.join(channel_display_str), '\033[0m', end=' ')
Expand Down Expand Up @@ -571,7 +571,7 @@ def select_color(prev_raw, raw, threshold):
state = RecordingState.PROCESS
print("\nrecording ended")
else:
#display_raw_ref = display_channel_color([raw_previous_vec[i] for i in [detected_channel, args.ref_channel]] , [raw_vec[i] for i in [detected_channel, args.ref_channel] ], input_range_max)
# display_raw_ref = display_channel_color([raw_previous_vec[i] for i in [detected_channel, args.ref_channel]] , [raw_vec[i] for i in [detected_channel, args.ref_channel] ], input_range_max)
# if display_raw_ref is not None:
# print "\033[0m\r chan:",display_raw_ref[0],"\033[0mref:",display_raw_ref[1],"\033[0m Remaining time :", round(DEFAULT_RECORDING_DURATION-elapsed_time),
if ref_topic_init is not None and ref_topic_init is True:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def generate_mapping_pwl(x, y, input_range_max, calib_channel, seg=4, no_extrapo

xs = np.array(x)
ys = np.array(y)
#ys = smooth(y_inc,100)
# ys = smooth(y_inc,100)

pwlf_result = pwlf.PiecewiseLinFit(xs, ys)
# request a fit with n points
Expand Down

0 comments on commit 3108376

Please sign in to comment.