Add --timeout alias to ros2 topic pub and ros2 param list
Maintainers usually reply within 1 day
@1cbyc is already working on this.
Since Sep 24, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 92/100
Research direction
Start by reading argument definitions in ros2topic/ros2topic/verb/pub.py and ros2param/ros2param/verb/list.py, then inspect the existing tests in ros2topic/test/ and ros2param/test/test_verb_list.py. Run the relevant verb tests and add coverage showing that --timeout sets the existing destination attributes. Done means both commands accept the alias while preserving their current option names and behavior.
Written by the indexing model from the issue text.
Description
Most ros2cli commands use --timeout to specify a maximum wait time in seconds, but ros2 topic pub uses --max-wait-time-secs and ros2 param list only accepts --service-timeout.
Modify the following files to accept --timeout as an alias:
ros2topic/ros2topic/verb/pub.pyros2param/ros2param/verb/list.py
Example: How to add the alias
Keep the existing option name first (so the args attribute name stays the same) and add '--timeout':
# Before (in ros2topic/ros2topic/verb/pub.py):
parser.add_argument(
'--max-wait-time-secs',
dest='max_wait_time_secs', type=positive_float, default=None,
help=...)
# After:
parser.add_argument(
'--max-wait-time-secs', '--timeout',
dest='max_wait_time_secs', type=positive_float, default=None,
help=...)
Example: How to add a test
Add a test in ros2topic/test/ (and ros2param/test/test_verb_list.py) to check that --timeout sets the expected attribute:
import argparse
from ros2topic.verb.pub import PubVerb
def test_pub_timeout_alias():
parser = argparse.ArgumentParser()
verb = PubVerb()
verb.add_arguments(parser, 'ros2 topic pub')
args = parser.parse_args(['/chatter', 'std_msgs/msg/String', '--timeout', '2.5'])
assert args.max_wait_time_secs == 2.5
- Dominant language
- Python
- Stars
- 274
- Forks
- 246
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/ros2cli
-
ros2 CLI prints BrokenPipeError traceback when output is piped to a command that exits early (e.g. head)May be free again @akshat-lakhera claimed this 38 days ago, and no pull request is open. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
ros2/ros2cli#1342 · 2 comments ·
Maintainers usually reply within 1 day
-
ros2doctor: UserWarning: Fail to call PackageReport/RosdistroReport class functions.Possibly taken @sujanchalla0510 claimed this 13 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Add --all alias to commands that include hidden nodes, topics, or servicesPossibly taken @Rajat-Arora claimed this 62 days ago. Opengood first issue
Difficulty 3/5 1-2 days Newbie friendliness 78/100
ros2/ros2cli#1302 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
ros2run python script without extension .py fails on windows + pixiMay be free again A pull request for this issue was closed without being merged. Openbug more-information-needed
Difficulty 3/5 1-2 days Newbie friendliness 68/100
ros2/ros2cli#1301 · 1 comment ·
Maintainers usually reply within 1 day
-
extend `ros2 topic info -v` with buffer-backend fieldPossibly taken @fujitatomoya claimed this 161 days ago. Openenhancement
ros2/ros2cli#1245 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7441 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-webui/open-webui#35142 · 1 comment ·
Maintainers usually reply within 1 day