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: use new srv to capture screen shot and movie #121

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Sep 20, 2024

Description

I added new srv type to capture screen shot or movie by external trigger.

uint8 SCREEN_SHOT = 0
uint8 START_BUFFERING = 1
uint8 STOP_BUFFERING = 2
uint8 RECORD = 3
uint8 SAVE = 4
uint8 SAVE_BUFFER = 5

uint8 action
string file_name

---

bool success

Related links

Tests performed

screen shot

ros2 service call /debug/capture tier4_screen_capture_rviz_plugin/srv/Capture "{action: 0, file_name: "test"}"
movie-2024-09-25_18.53.09.mp4

capture movie

start recording

ros2 service call /debug/capture tier4_screen_capture_rviz_plugin/srv/Capture "{action: 3, file_name: ""}"

save

ros2 service call /debug/capture tier4_screen_capture_rviz_plugin/srv/Capture "{action: 4, file_name: "test-2"}"
movie-2024-09-25_18.53.55.mp4

buffering screen capture

start buffering

ros2 service call /debug/capture tier4_screen_capture_rviz_plugin/srv/Capture "{action: 1, file_name: ""}"

save

ros2 service call /debug/capture tier4_screen_capture_rviz_plugin/srv/Capture "{action: 5, file_name: "buffer"}"
movie-2024-09-25_18.55.12.mp4

Notes for reviewers

Interface changes

Effects on system behavior

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.

Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

The following are the results of the operation check:

  • No issues with operation check from the rviz GUI
  • No issues with operation check by sending service from the terminal
  • After executing START_BUFFERING, no data was saved when SAVE was executed
  • After executing RECORD, no data was saved when SAVE_BUFFER was executed
    Copy

LGTM! Thank you so much for correcting bad implementation fot "buffer" feature

Copy link

@Naophis Naophis left a comment

Choose a reason for hiding this comment

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

LGTM!!

@satoshi-ota
Copy link
Contributor Author

      Start 26: cpplint_rosidl_generated_py

26: Test command: /usr/bin/python3 "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/test_results/tier4_screen_capture_rviz_plugin/cpplint_rosidl_generated_py.xunit.xml" "--package-name" "tier4_screen_capture_rviz_plugin" "--output-file" "/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/ament_cpplint/cpplint_rosidl_generated_py.txt" "--command" "/opt/ros/humble/bin/ament_cpplint" "--xunit-file" "/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/test_results/tier4_screen_capture_rviz_plugin/cpplint_rosidl_generated_py.xunit.xml" "--filters=-readability/fn_size" "--linelength" "999" "--root" "/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py" "/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin"
26: Test timeout computed to be: 120
26: -- run_test.py: invoking following command in '/__w/autoware_tools/autoware_tools/common/tier4_screen_capture_rviz_plugin':
26:  - /opt/ros/humble/bin/ament_cpplint --xunit-file /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/test_results/tier4_screen_capture_rviz_plugin/cpplint_rosidl_generated_py.xunit.xml --filters=-readability/fn_size --linelength 999 --root /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:36:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:38:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:43:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:45:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:178:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:180:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:185:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:187:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:298:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c:306:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:36:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:38:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:43:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:45:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:178:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:180:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:185:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:187:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:298:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c:306:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:36:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:38:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:43:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:45:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:178:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:180:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:185:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:187:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:298:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c:306:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:24:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:53:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:85:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:90:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:101:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:151:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:180:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:197:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:202:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c:213:  Lines should be <= 100 characters long  [whitespace/line_length] [2]
26: Category 'whitespace/line_length' errors found: 40
26: Total errors found: 40
26: Using '--root=/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py' argument
26: 
26: Done processing /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_c.c
26: 
26: Done processing /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_fastrtps_c.c
26: 
26: Done processing /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/_tier4_screen_capture_rviz_plugin_s.ep.rosidl_typesupport_introspection_c.c
26: 
26: Done processing /__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/rosidl_generator_py/tier4_screen_capture_rviz_plugin/srv/_capture_s.c
26: 
26: -- run_test.py: return code 1
26: -- run_test.py: verify result file '/__w/autoware_tools/autoware_tools/build/tier4_screen_capture_rviz_plugin/test_results/tier4_screen_capture_rviz_plugin/cpplint_rosidl_generated_py.xunit.xml'
26/35 Test #26: cpplint_rosidl_generated_py .......................***Failed    0.36 sec

... 🤔

Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: satoshi-ota <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants