add Example of using demo recording to rosbag
This commit is contained in:
parent
2399293e01
commit
8d83e3d708
2 changed files with 21 additions and 1 deletions
|
@ -37,6 +37,7 @@ ament_python_install_package(${PROJECT_NAME})
|
|||
install(PROGRAMS
|
||||
scripts/assembly_config_service.py
|
||||
scripts/recording_demo_via_rosbag.py
|
||||
scripts/example_recording_demo.py
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
|
@ -46,7 +47,7 @@ install(PROGRAMS
|
|||
# )
|
||||
|
||||
install(
|
||||
DIRECTORY launch
|
||||
DIRECTORY launch config
|
||||
DESTINATION share/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
|
|
19
rbs_utils/rbs_utils/scripts/example_recording_demo.py
Normal file
19
rbs_utils/rbs_utils/scripts/example_recording_demo.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Example of using demo recording to rosbag
|
||||
```bash
|
||||
ros2 run rbs_utils example_recording_demo.py
|
||||
|
||||
@shalenikol release 0.1
|
||||
"""
|
||||
from rbs_utils.recording_demo import recording_demo, CommandType
|
||||
|
||||
if __name__ == '__main__':
|
||||
res = recording_demo() # default: CommandType.RUN
|
||||
print(f"{res=}")
|
||||
res = recording_demo(CommandType.SAVE_AND_NEXT)
|
||||
print(f"{res=}")
|
||||
res = recording_demo(CommandType.CANCEL_AND_NEXT)
|
||||
print(f"{res=}")
|
||||
res = recording_demo(CommandType.STOP_AND_SAVE)
|
||||
print(f"{res=}")
|
Loading…
Add table
Add a link
Reference in a new issue