Skip to content

Commit

Permalink
pylint :(
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Sep 23, 2024
1 parent d1d2970 commit 564cdb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
19 changes: 10 additions & 9 deletions camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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:
Expand All @@ -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()
4 changes: 1 addition & 3 deletions rb_ws/src/buggy/scripts/auton/autonsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion rb_ws/src/buggy/scripts/auton/publish_rtk_err.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from world import World


#BROKEN BROKEN BROKEN BROKEN
#BROKEN BROKEN BROKEN BROKEN
class RTKErrPublisher():

"""
Expand Down

0 comments on commit 564cdb2

Please sign in to comment.