Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support environment without std::input to stop recording #164

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

iwatake2222
Copy link
Contributor

@iwatake2222 iwatake2222 commented Jan 15, 2024

Description

  • ros2 caret record --immediate option had been introduced for recording without keyboard input. In this case, ctrl-c is expected to stop recording.
  • However, input operation causes exception on environment without standard input, which causes the following errors.
Traceback (most recent call last):
  File "/opt/ros/humble/bin/ros2", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.18.7', 'console_scripts', 'ros2')())
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2cli/cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "/home/takeshiiwanari/ros2_caret_ws/build/ros2caret/ros2caret/command/caret.py", line 32, in main
    return extension.main(args=args)
  File "/home/takeshiiwanari/ros2_caret_ws/build/ros2caret/ros2caret/verb/record.py", line 240, in main
    execute_and_handle_sigint(_run, _fini)
  File "/home/takeshiiwanari/ros2_caret_ws/build/tracetools_trace/tracetools_trace/tools/signals.py", line 114, in execute_and_handle_sigint
    run_function()
  File "/home/takeshiiwanari/ros2_caret_ws/build/ros2caret/ros2caret/verb/record.py", line 222, in _run
    input('press enter to stop...')
EOFError: EOF when reading a line

Related links

TIER IV Internal link

Notes for reviewers

Command to test

ros2 caret record --immediate < /dev/null

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR has been properly tested.
  • The PR has been reviewed.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: takeshi.iwanari <[email protected]>
@iwatake2222 iwatake2222 requested a review from ymski January 15, 2024 06:14
@isp-uetsuki isp-uetsuki requested a review from xygyo77 January 15, 2024 06:27
Copy link
Contributor

@ymski ymski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@xygyo77 xygyo77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iwatake2222 iwatake2222 merged commit 48c034f into main Jan 15, 2024
11 checks passed
@iwatake2222 iwatake2222 deleted the fix_no_std_input branch January 15, 2024 07:55
@iwatake2222 iwatake2222 restored the fix_no_std_input branch January 15, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants