8000 feat(echo --clear): add --clear option to echo by Guillaumebeuzeboc · Pull Request #819 · ros2/ros2cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

feat(echo --clear): add --clear option to echo #819

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

Guillaumebeuzeboc
Copy link
Contributor
@Guillaumebeuzeboc Guillaumebeuzeboc commented Apr 11, 2023

Adds the --clear/-c option to echo.

Solves this issue: #725

This was previously available in ROS.

This clears the screen before a new message is displayed.

ESC[2J corresponds to erase entire screen
ESC[H corresponds to moves cursor to home position (0, 0)

I had to build rolling from source to successfully run the tests

Copy link
Collaborator
@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

ros2topic/ros2topic/verb/echo.py Outdated Show resolved Hide resolved
8000
@Guillaumebeuzeboc
Copy link
Contributor Author

implementation looks good to me but many tests are failing.

could you address the following failures?

https://build.ros2.org/job/Rpr__ros2cli__ubuntu_jammy_amd64/238/testReport/ros2topic.ros2topic.test/test_cli/test_cli/

https://build.ros2.org/job/Rpr__ros2cli__ubuntu_jammy_amd64/238/testReport/ros2topic.ros2topic.test/test_echo_pub/test_echo_pub/

I had the same failure with the HEAD of rolling for this repo. I had to rebuild all rolling from source for them to pass.
I believe the CI is using the debians of rolling right? I pulled all the repo from HEAD.

@clalancette
Copy link
Contributor

I believe the CI is using the debians of rolling right?

Yes, that's correct, though as of yesterday, they are the same thing. That said, these tests have indeed been flaky here for a while, and we haven't had time to track it down. So I wouldn't worry about those two in particular right now.

@clalancette clalancette added more-information-needed Further information is required requires-changes labels Apr 20, 2023
@ahemwe
Copy link
ahemwe commented Jun 29, 2023

Does that PR require further changes?

@clalancette
Copy link
Contributor

Does that PR require further changes?

Yes, we need to come to a conclusion on this discussion.

< 8000 /div>

Guillaumebeuzeboc and others added 2 commits October 10, 2024 18:34
Signed-off-by: Guillaumebeuzeboc <guillaume.beuzeboc@gmail.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Collaborator
fujitatomoya commented Oct 11, 2024

Pulls: #819
Gist: https://gist.githubusercontent.com/fujitatomoya/c7569c301740a3cb51951715927637b3/raw/ece81984450ed3dd68f812e402c55ef6353b55d4/ros2.repos
BUILD args: --packages-above-and-dependencies ros2topic
TEST args: --packages-above ros2topic
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14693

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@fujitatomoya
Copy link
Collaborator

Okay the CI is failing with the following error. (my local environment which does have the terminal environment, there is no problem)

https://ci.ros2.org/job/ci_linux/21981/testReport/junit/ros2topic.ros2topic.test/test_cli/test_cli/

Traceback (most recent call last):
  File "/home/jenkins-agent/workspace/ci_linux/ws/install/launch_testing/lib/python3.12/site-packages/launch_testing/markers.py", line 61, in _wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jenkins-agent/workspace/ci_linux/ws/src/Guillaumebeuzeboc/ros2cli/ros2topic/test/test_cli.py", line 411, in test_topic_echo_clear
    assert topic_command.wait_for_output(functools.partial(
AssertionError: Output does not match: 'unknown': unknown terminal type.
  data: 'Hello World: 78'
  ---
  'unknown': unknown terminal type.
  data: 'Hello World: 79'
  ---

I think we need to check if the terminal environmental variable is there with checking TERM for unix system. but i am not sure how we can do that with Windows... any thoughts?

ros2topic/ros2topic/verb/echo.py Outdated Show resolved Hide resolved
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Collaborator

I ended up not having the test case for this because of #819 (comment) and checking the escape sequence generates unterminated error during check.

@fujitatomoya
Copy link
Collaborator

Pulls: #819
Gist: https://gist.githubusercontent.com/fujitatomoya/e3ceab25625387dd621a69ef49e4acc2/raw/ece81984450ed3dd68f812e402c55ef6353b55d4/ros2.repos
BUILD args: --packages-above-and-dependencies ros2topic
TEST args: --packages-above ros2topic
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14770

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@fujitatomoya fujitatomoya merged commit fce8ae7 into ros2:rolling Nov 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required requires-changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0