Skip to content

Commit a53d47f

Browse files
authored
fix: ROS 2 color space (#708)
1 parent fc9a709 commit a53d47f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/rai_core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "rai_core"
7-
version = "2.5.3"
7+
version = "2.5.4"
88
description = "Core functionality for RAI framework"
99
authors = ["Maciej Majek <maciej.majek@robotec.ai>", "Bartłomiej Boczek <bartlomiej.boczek@robotec.ai>", "Kajetan Rachwał <kajetan.rachwal@robotec.ai>"]
1010
readme = "README.md"

src/rai_core/rai/messages/conversion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def preprocess_image(
6868
- All inputs are decoded and re-encoded to PNG to guarantee consistent output.
6969
- Float arrays are assumed to be in [0, 1] and are scaled to ``uint8``.
7070
- Network requests use a timeout of ``(5, 15)`` seconds (connect, read).
71+
- Supported color space: rgb
7172
7273
Examples
7374
--------

src/rai_core/rai/tools/ros2/generic/topics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def _run(
137137
msg_type = type(message.payload)
138138
if msg_type == Image:
139139
image = CvBridge().imgmsg_to_cv2( # type: ignore
140-
message.payload, desired_encoding="bgr8"
140+
message.payload, desired_encoding="rgb8"
141141
)
142142
elif msg_type == CompressedImage:
143143
image = CvBridge().compressed_imgmsg_to_cv2( # type: ignore
144-
message.payload, desired_encoding="bgr8"
144+
message.payload, desired_encoding="rgb8"
145145
)
146146
else:
147147
raise ValueError(

0 commit comments

Comments
 (0)