From 564cdb229f54855110b0ae668da1180b022b8adf Mon Sep 17 00:00:00 2001 From: Mehul Goel Date: Mon, 23 Sep 2024 19:22:20 -0400 Subject: [PATCH] pylint :( --- camera.py | 19 ++++++++++--------- rb_ws/src/buggy/scripts/auton/autonsystem.py | 4 +--- .../buggy/scripts/auton/publish_rtk_err.py | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/camera.py b/camera.py index aa3c893..6281080 100644 --- a/camera.py +++ b/camera.py @@ -19,10 +19,11 @@ ######################################################################## import sys -import pyzed.sl as sl from signal import signal, SIGINT -import argparse -import os +import argparse + + +import pyzed.sl as sl cam = sl.Camera() @@ -35,15 +36,15 @@ def handler(signal_received, frame): signal(SIGINT, handler) def main(): - + init = sl.InitParameters() init.depth_mode = sl.DEPTH_MODE.NONE # Set configuration parameters for the ZED - status = cam.open(init) - if status != sl.ERROR_CODE.SUCCESS: + status = cam.open(init) + if status != sl.ERROR_CODE.SUCCESS: print("Camera Open", status, "Exit program.") exit(1) - + recording_param = sl.RecordingParameters(opt.output_svo_file, sl.SVO_COMPRESSION_MODE.H264) # Enable recording with the filename specified in argument err = cam.enable_recording(recording_param) if err != sl.ERROR_CODE.SUCCESS: @@ -58,12 +59,12 @@ def main(): if cam.grab(runtime) == sl.ERROR_CODE.SUCCESS : # Check that a new image is successfully acquired frames_recorded += 1 print("Frame count: " + str(frames_recorded), end="\r") - + if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--output_svo_file', type=str, help='Path to the SVO file that will be written', required= True) opt = parser.parse_args() - if not opt.output_svo_file.endswith(".svo") and not opt.output_svo_file.endswith(".svo2"): + if not opt.output_svo_file.endswith(".svo") and not opt.output_svo_file.endswith(".svo2"): print("--output_svo_file parameter should be a .svo file but is not : ",opt.output_svo_file,"Exit program.") exit() main() \ No newline at end of file diff --git a/rb_ws/src/buggy/scripts/auton/autonsystem.py b/rb_ws/src/buggy/scripts/auton/autonsystem.py index d3015a2..e4fd0e3 100755 --- a/rb_ws/src/buggy/scripts/auton/autonsystem.py +++ b/rb_ws/src/buggy/scripts/auton/autonsystem.py @@ -111,9 +111,7 @@ def __init__(self, def change_utm_latlon(self, msg): new_msg = msg - northing = msg.pose.pose.position.x - easting = msg.pose.pose.position.y - lat, lon, alt = navpy.ecef2lla([msg.pose.pose.position.x, msg.pose.pose.position.y, msg.pose.pose.position.z]) + lat, lon, _ = navpy.ecef2lla([msg.pose.pose.position.x, msg.pose.pose.position.y, msg.pose.pose.position.z]) new_msg.pose.pose.position.x, new_msg.pose.pose.position.y = lon, lat self.latlonodom.publish(new_msg) diff --git a/rb_ws/src/buggy/scripts/auton/publish_rtk_err.py b/rb_ws/src/buggy/scripts/auton/publish_rtk_err.py index 538768c..1e85d7b 100755 --- a/rb_ws/src/buggy/scripts/auton/publish_rtk_err.py +++ b/rb_ws/src/buggy/scripts/auton/publish_rtk_err.py @@ -11,7 +11,7 @@ from world import World -#BROKEN BROKEN BROKEN BROKEN +#BROKEN BROKEN BROKEN BROKEN class RTKErrPublisher(): """