adding a linter workflow #9
15 errors
Autopep8 found 15 errors
Annotations
Check failure on line 24 in src/samples/python/producer/setup.py
github-actions / Autopep8
src/samples/python/producer/setup.py#L10-L24
packages=[package_name],
data_files=[
# Install marker file in the package index
- ('share/ament_index/resource_index/packages', ['resource/' + package_name]),
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
# Include our package.xml file
(os.path.join('share', package_name), ['package.xml']),
# Include all launch files
(os.path.join('share', package_name, 'launch'),
glob(os.path.join('launch', '*.launch.py'))),
# Include config files for parameters
- (os.path.join('share', package_name, 'config'), glob(os.path.join('config', '*.yaml'))),
+ (os.path.join('share', package_name, 'config'),
+ glob(os.path.join('config', '*.yaml'))),
],
install_requires=['setuptools'],
zip_safe=True,
Check failure on line 50 in src/samples/python/producer/producer/producer_node.py
github-actions / Autopep8
src/samples/python/producer/producer/producer_node.py#L36-L50
pos_x = self.get_parameter('pos_x').get_parameter_value().double_value
pos_y = self.get_parameter('pos_y').get_parameter_value().double_value
pos_z = self.get_parameter('pos_z').get_parameter_value().double_value
- velocity = self.get_parameter('velocity').get_parameter_value().double_value
+ velocity = self.get_parameter(
+ 'velocity').get_parameter_value().double_value
# Initialize producer core logic for serialization
self.__producer = ProducerCore(pos_x, pos_y, pos_z, velocity)
# Initialize ROS2 constructs
queue_size = 10
- self.publisher_ = self.create_publisher(Unfiltered, '/unfiltered_topic', queue_size)
+ self.publisher_ = self.create_publisher(
+ Unfiltered, '/unfiltered_topic', queue_size)
timer_period = 0.5
self.timer = self.create_timer(timer_period, self.__publish_position)
Check failure on line 17 in src/samples/python/aggregator/setup.py
github-actions / Autopep8
src/samples/python/aggregator/setup.py#L10-L17
packages=[package_name],
data_files=[
# Install marker file in the package index
- ('share/ament_index/resource_index/packages', ['resource/' + package_name]),
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
# Include our package.xml file
(os.path.join('share', package_name), ['package.xml']),
# Include all launch files.
Check failure on line 61 in src/samples/python/aggregator/aggregator/aggregator_node.py
github-actions / Autopep8
src/samples/python/aggregator/aggregator/aggregator_node.py#L54-L61
str(self.__aggregator.num_filtered_msgs))
self.get_logger().info('Producer Frequency:' + str(self.__aggregator.raw_freq))
- self.get_logger().info('Transformer Frequency:' + str(self.__aggregator.filtered_freq))
+ self.get_logger().info('Transformer Frequency:' +
+ str(self.__aggregator.filtered_freq))
def main(args=None):
Check failure on line 24 in src/samples/python/transformer/setup.py
github-actions / Autopep8
src/samples/python/transformer/setup.py#L10-L24
packages=[package_name],
data_files=[
# Install marker file in the package index
- ('share/ament_index/resource_index/packages', ['resource/' + package_name]),
+ ('share/ament_index/resource_index/packages',
+ ['resource/' + package_name]),
# Include our package.xml file
(os.path.join('share', package_name), ['package.xml']),
# Include all launch files.
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch',
'*.launch.py'))),
# Include config files for parameters
- (os.path.join('share', package_name, 'config'), glob(os.path.join('config', '*.yaml'))),
+ (os.path.join('share', package_name, 'config'),
+ glob(os.path.join('config', '*.yaml'))),
],
install_requires=['setuptools'],
zip_safe=True,
Check failure on line 42 in src/samples/python/transformer/transformer/transformer_node.py
github-actions / Autopep8
src/samples/python/transformer/transformer/transformer_node.py#L35-L42
self.__transformer = TransformerCore()
# Initialize ROS2 Constructs
- self.publisher_ = self.create_publisher(FilteredArray, '/filtered_topic', 10)
+ self.publisher_ = self.create_publisher(
+ FilteredArray, '/filtered_topic', 10)
self.subscription = self.create_subscription(Unfiltered, '/unfiltered_topic',
self.unfiltered_callback, 10)
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L17-L23
import time
import torch
+
class CameraDetectionNode(Node):
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L32-L42
self.declare_parameter('model_path', '/perception_models/yolov8s.pt')
self.declare_parameter('image_size', 480)
self.declare_parameter('compressed', False)
-
+
self.camera_topic = self.get_parameter('camera_topic').value
self.publish_vis_topic = self.get_parameter('publish_vis_topic').value
- self.publish_detection_topic = self.get_parameter('publish_detection_topic').value
+ self.publish_detection_topic = self.get_parameter(
+ 'publish_detection_topic').value
self.model_path = self.get_parameter('model_path').value
self.image_size = self.get_parameter('image_size').value
self.compressed = self.get_parameter('compressed').value
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L80-L90
self.stride = int(self.model.stride)
# setup vis publishers
- self.vis_publisher = self.create_publisher(Image, self.publish_vis_topic, 10)
- self.detection_publisher = self.create_publisher(Detection2DArray, self.publish_detection_topic, 10)
-
- self.get_logger().info(f"Successfully created node listening on camera topic: {self.camera_topic}...")
+ self.vis_publisher = self.create_publisher(
+ Image, self.publish_vis_topic, 10)
+ self.detection_publisher = self.create_publisher(
+ Detection2DArray, self.publish_detection_topic, 10)
+
+ self.get_logger().info(
+ f"Successfully created node listening on camera topic: {self.camera_topic}...")
def preprocess_image(self, cv_image):
"""
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L190-L197
# preprocess image and run through prediction
img = self.preprocess_image(cv_image)
- processed_cv_image = LetterBox(self.image_size, stride=self.stride)(image=cv_image)
+ processed_cv_image = LetterBox(
+ self.image_size, stride=self.stride)(image=cv_image)
pred = self.model(img)
# nms function used same as yolov8 detect.py
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L227-L235
self.publish_vis(annotated_img, feed)
self.publish_detections(detections, msg, feed)
- self.get_logger().info(f"Finished in: {time.time() - startTime}, {1/(time.time() - startTime)} Hz")
-
+ self.get_logger().info(
+ f"Finished in: {time.time() - startTime}, {1/(time.time() - startTime)} Hz")
def main(args=None):
github-actions / Autopep8
src/perception/camera_object_detection/camera_object_detection/yolov8_detection.py#L239-L244
camera_object_detection_node.destroy_node()
rclpy.shutdown()
+
if __name__ == '__main__':
main()
Check failure on line 11 in src/perception/camera_object_detection/launch/sim_launch.py
github-actions / Autopep8
src/perception/camera_object_detection/launch/sim_launch.py#L5-L11
from ament_index_python.packages import get_package_share_directory
import os
import yaml
+
def generate_launch_description():
ld = LaunchDescription()
Check failure on line 11 in src/perception/camera_object_detection/launch/nuscenes_launch.py
github-actions / Autopep8
src/perception/camera_object_detection/launch/nuscenes_launch.py#L5-L11
from ament_index_python.packages import get_package_share_directory
import os
import yaml
+
def generate_launch_description():
ld = LaunchDescription()
Check failure on line 11 in src/perception/camera_object_detection/launch/deepracer_launch.py
github-actions / Autopep8
src/perception/camera_object_detection/launch/deepracer_launch.py#L5-L11
from ament_index_python.packages import get_package_share_directory
import os
import yaml
+
def generate_launch_description():
ld = LaunchDescription()