byte[] AKA IDL sequence<octet> fields required to be sequence of bytes instances instead of bytes instance
评估
调研方向
从 /home/sloretz/ws/ros2/install/test_msgs/lib/python3.8/site-packages/test_msgs/msg/_unbounded_sequences.py 中生成的 setter 开始,并将其 byte_values 验证与 IDL 设计文档进行比较。复现 issue 中所示的 bytes 赋值,并验证 bytes 实例可以被接受,同时现有的序列形式仍然有效。Pull request #142 已经打开,因此请在开始工作之前检查其状态。
由索引模型根据 Issue 内容生成。
描述
Bug report
Required Info:
- Operating System:
- focal
- Installation type:
- source
- Version or commit hash:
- master
- DDS implementation:
- n/a
- Client library (if applicable):
- rclpy
Steps to reproduce issue
from test_msgs.msg import UnboundedSequences
msg = UnboundedSequences()
msg.byte_values = b'ffff'
Expected behavior
A bytes instance should be accepted, as it is the type documented in the design doc.
http://design.ros2.org/articles/idl_interface_definition.html
Actual behavior
>>> from test_msgs.msg import UnboundedSequences
>>> msg = UnboundedSequences()
>>> msg.byte_values = msg.byte_values = b'ffff'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sloretz/ws/ros2/install/test_msgs/lib/python3.8/site-packages/test_msgs/msg/_unbounded_sequences.py", line 466, in byte_values
assert \
AssertionError: The 'byte_values' field must be a set or sequence and each value of type 'bytes'
It only accepts a sequence of bytes instances
msg.byte_values = (b'ff', b'ff')
Additional information
I noticed while reviewing #129
- 主要语言
- EmberScript
- 星标
- 26
- 派生
- 68
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ros2/rosidl_python 的其他 Issue
-
Eliminate array resetting loop in _msg_support.c.em可能已有人在做 @Lidang-Jiang 于 173 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 72/100
ros2/rosidl_python#255 · 1 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 56/100
ros2/rosidl_python#264 · 2 条评论 ·
-
Message named pkg/Duration with field builtin_interfaces/Duration is invalid可能已有人在做 @Lidang-Jiang 于 173 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 55/100
ros2/rosidl_python#257 · 8 条评论 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 35/100
ros2/rosidl_python#242 ·
-
难度 3/5 1-2 天 新手友好度 32/100
ros2/rosidl_python#219 · 2 条评论 ·
查看 ros2/rosidl_python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
rajbos/ai-engineering-fluency#2490 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area:holodeck review-finding
难度 2/5 1-3 小时 新手友好度 67/100
hyperdrive-technology/holodeck#196 ·
维护者通常 1 天内回复
-
c:pytools c:testsystem
难度 2/5 1-3 小时 新手友好度 66/100
eclipse-sumo/sumo#18384 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复