Skip to content

Commit

Permalink
Fix data merge worker test (#164)
Browse files Browse the repository at this point in the history
* Add detection in simulated detect target

* Revert formatting change

* Submodule update
  • Loading branch information
Xierumeng authored Feb 18, 2024
1 parent f7acbeb commit 5783995
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/common
Submodule common updated 46 files
+44 −0 .github/workflows/run-tests.yml
+0 −33 .gitignore
+0 −0 camera/__init__.py
+6 −3 camera/test_camera.py
+0 −51 comms/TelemMessages/GroundStation.lcm
+0 −24 comms/TelemMessages/common.lcm
+0 −25 comms/TelemMessages/jetson.lcm
+0 −60 comms/TelemMessages/messages.json
+0 −31 comms/Tools/build_messages.sh
+0 −10 comms/Tools/install_lcm.sh
+0 −12 comms/Tools/list_usb.sh
+0 −15 comms/Tools/message_include.sh
+0 −187 comms/Tools/py_gen_helpers.py
+0 −86 comms/modules/TelemMessages/GroundStationData.py
+0 −74 comms/modules/TelemMessages/GroundStationDisarm.py
+0 −80 comms/modules/TelemMessages/GroundStationPIDSetResponse.py
+0 −81 comms/modules/TelemMessages/GroundStationPIDValues.py
+0 −83 comms/modules/TelemMessages/GroundStationWaypoints.py
+0 −70 comms/modules/TelemMessages/Header.py
+0 −74 comms/modules/TelemMessages/JetsonLandingInitiationCommand.py
+0 −74 comms/modules/TelemMessages/JetsonMovementRequest.py
+0 −77 comms/modules/TelemMessages/JetsonOdometryData.py
+0 −78 comms/modules/TelemMessages/JetsonRelativeMovementCommand.py
+0 −71 comms/modules/TelemMessages/PIDController.py
+0 −66 comms/modules/TelemMessages/PIDValues.py
+0 −77 comms/modules/TelemMessages/SensorData.py
+0 −67 comms/modules/TelemMessages/Waypoint.py
+0 −19 comms/modules/TelemMessages/__init__.py
+0 −89 comms/modules/generic_comms_device.py
+0 −61 comms/modules/helper.py
+0 −21 comms/receive.py
+0 −28 comms/test_tx.py
+0 −19 comms/transmit.py
+0 −0 kml/__init__.py
+3 −3 kml/expected_document.kml
+50 −0 kml/modules/ground_locations_to_kml.py
+54 −0 kml/modules/location_ground.py
+0 −45 kml/modules/waypoints_to_kml.py
+55 −0 kml/test_ground_locations_to_kml.py
+0 −45 kml/test_waypoints_to_kml.py
+0 −0 mavlink/__init__.py
+96 −0 mavlink/modules/flight_controller.py
+10 −1 mavlink/test_flight_controller.py
+140 −0 mavlink/test_mission_ended.py
+0 −0 qr/__init__.py
+11 −8 qr/test_qr.py
14 changes: 14 additions & 0 deletions tests/test_data_merge_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import multiprocessing as mp
import time

import numpy as np

from modules import drone_odometry_local
from modules import detections_and_time
from modules import merged_odometry_detections
Expand All @@ -24,8 +26,20 @@ def simulate_detect_target_worker(timestamp: float,
result, detections = detections_and_time.DetectionsAndTime.create(timestamp)
assert result
assert detections is not None

result, detection = detections_and_time.Detection.create(
np.array([0.0, 0.0, 1.0, 1.0]),
0,
1.0,
)
assert result
assert detection is not None

detections.append(detection)

detections_queue.queue.put(detections)


def simulate_flight_input_worker(timestamp: float,
odometry_queue: queue_proxy_wrapper.QueueProxyWrapper):
"""
Expand Down

0 comments on commit 5783995

Please sign in to comment.