New publisher discovered on topic 'zed/right/image_rect_color', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY
I am trying to get the image from my zed camera but I keep countering this problem
[WARN] [1642368218.939085940] [bounding_box_node]: New publisher discovered on topic 'zed/right/image_rect_color', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY
Traceback (most recent call last):
File "/home/shenowlshoot/eufs-master/install/simulate_bounding_boxes/lib/simulate_bounding_boxes/bounding_box", line 11, in <module>
load_entry_point('simulate-bounding-boxes==0.0.0', 'console_scripts', 'bounding_box')()
File "/home/shenowlshoot/eufs-master/install/simulate_bounding_boxes/lib/python3.8/site-packages/simulate_bounding_boxes/draw_boundary_box.py", line 70, in main
rclpy.spin_once(draw_boundary_box_node)
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/__init__.py", line 176, in spin_once
executor.spin_once(timeout_sec=timeout_sec)
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 707, in spin_once
raise handler.exception()
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/task.py", line 239, in __call__
self._handler.send(None)
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 415, in handler
await call_coroutine(entity, arg)
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 340, in _execute_subscription
await await_or_execute(sub.callback, msg)
File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 107, in await_or_execute
return callback(*args)
File "/opt/ros/galactic/lib/python3.8/site-packages/message_filters/__init__.py", line 83, in callback
self.signalMessage(msg)
File "/opt/ros/galactic/lib/python3.8/site-packages/message_filters/__init__.py", line 64, in signalMessage
cb(*(msg + args))
File "/opt/ros/galactic/lib/python3.8/site-packages/message_filters/__init__.py", line 230, in add
while len(my_queue) > self.queue_size:
TypeError: '>' not supported between instances of 'int' and 'QoSProfile'
I have been trying to override my zed's camera QoS but nothing is working. It keeps on giving me the error above.
- I also have no idea what that
TypeError
means and I cant seem to find anything about it online.
- I also have no idea what that
Here is my script that I am trying to implement:
#!/usr/bin/env python
import rclpy
import time
import cv2
import message_filters
from cv_bridge import CvBridge, CvBridgeError
from rclpy.qos import qos_profile_sensor_data, QoSProfile
from rclpy.node import Node
from sensor_msgs.msg import Image, CameraInfo
from image_geometry import PinholeCameraModel
from eufs_msgs.msg import BoundingBoxes
class DrawBoundingBox():
def __init__(self):
self.camera_image_topic = 'zed/right/image_rect_color'
qos_profile = QoSProfile(reliability=rclpy.qos.ReliabilityPolicy.BEST_EFFORT,
history=rclpy.qos.HistoryPolicy.KEEP_LAST,
depth=5)
self.bridge = CvBridge()
self.image_sub = message_filters.Subscriber(
draw_boundary_box_node,
Image,
self.camera_image_topic)
self.bounding_box_sub = message_filters.Subscriber(
draw_boundary_box_node,
BoundingBoxes,
'/simulate_bounding_boxes')
sync_ = message_filters.TimeSynchronizer([self.image_sub, self.bounding_box_sub], qos_profile)
sync_.registerCallback(self.image_callback)
def image_callback(self, image_msg, bounding_box_msg):
# Solve perception here
pass
def main(args=None):
global draw_boundary_box_node
rclpy.init(args=args)
draw_boundary_box_node = rclpy.create_node('bounding_box_node')
draw_bounding_box = DrawBoundingBox()
try:
while rclpy.ok():
rclpy.spin_once(draw_boundary_box_node)
except KeyboardInterrupt:
pass
draw_bounding_box.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()
I have read this documentation here, but it seems that it is only for rclcpp and I cant find anything like get_rmw_qos_profile()
for rclpy