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

Follow your steps, but at the time of publication the prompt did not use the loan message #30

Open
Morning-zz opened this issue Aug 23, 2024 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Morning-zz
Copy link

./image1m_talker
[INFO] [1724397612.482477407] [rclcpp]: Currently used middleware can't loan messages. Local allocator will be used.
[INFO] [1724397612.483361236] [shm_image1m_talker]: Publishing
[INFO] [1724397612.583124064] [shm_image1m_talker]: Publishing
[INFO] [1724397612.682550347] [shm_image1m_talker]: Publishing
[INFO] [1724397612.782653069] [shm_image1m_talker]: Publishing
[INFO] [1724397612.882653885] [shm_image1m_talker]: Publishing
[INFO] [1724397612.982543701] [shm_image1m_talker]: Publishing

@Morning-zz
Copy link
Author

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/shm_fastdds.xml
export RMW_FASTRTPS_USE_QOS_FROM_XML=1

@Morning-zz
Copy link
Author

ros2 version is humble

@ZhenshengLee ZhenshengLee added the bug Something isn't working label Aug 23, 2024
@ZhenshengLee ZhenshengLee added this to the doing milestone Aug 23, 2024
@Morning-zz
Copy link
Author

humble loan messages is turned off by default and needs to be opened manually :export ROS_DISABLE_LOANED_MESSAGES=0

After the configuration was successful, testing found no difference in latency, and even more volatile in some cases. But the memory consumption is smaller

[INFO] [1724408813.173785288] [shm_image8m_listener]: get-image8m-transport-time: 6.068
[INFO] [1724408813.173803704] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.063
[INFO] [1724408813.273545187] [shm_image8m_listener]: Received...
[INFO] [1724408813.273643544] [shm_image8m_listener]: get-image8m-transport-time: 5.987
[INFO] [1724408813.273660113] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.940
[INFO] [1724408813.373099501] [shm_image8m_listener]: Received...
[INFO] [1724408813.373194467] [shm_image8m_listener]: get-image8m-transport-time: 5.568
[INFO] [1724408813.373210473] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.969
[INFO] [1724408813.473682537] [shm_image8m_listener]: Received...
[INFO] [1724408813.473785216] [shm_image8m_listener]: get-image8m-transport-time: 6.139
[INFO] [1724408813.473803059] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.020
[INFO] [1724408813.573306288] [shm_image8m_listener]: Received...
[INFO] [1724408813.573410933] [shm_image8m_listener]: get-image8m-transport-time: 5.756
[INFO] [1724408813.573428414] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.008
[INFO] [1724408813.673787476] [shm_image8m_listener]: Received...
[INFO] [1724408813.673899290] [shm_image8m_listener]: get-image8m-transport-time: 6.254
[INFO] [1724408813.673916613] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.991
[INFO] [1724408813.773222620] [shm_image8m_listener]: Received...
[INFO] [1724408813.773316295] [shm_image8m_listener]: get-image8m-transport-time: 5.689
[INFO] [1724408813.773375087] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.982
[INFO] [1724408813.873449607] [shm_image8m_listener]: Received...
[INFO] [1724408813.873555894] [shm_image8m_listener]: get-image8m-transport-time: 5.907
[INFO] [1724408813.873572022] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.021
[INFO] [1724408813.973214266] [shm_image8m_listener]: Received...
[INFO] [1724408813.973319446] [shm_image8m_listener]: get-image8m-transport-time: 5.688
[INFO] [1724408813.973335048] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.983
[INFO] [1724408814.074028316] [shm_image8m_listener]: Received...
[INFO] [1724408814.074143192] [shm_image8m_listener]: get-image8m-transport-time: 6.484
[INFO] [1724408814.074166489] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.029
[INFO] [1724408814.171875326] [shm_image8m_listener]: Received...
[INFO] [1724408814.171937260] [shm_image8m_listener]: get-image8m-transport-time: 4.294
[INFO] [1724408814.171948826] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.983
[INFO] [1724408814.273925310] [shm_image8m_listener]: Received...
[INFO] [1724408814.274029077] [shm_image8m_listener]: get-image8m-transport-time: 6.376
[INFO] [1724408814.274048687] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.009
[INFO] [1724408814.372608185] [shm_image8m_listener]: Received...
[INFO] [1724408814.372664897] [shm_image8m_listener]: get-image8m-transport-time: 5.041
[INFO] [1724408814.372672698] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.972
[INFO] [1724408814.474136150] [shm_image8m_listener]: Received...
[INFO] [1724408814.474239113] [shm_image8m_listener]: get-image8m-transport-time: 6.518
[INFO] [1724408814.474256727] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.097
[INFO] [1724408814.573750648] [shm_image8m_listener]: Received...
[INFO] [1724408814.573860952] [shm_image8m_listener]: get-image8m-transport-time: 6.202
[INFO] [1724408814.573879431] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.937
[INFO] [1724408814.674386667] [shm_image8m_listener]: Received...
[INFO] [1724408814.674508280] [shm_image8m_listener]: get-image8m-transport-time: 6.877
[INFO] [1724408814.674527442] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.972
[INFO] [1724408814.773188865] [shm_image8m_listener]: Received...
[INFO] [1724408814.773280464] [shm_image8m_listener]: get-image8m-transport-time: 5.645
[INFO] [1724408814.773294402] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.005
[INFO] [1724408814.873756056] [shm_image8m_listener]: Received...
[INFO] [1724408814.873866929] [shm_image8m_listener]: get-image8m-transport-time: 6.243
[INFO] [1724408814.873884520] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.988
[INFO] [1724408814.973122215] [shm_image8m_listener]: Received...
[INFO] [1724408814.973220463] [shm_image8m_listener]: get-image8m-transport-time: 5.591
[INFO] [1724408814.973236502] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.006
[INFO] [1724408815.073339616] [shm_image8m_listener]: Received...
[INFO] [1724408815.073442636] [shm_image8m_listener]: get-image8m-transport-time: 5.820
[INFO] [1724408815.073459701] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.994
[INFO] [1724408815.173366085] [shm_image8m_listener]: Received...
[INFO] [1724408815.173475954] [shm_image8m_listener]: get-image8m-transport-time: 5.844
[INFO] [1724408815.173492544] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.009
[INFO] [1724408815.273521470] [shm_image8m_listener]: Received...
[INFO] [1724408815.273625458] [shm_image8m_listener]: get-image8m-transport-time: 6.011
[INFO] [1724408815.273641881] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.983
[INFO] [1724408815.373070623] [shm_image8m_listener]: Received...
[INFO] [1724408815.373163329] [shm_image8m_listener]: get-image8m-transport-time: 5.538
[INFO] [1724408815.373179447] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.011
[INFO] [1724408815.473161497] [shm_image8m_listener]: Received...
[INFO] [1724408815.473265030] [shm_image8m_listener]: get-image8m-transport-time: 5.644
[INFO] [1724408815.473281017] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.995
[INFO] [1724408815.574654863] [shm_image8m_listener]: Received...
[INFO] [1724408815.574779709] [shm_image8m_listener]: get-image8m-transport-time: 7.137
[INFO] [1724408815.574799848] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.022
[INFO] [1724408815.670967631] [shm_image8m_listener]: Received...
[INFO] [1724408815.671018640] [shm_image8m_listener]: get-image8m-transport-time: 3.392
[INFO] [1724408815.671026302] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.985
[INFO] [1724408815.773435228] [shm_image8m_listener]: Received...
[INFO] [1724408815.773532768] [shm_image8m_listener]: get-image8m-transport-time: 5.919
[INFO] [1724408815.773549611] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.986
[INFO] [1724408815.874986149] [shm_image8m_listener]: Received...
[INFO] [1724408815.875099821] [shm_image8m_listener]: get-image8m-transport-time: 7.456
[INFO] [1724408815.875120361] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.031
[INFO] [1724408815.980593514] [shm_image8m_listener]: Received...
[INFO] [1724408815.980660891] [shm_image8m_listener]: get-image8m-transport-time: 13.035
[INFO] [1724408815.980669282] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.983
[INFO] [1724408816.082179358] [shm_image8m_listener]: Received...
[INFO] [1724408816.082307495] [shm_image8m_listener]: get-image8m-transport-time: 14.650
[INFO] [1724408816.082327961] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.031
[INFO] [1724408816.174607005] [shm_image8m_listener]: Received...
[INFO] [1724408816.174721111] [shm_image8m_listener]: get-image8m-transport-time: 7.075
[INFO] [1724408816.174741396] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.989
[INFO] [1724408816.275024077] [shm_image8m_listener]: Received...
[INFO] [1724408816.275144414] [shm_image8m_listener]: get-image8m-transport-time: 7.515
[INFO] [1724408816.275162265] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.984
[INFO] [1724408816.372997212] [shm_image8m_listener]: Received...
[INFO] [1724408816.373111018] [shm_image8m_listener]: get-image8m-transport-time: 5.463
[INFO] [1724408816.373130611] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 100.018
[INFO] [1724408816.473294334] [shm_image8m_listener]: Received...
[INFO] [1724408816.473375313] [shm_image8m_listener]: get-image8m-transport-time: 5.735
[INFO] [1724408816.473390244] [shm_image8m_listener]: get-image8m-timestamp_offset-time: 99.993

[INFO] [1724408805.494155807] [image_listener]: get-image-transport-time: 5.381
[INFO] [1724408805.494173413] [image_listener]: get-image-timestamp_offset-time: 199.993
[INFO] [1724408805.594107479] [image_listener]: Received...
[INFO] [1724408805.594189987] [image_listener]: get-image-transport-time: 5.393
[INFO] [1724408805.594210747] [image_listener]: get-image-timestamp_offset-time: 100.022
[INFO] [1724408805.694476210] [image_listener]: Received...
[INFO] [1724408805.694557600] [image_listener]: get-image-transport-time: 5.762
[INFO] [1724408805.694576467] [image_listener]: get-image-timestamp_offset-time: 99.999
[INFO] [1724408805.795072749] [image_listener]: Received...
[INFO] [1724408805.795168282] [image_listener]: get-image-transport-time: 6.372
[INFO] [1724408805.795191151] [image_listener]: get-image-timestamp_offset-time: 100.000
[INFO] [1724408805.894098792] [image_listener]: Received...
[INFO] [1724408805.894180071] [image_listener]: get-image-transport-time: 5.392
[INFO] [1724408805.894195961] [image_listener]: get-image-timestamp_offset-time: 99.993
[INFO] [1724408805.994136573] [image_listener]: Received...
[INFO] [1724408805.994215526] [image_listener]: get-image-transport-time: 5.419
[INFO] [1724408805.994232247] [image_listener]: get-image-timestamp_offset-time: 100.008
[INFO] [1724408806.094352210] [image_listener]: Received...
[INFO] [1724408806.094444166] [image_listener]: get-image-transport-time: 5.648
[INFO] [1724408806.094463644] [image_listener]: get-image-timestamp_offset-time: 100.000
[INFO] [1724408806.194745539] [image_listener]: Received...
[INFO] [1724408806.194835166] [image_listener]: get-image-transport-time: 6.048
[INFO] [1724408806.194856653] [image_listener]: get-image-timestamp_offset-time: 99.990
[INFO] [1724408806.294100606] [image_listener]: Received...
[INFO] [1724408806.294184906] [image_listener]: get-image-transport-time: 5.397
[INFO] [1724408806.294201913] [image_listener]: get-image-timestamp_offset-time: 100.002
[INFO] [1724408806.393992869] [image_listener]: Received...
[INFO] [1724408806.394072807] [image_listener]: get-image-transport-time: 5.290
[INFO] [1724408806.394091949] [image_listener]: get-image-timestamp_offset-time: 99.994
[INFO] [1724408806.493780455] [image_listener]: Received...
[INFO] [1724408806.493855733] [image_listener]: get-image-transport-time: 5.078
[INFO] [1724408806.493872418] [image_listener]: get-image-timestamp_offset-time: 99.996
[INFO] [1724408806.594864139] [image_listener]: Received...
[INFO] [1724408806.594953803] [image_listener]: get-image-transport-time: 6.164
[INFO] [1724408806.594975456] [image_listener]: get-image-timestamp_offset-time: 100.011
[INFO] [1724408806.694412896] [image_listener]: Received...
[INFO] [1724408806.694499912] [image_listener]: get-image-transport-time: 5.693
[INFO] [1724408806.694518076] [image_listener]: get-image-timestamp_offset-time: 100.018
[INFO] [1724408806.795210360] [image_listener]: Received...
[INFO] [1724408806.795307140] [image_listener]: get-image-transport-time: 6.515
[INFO] [1724408806.795329163] [image_listener]: get-image-timestamp_offset-time: 99.985
[INFO] [1724408806.895687752] [image_listener]: Received...
[INFO] [1724408806.895786321] [image_listener]: get-image-transport-time: 6.990
[INFO] [1724408806.895808876] [image_listener]: get-image-timestamp_offset-time: 100.004
[INFO] [1724408806.994971112] [image_listener]: Received...
[INFO] [1724408806.995061873] [image_listener]: get-image-transport-time: 6.264
[INFO] [1724408806.995081518] [image_listener]: get-image-timestamp_offset-time: 100.002
[INFO] [1724408807.095004027] [image_listener]: Received...
[INFO] [1724408807.095108502] [image_listener]: get-image-transport-time: 6.298
[INFO] [1724408807.095128393] [image_listener]: get-image-timestamp_offset-time: 100.013
[INFO] [1724408807.194598750] [image_listener]: Received...
[INFO] [1724408807.194681792] [image_listener]: get-image-transport-time: 5.876
[INFO] [1724408807.194697567] [image_listener]: get-image-timestamp_offset-time: 99.996
[INFO] [1724408807.294745951] [image_listener]: Received...
[INFO] [1724408807.294836644] [image_listener]: get-image-transport-time: 6.022
[INFO] [1724408807.294853635] [image_listener]: get-image-timestamp_offset-time: 100.008
[INFO] [1724408807.396026947] [image_listener]: Received...
[INFO] [1724408807.396131651] [image_listener]: get-image-transport-time: 7.334
[INFO] [1724408807.396156404] [image_listener]: get-image-timestamp_offset-time: 99.983
[INFO] [1724408807.496079665] [image_listener]: Received...
[INFO] [1724408807.496187813] [image_listener]: get-image-transport-time: 7.387
[INFO] [1724408807.496213020] [image_listener]: get-image-timestamp_offset-time: 100.002
[INFO] [1724408807.595377416] [image_listener]: Received...
[INFO] [1724408807.595475244] [image_listener]: get-image-transport-time: 6.673
[INFO] [1724408807.595499256] [image_listener]: get-image-timestamp_offset-time: 100.002
[INFO] [1724408807.695254431] [image_listener]: Received...
[INFO] [1724408807.695353652] [image_listener]: get-image-transport-time: 6.555
[INFO] [1724408807.695373310] [image_listener]: get-image-timestamp_offset-time: 99.996
[INFO] [1724408807.795930033] [image_listener]: Received...
[INFO] [1724408807.796038366] [image_listener]: get-image-transport-time: 7.228
[INFO] [1724408807.796063470] [image_listener]: get-image-timestamp_offset-time: 100.012
[INFO] [1724408807.894640272] [image_listener]: Received...
[INFO] [1724408807.894733053] [image_listener]: get-image-transport-time: 5.928
[INFO] [1724408807.894751257] [image_listener]: get-image-timestamp_offset-time: 99.995
[INFO] [1724408807.994362795] [image_listener]: Received...
[INFO] [1724408807.994445497] [image_listener]: get-image-transport-time: 5.634
[INFO] [1724408807.994466042] [image_listener]: get-image-timestamp_offset-time: 100.006
[INFO] [1724408808.094823053] [image_listener]: Received...
[INFO] [1724408808.094917322] [image_listener]: get-image-transport-time: 6.105
[INFO] [1724408808.094937091] [image_listener]: get-image-timestamp_offset-time: 100.000
[INFO] [1724408808.195584487] [image_listener]: Received...
[INFO] [1724408808.195683930] [image_listener]: get-image-transport-time: 6.805
[INFO] [1724408808.195707167] [image_listener]: get-image-timestamp_offset-time: 100.067
[INFO] [1724408808.294014075] [image_listener]: Received...
[INFO] [1724408808.294091069] [image_listener]: get-image-transport-time: 5.298
[INFO] [1724408808.294110220] [image_listener]: get-image-timestamp_offset-time: 99.915
[INFO] [1724408808.394088199] [image_listener]: Received...
[INFO] [1724408808.394164684] [image_listener]: get-image-transport-time: 5.359
[INFO] [1724408808.394184549] [image_listener]: get-image-timestamp_offset-time: 100.012
[INFO] [1724408808.494403295] [image_listener]: Received...
[INFO] [1724408808.494488510] [image_listener]: get-image-transport-time: 5.695
[INFO] [1724408808.494509197] [image_listener]: get-image-timestamp_offset-time: 99.987
[INFO] [1724408808.594806767] [image_listener]: Received...
[INFO] [1724408808.594897703] [image_listener]: get-image-transport-time: 6.099
[INFO] [1724408808.594920553] [image_listener]: get-image-timestamp_offset-time: 100.006
[INFO] [1724408808.694785891] [image_listener]: Received...
[INFO] [1724408808.694870606] [image_listener]: get-image-transport-time: 6.059
[INFO] [1724408808.694889125] [image_listener]: get-image-timestamp_offset-time: 100.012
[INFO] [1724408808.793966985] [image_listener]: Received...
[INFO] [1724408808.794047394] [image_listener]: get-image-transport-time: 5.252
[INFO] [1724408808.794066187] [image_listener]: get-image-timestamp_offset-time: 99.985
[INFO] [1724408808.895234412] [image_listener]: Received...
[INFO] [1724408808.895330150] [image_listener]: get-image-transport-time: 6.516
[INFO] [1724408808.895352739] [image_listener]: get-image-timestamp_offset-time: 100.018
[INFO] [1724408808.994928178] [image_listener]: Received...
[INFO] [1724408808.995015707] [image_listener]: get-image-transport-time: 6.122
[INFO] [1724408808.995035776] [image_listener]: get-image-timestamp_offset-time: 100.080
[INFO] [1724408809.095117071] [image_listener]: Received...
[INFO] [1724408809.095204581] [image_listener]: get-image-transport-time: 6.401
[INFO] [1724408809.095226881] [image_listener]: get-image-timestamp_offset-time: 99.909
[INFO] [1724408809.194512533] [image_listener]: Received...
[INFO] [1724408809.194592078] [image_listener]: get-image-transport-time: 5.792
[INFO] [1724408809.194610128] [image_listener]: get-image-timestamp_offset-time: 99.996
[INFO] [1724408809.294617798] [image_listener]: Received...
[INFO] [1724408809.294711829] [image_listener]: get-image-transport-time: 5.904
[INFO] [1724408809.294733825] [image_listener]: get-image-timestamp_offset-time: 100.008
[INFO] [1724408809.394786507] [image_listener]: Received...
[INFO] [1724408809.394868181] [image_listener]: get-image-transport-time: 6.047
[INFO] [1724408809.394887060] [image_listener]: get-image-timestamp_offset-time: 100.015
[INFO] [1724408809.494681621] [image_listener]: Received...
[INFO] [1724408809.494761171] [image_listener]: get-image-transport-time: 5.957
[INFO] [1724408809.494782155] [image_listener]: get-image-timestamp_offset-time: 99.983
[INFO] [1724408809.594110485] [image_listener]: Received...
[INFO] [1724408809.594186825] [image_listener]: get-image-transport-time: 5.384
[INFO] [1724408809.594205954] [image_listener]: get-image-timestamp_offset-time: 99.998
[INFO] [1724408809.694498447] [image_listener]: Received...
[INFO] [1724408809.694585794] [image_listener]: get-image-transport-time: 5.776
[INFO] [1724408809.694607228] [image_listener]: get-image-timestamp_offset-time: 100.007
[INFO] [1724408809.794693745] [image_listener]: Received...
[INFO] [1724408809.794797598] [image_listener]: get-image-transport-time: 5.972
[INFO] [1724408809.794823853] [image_listener]: get-image-timestamp_offset-time: 100.016
[INFO] [1724408809.894229841] [image_listener]: Received...
[INFO] [1724408809.894323821] [image_listener]: get-image-transport-time: 5.519
[INFO] [1724408809.894343564] [image_listener]: get-image-timestamp_offset-time: 99.979
[INFO] [1724408809.994544415] [image_listener]: Received...
[INFO] [1724408809.994628991] [image_listener]: get-image-transport-time: 5.798
[INFO] [1724408809.994650408] [image_listener]: get-image-timestamp_offset-time: 100.027
[INFO] [1724408810.095838227] [image_listener]: Received...
[INFO] [1724408810.095942025] [image_listener]: get-image-transport-time: 7.125
[INFO] [1724408810.095968307] [image_listener]: get-image-timestamp_offset-time: 99.985
[INFO] [1724408810.194859759] [image_listener]: Received...
[INFO] [1724408810.194946080] [image_listener]: get-image-transport-time: 6.112
[INFO] [1724408810.194965333] [image_listener]: get-image-timestamp_offset-time: 100.018
[INFO] [1724408810.294439682] [image_listener]: Received...
[INFO] [1724408810.294524863] [image_listener]: get-image-transport-time: 5.716
[INFO] [1724408810.294544387] [image_listener]: get-image-timestamp_offset-time: 99.976
[INFO] [1724408810.395641845] [image_listener]: Received...
[INFO] [1724408810.395727937] [image_listener]: get-image-transport-time: 6.897
[INFO] [1724408810.395748101] [image_listener]: get-image-timestamp_offset-time: 100.022
[INFO] [1724408810.494450178] [image_listener]: Received...
[INFO] [1724408810.494533848] [image_listener]: get-image-transport-time: 5.636
[INFO] [1724408810.494549705] [image_listener]: get-image-timestamp_offset-time: 100.067
[INFO] [1724408810.594356961] [image_listener]: Received...
[INFO] [1724408810.594442631] [image_listener]: get-image-transport-time: 5.547
[INFO] [1724408810.594460108] [image_listener]: get-image-timestamp_offset-time: 99.998
[INFO] [1724408810.695644082] [image_listener]: Received...
[INFO] [1724408810.695737300] [image_listener]: get-image-transport-time: 6.839
[INFO] [1724408810.695759949] [image_listener]: get-image-timestamp_offset-time: 100.002
[INFO] [1724408810.795462354] [image_listener]: Received...
[INFO] [1724408810.795562558] [image_listener]: get-image-transport-time: 6.720
[INFO] [1724408810.795583752] [image_listener]: get-image-timestamp_offset-time: 99.944
[INFO] [1724408810.895532620] [image_listener]: Received...
[INFO] [1724408810.895679531] [image_listener]: get-image-transport-time: 6.850
[INFO] [1724408810.895704027] [image_listener]: get-image-timestamp_offset-time: 99.985
[INFO] [1724408810.997236863] [image_listener]: Received...
[INFO] [1724408810.997355845] [image_listener]: get-image-transport-time: 8.537
[INFO] [1724408810.997395934] [image_listener]: get-image-timestamp_offset-time: 99.990
[INFO] [1724408811.096504993] [image_listener]: Received...
[INFO] [1724408811.096616018] [image_listener]: get-image-transport-time: 7.776
[INFO] [1724408811.096685150] [image_listener]: get-image-timestamp_offset-time: 100.022
[INFO] [1724408811.195428476] [image_listener]: Received...
[INFO] [1724408811.195531661] [image_listener]: get-image-transport-time: 6.714
[INFO] [1724408811.195637384] [image_listener]: get-image-timestamp_offset-time: 99.977
[INFO] [1724408811.295888562] [image_listener]: Received...
[INFO] [1724408811.295977381] [image_listener]: get-image-transport-time: 7.158
[INFO] [1724408811.295996606] [image_listener]: get-image-timestamp_offset-time: 100.003
[INFO] [1724408811.396023939] [image_listener]: Received...
[INFO] [1724408811.396094889] [image_listener]: get-image-transport-time: 7.263
[INFO] [1724408811.396111209] [image_listener]: get-image-timestamp_offset-time: 100.013
[INFO] [1724408811.494843390] [image_listener]: Received...
[INFO] [1724408811.494936546] [image_listener]: get-image-transport-time: 6.109
[INFO] [1724408811.494958260] [image_listener]: get-image-timestamp_offset-time: 99.995
[INFO] [1724408811.595469870] [image_listener]: Received...
[INFO] [1724408811.595638158] [image_listener]: get-image-transport-time: 6.807
[INFO] [1724408811.595707556] [image_listener]: get-image-timestamp_offset-time: 100.000
[INFO] [1724408812.393068760] [image_listener]: Received...
[INFO] [1724408812.393134833] [image_listener]: get-image-transport-time: 4.299
[INFO] [1724408812.393150995] [image_listener]: get-image-timestamp_offset-time: 800.009
[INFO] [1724408812.494235568] [image_listener]: Received...
[INFO] [1724408812.494321275] [image_listener]: get-image-transport-time: 5.498
[INFO] [1724408812.494342164] [image_listener]: get-image-timestamp_offset-time: 99.987
[INFO] [1724408812.594716023] [image_listener]: Received...
[INFO] [1724408812.594805948] [image_listener]: get-image-transport-time: 5.979
[INFO] [1724408812.594826568] [image_listener]: get-image-timestamp_offset-time: 100.003
[INFO] [1724408812.696425892] [image_listener]: Received...
[INFO] [1724408812.696541427] [image_listener]: get-image-transport-time: 7.702
[INFO] [1724408812.696578408] [image_listener]: get-image-timestamp_offset-time: 100.012
[INFO] [1724408812.795360881] [image_listener]: Received...
[INFO] [1724408812.795457608] [image_listener]: get-image-transport-time: 6.636
[INFO] [1724408812.795489394] [image_listener]: get-image-timestamp_offset-time: 99.982
[INFO] [1724408812.894467974] [image_listener]: Received...
[INFO] [1724408812.894554418] [image_listener]: get-image-transport-time: 5.709
[INFO] [1724408812.894580209] [image_listener]: get-image-timestamp_offset-time: 100.025
[INFO] [1724408812.994149700] [image_listener]: Received...
[INFO] [1724408812.994235189] [image_listener]: get-image-transport-time: 5.401
[INFO] [1724408812.994256928] [image_listener]: get-image-timestamp_offset-time: 99.989
[INFO] [1724408813.095778646] [image_listener]: Received...
[INFO] [1724408813.095880446] [image_listener]: get-image-transport-time: 7.035
[INFO] [1724408813.095906671] [image_listener]: get-image-timestamp_offset-time: 100.011
[INFO] [1724408813.194788336] [image_listener]: Received...
[INFO] [1724408813.194876764] [image_listener]: get-image-transport-time: 6.043
[INFO] [1724408813.194898688] [image_listener]: get-image-timestamp_offset-time: 99.988
[INFO] [1724408813.294362196] [image_listener]: Received...
[INFO] [1724408813.294443466] [image_listener]: get-image-transport-time: 5.595
[INFO] [1724408813.294462897] [image_listener]: get-image-timestamp_offset-time: 100.015
[INFO] [1724408813.394114349] [image_listener]: Received...
[INFO] [1724408813.394194213] [image_listener]: get-image-transport-time: 5.351
[INFO] [1724408813.394211719] [image_listener]: get-image-timestamp_offset-time: 99.994
[INFO] [1724408813.494081293] [image_listener]: Received...
[INFO] [1724408813.494158179] [image_listener]: get-image-transport-time: 5.314
[INFO] [1724408813.494177538] [image_listener]: get-image-timestamp_offset-time: 100.001
[INFO] [1724408813.594078922] [image_listener]: Received...
[INFO] [1724408813.594157811] [image_listener]: get-image-transport-time: 5.307
[INFO] [1724408813.594215398] [image_listener]: get-image-timestamp_offset-time: 100.007
[INFO] [1724408813.694008746] [image_listener]: Received...
[INFO] [1724408813.694086991] [image_listener]: get-image-transport-time: 5.257
[INFO] [1724408813.694105398] [image_listener]: get-image-timestamp_offset-time: 99.978
[INFO] [1724408813.794131833] [image_listener]: Received...
[INFO] [1724408813.794210482] [image_listener]: get-image-transport-time: 5.348
[INFO] [1724408813.794228008] [image_listener]: get-image-timestamp_offset-time: 100.033
[INFO] [1724408813.894065580] [image_listener]: Received...
[INFO] [1724408813.894145042] [image_listener]: get-image-transport-time: 5.314
[INFO] [1724408813.894162714] [image_listener]: get-image-timestamp_offset-time: 99.968

The program runs in docker

@ZhenshengLee ZhenshengLee self-assigned this Aug 23, 2024
@ZhenshengLee
Copy link
Owner

ZhenshengLee commented Aug 23, 2024

export FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/shm_fastdds.xml

did you copy the file to the home folder? https://github.com/ZhenshengLee/ros2_shm_msgs/blob/humble/config/shm_fastdds.xml

The program runs in docker

I didn't test it in docker, but I am sure the /dev/shm folder will be used by fastdds during ros2 communication.

humble loan messages is turned off by default and needs to be opened manually :export ROS_DISABLE_LOANED_MESSAGES=0

It's the recent new feature, I didn't test with it.

After the configuration was successful, testing found no difference in latency, and even more volatile in some cases. But the memory consumption is smaller

Could you please check if the datasharing of fastdds is turn on? in fastdds, zerocopy = loaned api + datasharing. see https://fast-dds.docs.eprosima.com/en/v2.6.9/fastdds/use_cases/zero_copy/zero_copy.html#writing-and-reading-in-zero-copy-transfers

ros2_shm_msgs/README.md

Lines 110 to 117 in 42fde5f

for rmw_fastrtps_cpp, to check if there is fastdds shm file being created
```sh
# check if shm-transport
ls /dev/shm/fastrtps_
# check if data-sharing
ls /dev/shm/fast_datasharing*
```

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/shm_fastdds.xml
export RMW_FASTRTPS_USE_QOS_FROM_XML=1

The config of fastdds was confirmed by ros2/rmw_fastrtps#636 , but I cannot gurantee it works for the year of 2024. You can take a look the rmw_fastrtps repo for any updates.
EDIT: this may help.
https://github.com/ros2/rmw_fastrtps/blob/37f7ef88fbec216d47883763f185bd39fc50b5a1/README.md?plain=1#L263-L299

@Morning-zz
Copy link
Author

Checked. It's already on

/dev/shm/fastrtps_2191af2cf197f25e /dev/shm/fastrtps_d33d7dcdce88dd25
/dev/shm/fastrtps_2191af2cf197f25e_el /dev/shm/fastrtps_d33d7dcdce88dd25_el
/dev/shm/fastrtps_500cb8f173d6586e /dev/shm/fastrtps_d41207b852a39c7b
/dev/shm/fastrtps_500cb8f173d6586e_el /dev/shm/fastrtps_d41207b852a39c7b_el
/dev/shm/fastrtps_8e31bf9cf2e6677c /dev/shm/fastrtps_d66c59fd2f8e01b6
/dev/shm/fastrtps_8e31bf9cf2e6677c_el /dev/shm/fastrtps_d66c59fd2f8e01b6_el
/dev/shm/fastrtps_a56ec46261f047ba /dev/shm/fastrtps_ed7e6bc96645e737
/dev/shm/fastrtps_a56ec46261f047ba_el /dev/shm/fastrtps_ed7e6bc96645e737_el
/dev/shm/fastrtps_a864ce7f5aa9a693 /dev/shm/fastrtps_f09a5080997d37c1
/dev/shm/fastrtps_a864ce7f5aa9a693_el /dev/shm/fastrtps_f09a5080997d37c1_el
/dev/shm/fastrtps_c5899eafbb7144fe /dev/shm/fastrtps_port7413
/dev/shm/fastrtps_c5899eafbb7144fe_el /dev/shm/fastrtps_port7413_el

/dev/shm/fast_datasharing_01.0f.3d.ea.16.f9.be.d3.00.00.00.00_0.0.12.3
/dev/shm/fast_datasharing_01.0f.3d.ea.28.00.77.68.00.00.00.00_0.0.12.3
/dev/shm/fast_datasharing_01.0f.3d.ea.9c.f5.35.b2.00.00.00.00_0.0.12.3
/dev/shm/fast_datasharing_01.0f.3d.ea.ed.fe.fd.51.00.00.00.00_0.0.12.3

There may be a configuration problem that is different from the version of fastdds you are using. It needs to be revised and studied again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants