SROS2 test failed by following the latest doc
The performance_test is installed on Ubuntu 20.04 with foxy build ROS2. A sample run has no problem:
ros2 run performance_test perf_test -c ROS2 --msg Array1k --max_runtime 30
Experiment id: 180196a8-1e66-45c5-ade9-6aa841e26142
Performance Test Version: e8a516a
Logfile name:
Communication mean: ROS2
RMW Implementation: rmw_fastrtps_cpp
DDS domain id: 0
QOS: Reliability: BEST_EFFORT Durability: VOLATILE History kind: KEEP_ALL History depth: 1000 Sync. pub/sub: 0
Publishing rate: 1000
Topic name: test_topic
Msg name: Array1k
Maximum runtime (sec): 30
Number of publishers: 1
Number of subscribers: 1
Memory check enabled: 0
Use single participant: 0
With security: 0
Zero copy transfer: 0
Roundtrip Mode: NONE
Ignore seconds from beginning: 0
---EXPERIMENT-START---
T_experiment, T_loop, received, sent, lost, relative_loss, data_received, latency_min (ms), latency_max (ms), latency_mean (ms), latency_variance (ms), pub_loop_res_min (ms), pub_loop_res_max (ms), pub_loop_res_mean (ms), pub_loop_res_variance (ms), sub_loop_res_min (ms), sub_loop_res_max (ms), sub_loop_res_mean (ms), sub_loop_res_variance (ms), ru_utime, ru_stime, ru_maxrss, ru_ixrss, ru_idrss, ru_isrss, ru_minflt, ru_majflt, ru_nswap, ru_inblock, ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, ru_nvcsw, ru_nivcsw, cpu_usage (%),
1.002900, 1.002898, 999, 1000, 3, 0.00, 1039584, 0.01355, 1.888, 0.0498, 6.574e-06,-0.5569, 0.9737, 0.5934, 4.61e-05, 0, 0, 0, 0, 0.05184, 0.03456, 21800, 0,0, 0, 2250, 0, 0, 0, 0, 0, 0, 0, 5220, 2812, -6.345e-06,
^C[INFO] [1623894872.077100355] [rclcpp]: signal_handler(signal_value=2)
1.364152, 0.361182, 997, 1001, 0, 0.00, 1037583, 0.02239, 0.9334, 0.04179, 4.922e-06, -2.099, 0.9476, 0.5238, 7.075e-05, 0, 0, 0, 0, 0.1701, 0.03456, 21888, 0, 0, 0, 2258, 0, 0, 0, 8, 0, 0, 0, 6808, 3770, 16.61,
......
Tried to enable SROS by following https://gitlab.com/ApexAI/performance_test/-/blob/foxy/SECURITY_DEMO.md, the keystore is generated correctly. However the following error is observed when executing the script.
$ ros2 run performance_test perf_test -c ROS2 --msg Array1k --max_runtime 30 --with_security
[INFO] [1623895713.204636987] [rcl]: Found security directory: /home/gelei/demo_keys/enclaves
Experiment id: 6c4e4c9c-11df-450d-9e39-c2f719e26bb2
Performance Test Version: e8a516a
Logfile name:
Communication mean: ROS2
RMW Implementation: rmw_fastrtps_cpp
DDS domain id: 0
QOS: Reliability: BEST_EFFORT Durability: VOLATILE History kind: KEEP_ALL History depth: 1000 Sync. pub/sub: 0
Publishing rate: 1000
Topic name: test_topic
Msg name: Array1k
Maximum runtime (sec): 30
Number of publishers: 1
Number of subscribers: 1
Memory check enabled: 0
Use single participant: 0
With security: 1
Zero copy transfer: 0
Roundtrip Mode: NONE
Ignore seconds from beginning: 0
>>> [rcutils|error_handling.c:108] rcutils_set_error_state()
This error state is being overwritten:
'couldn't find all security files!, at /tmp/binarydeb/ros-foxy-rmw-fastrtps-shared-cpp-1.2.5/src/participant.cpp:257, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/node.c:276'
with this new error message:
'rcl node's rmw handle is invalid, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/node.c:428'
rcutils_reset_error() should be called after error handling to avoid this.
<<<
[ERROR] [1623895713.205140521] [rcl]: Failed to fini publisher for node: 1
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what(): failed to initialize rcl node: rcl node's rmw handle is invalid, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/node.c:428
Seems like the problem is that security files are not correctly set by using the latest security script. May anyone help to check on this?