apollo icon indicating copy to clipboard operation
apollo copied to clipboard

cyber shm_dispatcher problem

Open breakisx opened this issue 7 years ago • 1 comments

System information

  • OS Platform and Distribution ( Linux Ubuntu 14.04):
  • Apollo installed from (source ):
  • Apollo version (3.5): I modified the talker and listener source of the example in Cyber RT to send point cloud data. When the rate is set to 20 per second, it can be sent normally, but when set to 30, the following problems occur: I0612 11:35:37.096585 29332 block.cc:47] block is being written. W0612 11:35:37.096611 29332 shm_dispatcher.cc:66] fail to acquire block, channel: channel/PointCloud index: 16 I0612 11:35:37.096626 29332 block.cc:47] block is being written. I0612 11:35:37.096627 29318 listener.cc:24] receive a frame id = 1161 W0612 11:35:37.096628 29332 shm_dispatcher.cc:66] fail to acquire block, channel: channel/PointCloud index: 16

I don't know what the reason is. Can you help me answer my confusion?

breakisx avatar Jun 12 '19 03:06 breakisx

Hi, in SHM transportation, Transmitter has a shm segmat(cyber/transport/segment.h), the segment has several Blocks(cyber/transport/block.h), the block num configured in cyber/transport/shm_conf.cc. When Transmitter writing, It will lock the block until Serialize finished. Then the Dispatcher can read from this block. The log you see indicates that the block is being written. To avoid data race, the Dispatcher cant read from this block. You can increase the BLOCK_NUM to fix. And, if you have interest, you can set the log level to DEBUG, to see whether the block is writing by Transmitter.

from-wind avatar Jun 12 '19 11:06 from-wind