diff --git a/astrobee/scripts/cpu_print_version.sh b/astrobee/scripts/cpu_print_version.sh index 190127cd6c..ed0a17a6a8 100755 --- a/astrobee/scripts/cpu_print_version.sh +++ b/astrobee/scripts/cpu_print_version.sh @@ -9,7 +9,7 @@ function deb_version { fi } -source /opt/ros/kinetic/setup.bash +source /opt/ros/noetic/setup.bash date echo "Kernel: $(uname -r)" lsb_release -r diff --git a/hardware/pico_driver/scripts/debug_pico_utils.py b/hardware/pico_driver/scripts/debug_pico_utils.py index 1848530e78..59c5da902b 100755 --- a/hardware/pico_driver/scripts/debug_pico_utils.py +++ b/hardware/pico_driver/scripts/debug_pico_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/hardware/pico_driver/scripts/pico_check_split_extended.py b/hardware/pico_driver/scripts/pico_check_split_extended.py index 90253453fb..82ef553d54 100755 --- a/hardware/pico_driver/scripts/pico_check_split_extended.py +++ b/hardware/pico_driver/scripts/pico_check_split_extended.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/hardware/pico_driver/scripts/pico_split_extended.py b/hardware/pico_driver/scripts/pico_split_extended.py index 3a095e77a4..39fd0f380e 100755 --- a/hardware/pico_driver/scripts/pico_split_extended.py +++ b/hardware/pico_driver/scripts/pico_split_extended.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/hardware/pico_driver/scripts/pico_utils.py b/hardware/pico_driver/scripts/pico_utils.py index c80845579e..32931d24d7 100644 --- a/hardware/pico_driver/scripts/pico_utils.py +++ b/hardware/pico_driver/scripts/pico_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/hardware/pico_driver/scripts/pico_write_xyz_coeff.py b/hardware/pico_driver/scripts/pico_write_xyz_coeff.py index aad7716301..c7416fc580 100755 --- a/hardware/pico_driver/scripts/pico_write_xyz_coeff.py +++ b/hardware/pico_driver/scripts/pico_write_xyz_coeff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/localization/sparse_mapping/tools/generate_hugin.py b/localization/sparse_mapping/tools/generate_hugin.py index ef4196186a..ace166e91d 100755 --- a/localization/sparse_mapping/tools/generate_hugin.py +++ b/localization/sparse_mapping/tools/generate_hugin.py @@ -144,10 +144,8 @@ def main(): srcImage.setFilename(img) p.addImage(srcImage) - # make a c++ std::ofstream to write to - ofs = ofstream(output_hugin) # write the modified panorama to that stream - p.writeData(ofs) + p.WritePTOFile(output_hugin) # done with it del ofs diff --git a/scripts/git/pre-commit.linter_python b/scripts/git/pre-commit.linter_python index 01b8f7f5bb..2c2f3bbf31 100755 --- a/scripts/git/pre-commit.linter_python +++ b/scripts/git/pre-commit.linter_python @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. @@ -71,12 +71,18 @@ echo " Analysing python code style with 'isort'." # could happen for example if the .isort.cfg src_paths list gets out # of date. -if $(isort . --extend-skip cmake,submodules --profile black --diff --check-only --quiet >/dev/null); then +isort_args=( + "--extend-skip=cmake" + "--extend-skip=submodules" + "--extend-skip=debian" + "--profile=black" +) +if $(isort . "${isort_args[@]}" --diff --check-only --quiet >/dev/null); then echo "Linter checks using 'isort' passed." else echo "Errors detected with 'isort'. Fixing them. Try to add and commit your files again." - isort . --extend-skip cmake,submodules --profile black >/dev/null - failed_lint=true + isort . "${isort_args[@]}" >/dev/null + failed_lint=true fi # Cancel commit if linter failed diff --git a/tools/bag_processing/scripts/apply_histogram_equalization_to_images.py b/tools/bag_processing/scripts/apply_histogram_equalization_to_images.py index 528626b78a..560e542f1a 100755 --- a/tools/bag_processing/scripts/apply_histogram_equalization_to_images.py +++ b/tools/bag_processing/scripts/apply_histogram_equalization_to_images.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/check_bag_for_gaps.py b/tools/bag_processing/scripts/check_bag_for_gaps.py index 2d28b384b8..67f81e2952 100755 --- a/tools/bag_processing/scripts/check_bag_for_gaps.py +++ b/tools/bag_processing/scripts/check_bag_for_gaps.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/clock_skew.py b/tools/bag_processing/scripts/clock_skew.py index d9532e2f06..5122ef80b9 100755 --- a/tools/bag_processing/scripts/clock_skew.py +++ b/tools/bag_processing/scripts/clock_skew.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/csv_join.py b/tools/bag_processing/scripts/csv_join.py index 82afc6994a..98cc2f3f71 100755 --- a/tools/bag_processing/scripts/csv_join.py +++ b/tools/bag_processing/scripts/csv_join.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/get_msg_stats.py b/tools/bag_processing/scripts/get_msg_stats.py index 3dc0f11b61..eced70b9f3 100755 --- a/tools/bag_processing/scripts/get_msg_stats.py +++ b/tools/bag_processing/scripts/get_msg_stats.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_debayer.py b/tools/bag_processing/scripts/rosbag_debayer.py index 246cbf7afb..db972541fb 100755 --- a/tools/bag_processing/scripts/rosbag_debayer.py +++ b/tools/bag_processing/scripts/rosbag_debayer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_detect_bad_topics.py b/tools/bag_processing/scripts/rosbag_detect_bad_topics.py index ba970327da..8162dd697d 100755 --- a/tools/bag_processing/scripts/rosbag_detect_bad_topics.py +++ b/tools/bag_processing/scripts/rosbag_detect_bad_topics.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_fix_all.py b/tools/bag_processing/scripts/rosbag_fix_all.py index 4fb7b554f6..734916db91 100755 --- a/tools/bag_processing/scripts/rosbag_fix_all.py +++ b/tools/bag_processing/scripts/rosbag_fix_all.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_merge.py b/tools/bag_processing/scripts/rosbag_merge.py index d24fa33335..4877b96ff0 100755 --- a/tools/bag_processing/scripts/rosbag_merge.py +++ b/tools/bag_processing/scripts/rosbag_merge.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_rewrite_types.py b/tools/bag_processing/scripts/rosbag_rewrite_types.py index 6f1d21780b..04c204279f 100755 --- a/tools/bag_processing/scripts/rosbag_rewrite_types.py +++ b/tools/bag_processing/scripts/rosbag_rewrite_types.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_sample.py b/tools/bag_processing/scripts/rosbag_sample.py index 4e8fdebfce..ecfddbc824 100755 --- a/tools/bag_processing/scripts/rosbag_sample.py +++ b/tools/bag_processing/scripts/rosbag_sample.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_splice.py b/tools/bag_processing/scripts/rosbag_splice.py index 2ac047381a..d8de7671ce 100755 --- a/tools/bag_processing/scripts/rosbag_splice.py +++ b/tools/bag_processing/scripts/rosbag_splice.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_topic_filter.py b/tools/bag_processing/scripts/rosbag_topic_filter.py index cac94fbc1c..e892be43e9 100755 --- a/tools/bag_processing/scripts/rosbag_topic_filter.py +++ b/tools/bag_processing/scripts/rosbag_topic_filter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_trim.py b/tools/bag_processing/scripts/rosbag_trim.py index fc11a59c82..6598a4ed54 100755 --- a/tools/bag_processing/scripts/rosbag_trim.py +++ b/tools/bag_processing/scripts/rosbag_trim.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/rosbag_verify.py b/tools/bag_processing/scripts/rosbag_verify.py index 1e5538856c..10fe8ba360 100755 --- a/tools/bag_processing/scripts/rosbag_verify.py +++ b/tools/bag_processing/scripts/rosbag_verify.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/scripts/utilities/bmr_renumber_enum.py b/tools/bag_processing/scripts/utilities/bmr_renumber_enum.py index 5d0f46dfb4..3650c35d2f 100755 --- a/tools/bag_processing/scripts/utilities/bmr_renumber_enum.py +++ b/tools/bag_processing/scripts/utilities/bmr_renumber_enum.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # diff --git a/tools/bag_processing/test/test_fix_all.py b/tools/bag_processing/test/test_fix_all.py index f075a1262f..acaab7c0cb 100755 --- a/tools/bag_processing/test/test_fix_all.py +++ b/tools/bag_processing/test/test_fix_all.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. #