Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

byte[] AKA IDL sequence<octet> fields required to be sequence of bytes instances instead of bytes instance

オープン
#134 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る

@aprotyas がすでに取り組んでいます。

2021年8月27日 から。

  • #142 @aprotyas による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
tooling

調査の方向性

/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 の本文から書いたものです。

説明

backlog bug

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時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ros2/rosidl_python のほかの issue

ros2/rosidl_python の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。