Skip to content

Commit

Permalink
Use reliable QoS in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotochleb committed Oct 30, 2024
1 parent 0a0e77a commit 9029eb0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions happypose_ros/test/happypose_testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from rclpy.node import Node
from rclpy.parameter import Parameter
from rclpy.time import Time
from rclpy.qos import DurabilityPolicy, HistoryPolicy, QoSProfile
from rclpy.qos import DurabilityPolicy, HistoryPolicy, ReliabilityPolicy, QoSProfile

from tf2_ros.buffer import Buffer
from tf2_ros.transform_listener import TransformListener
Expand Down Expand Up @@ -91,6 +91,12 @@ def __init__(

self._tested_node_name = tested_node_name

reliable_qos = QoSProfile(
reliability=ReliabilityPolicy.RELIABLE,
depth=10,
history=HistoryPolicy.KEEP_ALL,
)

# Create dict with camera topic publishers
self._cam_pubs = {
cam[0]: (
Expand All @@ -102,12 +108,12 @@ def __init__(
if isinstance(cam[1], Metaclass_Image)
else f"{cam[0]}/image_raw/compressed"
),
10,
qos_profile=reliable_qos,
),
self.create_publisher(
CameraInfo,
(f"{cam[0]}/camera_info"),
10,
qos_profile=reliable_qos,
),
)
for cam in cameras
Expand Down

0 comments on commit 9029eb0

Please sign in to comment.