XML launch `<include>` can pass implicit arguments
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với tài liệu XML của ROS2 launch và tái hiện các ví dụ parent.launch.xml và child.launch.xml được cung cấp bằng ros2 launch. Theo dõi cách các phần tử include và arg xử lý một đối số của tiến trình con chưa được khai báo, sau đó xác định xem hành vi này có phải là chủ ý hay không và ghi lại hoặc sửa nó để kết quả mong đợi được nêu rõ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The ROS2 launch XML format documentation (http://design.ros2.org/articles/roslaunch_xml.html) states that:
<arg>Tag
The tag allows for launch file configuration via the command-line or when including it via an tag. Arguments are launch configuration variables just like the ones defined by tags. Arguments are limited to the scope of their definition and thus have to be explictly passed to included files if any.
If I understand the documentation correctly, if a launch file includes another with the <include> tag, the <arg> parameters are not passed to the other launch file implicitly.
So for example, with these 2 files:
<!-- parent.launch.xml -->
<launch>
<arg name="foo" default="there!"/>
<include file="child.launch.xml"/>
</launch>
<!-- child.launch.xml -->
<launch>
<arg name="foo"/>
<executable cmd="echo Hello $(var foo)" output="screen" shell="true" />
</launch>
We get an error if we try to launch the parent.launch.xml, because foo is not set for the included file:
$ ros2 launch parent.launch.xml
[INFO] [launch]: All log files can be found below /home/sig/.ros/log/2023-01-20-01-08-28-929056-vr-desktop-1016
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Included launch description missing required argument 'foo' (description: 'no description given'), given: []
So far so good.
However, if we change the child launch file to:
<!-- child.launch.xml -->
<launch>
<!-- <arg name="foo"/> -->
<executable cmd="echo Hello $(var foo)" output="screen" shell="true" />
</launch>
Then, not only no error occurs, but the argument is passed to the child launch file:
$ ros2 launch parent.launch.xml
[INFO] [launch]: All log files can be found below /home/sig/.ros/log/2023-01-20-01-08-16-842624-vr-desktop-961
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [echo-1]: process started with pid [972]
[INFO] [echo-1]: process has finished cleanly [pid 972]
[echo-1] Hello there!
Is it a bug? an undocumented feature?
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04 (galactic) and 22.04 (humble)
- Installation type:
- binary
- Version or commit hash:
- N/A
- DDS implementation:
- N/A?
- Client library (if applicable):
- N/A
Steps to reproduce issue
Run ros2 launch parent.launch.xml with:
<!-- parent.launch.xml -->
<launch>
<arg name="foo" default="there!"/>
<include file="child.launch.xml"/>
</launch>
<!-- child.launch.xml -->
<launch>
<!-- <arg name="foo"/> -->
<executable cmd="echo Hello $(var foo)" output="screen" shell="true" />
</launch>
Expected behavior
Error because foo is undefined?
Actual behavior
The command outputs [echo-1] Hello there!, so not only foo is defined, but it is also passed implicitely from the parent file.
Additional information
- Ngôn ngữ chính
- Python
- Star
- 156
- Fork
- 200
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ros2/launch
-
Use a relative target for the `latest` log symlink so it survives different absolute mount paths (host/Docker)Có thể đã có người làm @Old-Ding đã nhận 139 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ros2/launch#978 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add OpaqueFunction to list at docs.ros.orgCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ros2/launch#826 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[launch_testing] pytest>8.1 dropped the legacy "path" argument from its internal hooks on humbleCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
ros2/launch#979 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gke-labs/kube-agents#7441 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
issue: a reply cut off by a dropped model connection loses its text when the chat is reloadedĐang mởbug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-webui/open-webui#35142 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày