PX4 / Lepton

FLIR Lepton ROS node
14 stars 13 forks source link

Can't send spi message: Invalid argument #1

Open ju1992 opened 7 years ago

ju1992 commented 7 years ago

Hej,

we are trying to get the FLiR Lepton Camera running with your ROS Package on a Raspberry Pi 3 with Ubuntu MATE but have some trouble until now. We would be so glad if you may help us. We are new to work with a Raspberry and to work with ROS, so please excuse our questions.

Everytime we are running rosrun lepton_camera leptonvideo we get the error

can´t send spi message: Invalid argument Aborted (core dumped)

We think that the reason is the SPI communication.

We changed the code in the function int transfer in lepton.cpp because we read that the reason for the error is that the imx23 supports only half duplex hw spi, so we have to zero either tx or rx buffer then it will work (source). So we changed the code from tr.rx_buf = (unsigned long) lepton_frame_packet; to tr.rx_buf =0;

The error isn't showing up any more, but the sznchronizing with the video stream doesn't work.

We don't have any other ideas and would be so glad about help.

Thank you Julia

alduxvm commented 7 years ago

Hi Julia, I'm having the same issue... How is your camera wired up?

In my case I have the lepton module wired to \dev\spidev0.1 and the LeptonModule original scripts work.

When trying this node, I changed the file https://github.com/PX4/Lepton/blob/master/lepton_camera/src/SPI/SPI.cpp in line 29 from /dev/spidev0.0 to /dev/spidev0.1 and I got a IR image published... but just one... after one gets published the Can't send spi message: Invalid argument message appears and the node stops...

did you manage to solve the problem?

Thanks!