Wednesday, June 29, 2011

Re: [Discuss-gnuradio] Error on "Assertion `imu >= 0' failed" when using gr.udp_source/sink

On Wed, Jun 29, 2011 at 07:44, Zhen <zkongcn@yahoo.com.cn> wrote:

The reason is that in gnuradio-examples, UDP default payload size is set to 1471.  In gr_udp_source.cc, all received data will be round down to a multiple of d_itemsize. Since sizeof_gr_complex is 8, so only 1464 Bytes are received correctly, while the left 7 byte are abandoned. This will in turn disturb the position of the following data stream, and also affect the mmse_fir_interpolator and make imu negative.

Actually, the default UDP payload size in gr_udp_source.h is set to 1472, but in examples, it is set to 1471.  I am not sure if this is a bug. A simple way to bypass this problem is to set MTU size as a multiple of itemsize, such as 1464 or 1472, then everything works as expected.

Very nice catch.  I have yet looked at the code to verify this, but your description sounds plausible.  Thanks!

Johnathan

No comments:

Post a Comment