Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Feb 10, 2024
1 parent ff64521 commit 5ad0aef
Show file tree
Hide file tree
Showing 60 changed files with 149 additions and 458 deletions.
4 changes: 1 addition & 3 deletions src/pi/camera_streamer/launch/camera_launch.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""camera_streamer launch file."""

from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description import LaunchDescription
from launch_ros.actions import Node


Expand Down
4 changes: 1 addition & 3 deletions src/pi/camera_streamer/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
8 changes: 2 additions & 6 deletions src/pi/heartbeat/heartbeat/heartbeat_node.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import rclpy
from rclpy.executors import (
MultiThreadedExecutor,
)
from rclpy.executors import MultiThreadedExecutor
from rclpy.node import Node
from rclpy.qos import (
qos_profile_system_default,
)
from rclpy.qos import qos_profile_system_default

from rov_msgs.msg import Heartbeat

Expand Down
4 changes: 1 addition & 3 deletions src/pi/heartbeat/launch/heartbeat_launch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description import LaunchDescription
from launch_ros.actions import Node


Expand Down
5 changes: 1 addition & 4 deletions src/pi/heartbeat/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import os
from glob import glob

from setuptools import (
find_packages,
setup,
)
from setuptools import find_packages, setup

PACKAGE_NAME = "heartbeat"

Expand Down
4 changes: 1 addition & 3 deletions src/pi/heartbeat/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
4 changes: 1 addition & 3 deletions src/pi/manipulators/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
22 changes: 5 additions & 17 deletions src/pi/pi_main/launch/pi_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,11 @@

import os

from ament_index_python.packages import (
get_package_share_directory,
)
from launch.actions import (
GroupAction,
IncludeLaunchDescription,
)
from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description_sources import (
PythonLaunchDescriptionSource,
)
from launch_ros.actions import (
Node,
PushRosNamespace,
)
from ament_index_python.packages import get_package_share_directory
from launch.actions import GroupAction, IncludeLaunchDescription
from launch.launch_description import LaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node, PushRosNamespace


def generate_launch_description() -> LaunchDescription:
Expand Down
4 changes: 1 addition & 3 deletions src/pi/pi_main/pi_main/ip_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

import rclpy
from rclpy.node import Node
from rclpy.qos import (
qos_profile_system_default,
)
from rclpy.qos import qos_profile_system_default

from rov_msgs.msg import IPAddress

Expand Down
4 changes: 1 addition & 3 deletions src/pi/pi_main/pi_main/run_on_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import subprocess # nosec
import sys

from ament_index_python.packages import (
get_package_share_directory,
)
from ament_index_python.packages import get_package_share_directory
from robot_upstart.job import Job


Expand Down
4 changes: 1 addition & 3 deletions src/pi/pi_main/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
4 changes: 1 addition & 3 deletions src/pi/pixhawk_communication/launch/mavros_launch.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""mavros_launch launch file."""

from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description import LaunchDescription
from launch_ros.actions import Node


Expand Down
4 changes: 1 addition & 3 deletions src/pi/pixhawk_communication/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
17 changes: 4 additions & 13 deletions src/pi/realsense/launch/realsense_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@

import os

from ament_index_python.packages import (
get_package_share_directory,
)
from launch.actions import (
GroupAction,
IncludeLaunchDescription,
)
from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description_sources import (
PythonLaunchDescriptionSource,
)
from ament_index_python.packages import get_package_share_directory
from launch.actions import GroupAction, IncludeLaunchDescription
from launch.launch_description import LaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import SetRemap


Expand Down
4 changes: 1 addition & 3 deletions src/pi/realsense/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import rclpy
from rclpy.executors import (
MultiThreadedExecutor,
)
from rclpy.executors import MultiThreadedExecutor
from rclpy.node import Node

from rov_msgs.srv import (
AutonomousFlight,
)
from rov_msgs.srv import AutonomousFlight


class AutoDocker(Node):
Expand Down
14 changes: 3 additions & 11 deletions src/surface/flight_control/flight_control/keyboard_control_node.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
from typing import Optional

import rclpy.utilities
from flight_control.pixhawk_instruction import (
PixhawkInstruction,
)
from flight_control.pixhawk_instruction import PixhawkInstruction
from mavros_msgs.msg import OverrideRCIn
from pynput.keyboard import (
Key,
KeyCode,
Listener,
)
from pynput.keyboard import Key, KeyCode, Listener
from rclpy.node import Node
from rclpy.publisher import Publisher
from rclpy.qos import (
qos_profile_system_default,
)
from rclpy.qos import qos_profile_system_default

# key bindings
FORWARD = "w"
Expand Down
26 changes: 6 additions & 20 deletions src/surface/flight_control/flight_control/manual_control_node.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
from collections.abc import (
MutableSequence,
)
from collections.abc import MutableSequence

import rclpy
from flight_control.pixhawk_instruction import (
PixhawkInstruction,
)
from flight_control.pixhawk_instruction import PixhawkInstruction
from mavros_msgs.msg import OverrideRCIn
from rclpy.executors import (
MultiThreadedExecutor,
)
from rclpy.executors import MultiThreadedExecutor
from rclpy.node import Node
from rclpy.publisher import Publisher
from rclpy.qos import (
qos_profile_sensor_data,
qos_profile_system_default,
)
from rclpy.subscription import (
Subscription,
)
from rclpy.qos import qos_profile_sensor_data, qos_profile_system_default
from rclpy.subscription import Subscription
from sensor_msgs.msg import Joy

from rov_msgs.msg import (
CameraControllerSwitch,
Manip,
)
from rov_msgs.msg import CameraControllerSwitch, Manip

# Button meanings for PS5 Control might be different for others
X_BUTTON: int = 0 # Manipulator 0
Expand Down
4 changes: 1 addition & 3 deletions src/surface/flight_control/launch/flight_control_launch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from launch.launch_description import (
LaunchDescription,
)
from launch.launch_description import LaunchDescription
from launch_ros.actions import Node


Expand Down
9 changes: 2 additions & 7 deletions src/surface/flight_control/launch/keyboard_control_launch.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
from launch.actions import GroupAction
from launch.launch_description import (
LaunchDescription,
)
from launch_ros.actions import (
Node,
PushRosNamespace,
)
from launch.launch_description import LaunchDescription
from launch_ros.actions import Node, PushRosNamespace


def generate_launch_description() -> LaunchDescription:
Expand Down
4 changes: 1 addition & 3 deletions src/surface/flight_control/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# limitations under the License.

import pytest
from ament_flake8.main import (
main_with_errors,
)
from ament_flake8.main import main_with_errors


@pytest.mark.flake8
Expand Down
4 changes: 1 addition & 3 deletions src/surface/flight_control/test/test_keyboard_control.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import pytest
import rclpy
from flight_control.keyboard_control_node import (
KeyboardListenerNode,
)
from flight_control.keyboard_control_node import KeyboardListenerNode


@pytest.fixture
Expand Down
4 changes: 1 addition & 3 deletions src/surface/flight_control/test/test_manual_control.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import rclpy
from flight_control.manual_control_node import (
ManualControlNode,
)
from flight_control.manual_control_node import ManualControlNode
from flight_control.pixhawk_instruction import (
FORWARD_CHANNEL,
LATERAL_CHANNEL,
Expand Down
9 changes: 2 additions & 7 deletions src/surface/gui/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@

import qdarktheme
import rclpy.utilities
from ament_index_python.packages import (
get_package_share_directory,
)
from PyQt6.QtWidgets import (
QApplication,
QWidget,
)
from ament_index_python.packages import get_package_share_directory
from PyQt6.QtWidgets import QApplication, QWidget
from rclpy.node import Node


Expand Down
6 changes: 1 addition & 5 deletions src/surface/gui/gui/event_nodes/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

import rclpy
from PyQt6.QtCore import pyqtBoundSignal
from rclpy.client import (
Client,
SrvType,
SrvTypeRequest,
)
from rclpy.client import Client, SrvType, SrvTypeRequest
from rclpy.node import Node


Expand Down
5 changes: 1 addition & 4 deletions src/surface/gui/gui/event_nodes/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

from rclpy.node import Node
from rclpy.publisher import MsgType
from rclpy.qos import (
QoSProfile,
qos_profile_system_default,
)
from rclpy.qos import QoSProfile, qos_profile_system_default


class GUIEventPublisher(Node):
Expand Down
11 changes: 2 additions & 9 deletions src/surface/gui/gui/event_nodes/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
from threading import Thread
from typing import Callable

from rclpy.executors import (
SingleThreadedExecutor,
)
from rclpy.executors import SingleThreadedExecutor
from rclpy.node import Node
from rclpy.service import (
Service,
SrvType,
SrvTypeRequest,
SrvTypeResponse,
)
from rclpy.service import Service, SrvType, SrvTypeRequest, SrvTypeResponse


class GUIEventServer(Node):
Expand Down
9 changes: 2 additions & 7 deletions src/surface/gui/gui/event_nodes/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
from threading import Thread

from PyQt6.QtCore import pyqtBoundSignal
from rclpy.executors import (
SingleThreadedExecutor,
)
from rclpy.executors import SingleThreadedExecutor
from rclpy.node import Node
from rclpy.qos import (
QoSProfile,
qos_profile_system_default,
)
from rclpy.qos import QoSProfile, qos_profile_system_default
from rclpy.subscription import MsgType


Expand Down
Loading

0 comments on commit 5ad0aef

Please sign in to comment.