Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vision qos policy #362

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@ RUN apt-get install -y \
ros-iron-camera-calibration \
ros-iron-desktop \
ros-iron-joint-state-publisher-gui \
# ros-iron-plotjuggler-ros containing plotjuggler ros plugins
# build currently fails and is not available as a package so we
# have to manually install plotjuggler and plotjuggler-msgs
# https://github.com/PlotJuggler/plotjuggler-ros-plugins/issues/59
ros-iron-plotjuggler \
ros-iron-plotjuggler-msgs \
ros-iron-plotjuggler-ros \
ros-iron-rmw-cyclonedds-cpp \
ros-iron-rqt-robot-monitor \
ros-iron-soccer-vision-3d-rviz-markers
Expand Down
10 changes: 9 additions & 1 deletion bitbots_vision/bitbots_vision/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from cv_bridge import CvBridge
from rcl_interfaces.msg import SetParametersResult
from rclpy.node import Node
from rclpy.qos import qos_profile_sensor_data
from sensor_msgs.msg import Image

from bitbots_vision.vision_modules import ros_utils, yoeo
Expand Down Expand Up @@ -125,7 +126,14 @@ def _set_up_vision_components(self, new_config: Dict) -> None:

def _register_subscribers(self, config: Dict) -> None:
self._sub_image = ros_utils.create_or_update_subscriber(
self, self._config, config, self._sub_image, "ROS_img_msg_topic", Image, callback=self._image_callback
self,
self._config,
config,
self._sub_image,
"ROS_img_msg_topic",
Image,
callback=self._image_callback,
qos_profile=qos_profile_sensor_data,
)

def _image_callback(self, image_msg: Image) -> None:
Expand Down
Loading