-
Notifications
You must be signed in to change notification settings - Fork 205
Crashing in high frequency streaming #69
Comments
I think found the error but I'm still not sure why it was crashing in the first place. In this line you do the loop until i < packet.size but it should be done until i < (packet.size-1) since you have removed the header already. Right? But I'm sending 30 bytes of data + 1 byte (header) so it shouldn't overflow (go above 31 in the array index). When I do echo on the packets topic I have this output after I add the -1:
Everything looks fine, I'm just not sure why it was crashing in the first place. In the Crazyflie firmware I'm setting the size to 30 bytes and not 31, I didn't thought I should count with the header, can this be the problem? |
Just found out why it was crashing... In the crtpPacket.msg the data is defined to be 30 bytes long. It probably should be 31 but since no one can use it... |
Thanks for the report! Where do you think we'll need a "-1"? I believe packet.size is the number of data bytes (i.e. without the header byte). |
In the Crazyflie firmware I'm setting the size to 30 (I'm not counting with the header byte) but as seen above, when the packets are published the size is 31. My guess is that the size is incremented somewhere in the firmware but I wasn't able to find where. Following this logic I would say that the size takes into account the header byte. I needed and the -1 in the for condition in this line.
|
Add warning about running ubuntu in WSL. Related to issue whoenig#69
Hello,
I have been working on high frequency streaming from the Crazyflie and using the python library to communicate with it. I'm now starting to work with this packages since there was previous work done with them in my university.
I have changed the firmware of the Crazyflie so it starts to send packets as soon as is turned on.
When I connect it to the server, after the deck messages are displayed, I start getting the message "Don't know ack: Port: 1 Channel: 0 Len: 31" that I think is issued because I don't have a method handing this kind of packets. After this error is displayed around 80 times I get this error.
***** Internal Program Error - assertion (i < N) failed in T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) [with T = unsigned char; long unsigned int N = 30ul; boost::array<T, N>::reference = unsigned char&; boost::array<T, N>::size_type = long unsigned int]: /usr/include/boost/array.hpp(123): out of range [crazyflie_server-1] process has died [pid 13917, exit code -6, cmd /home/david/projects/catkin_cf/devel/lib/crazyflie_driver/crazyflie_server __name:=crazyflie_server __log:=/home/david/.ros/log/1f51758e-aa6b-11e7-8921-50b7c387376c/crazyflie_server-1.log]. log file: /home/david/.ros/log/1f51758e-aa6b-11e7-8921-50b7c387376c/crazyflie_server-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done
I know this error is somehow connected to the publishing of packets (when I commented this line is didn't crashed, which doesn't make much sense to me since there in lines 162 and 163 you are accessing the same structure. At first I though it was because the vector was not thread safe or the saving of the packets was eating too much memory, but now I noticed you are copying it so I'm not sure of what is causing the problem.
Thank you
The text was updated successfully, but these errors were encountered: