hbldh / pymetawear

Community developed SDK around the Python bindings for the C++ SDK

Home Page:https://hbldh.github.io/pymetawear/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

segmentation fault while setting set_sample_delay in sensor fusion

bagybeah opened this issue · comments

i am using Pymetawear on CentOS 7 with 2 MetaMotion R boards and i am trying to get the the SensorFusion Quat working with sample delay 20 using:
device.sensorfusion.set_sample_delay(SensorFusion.DATA_QUATERION , 20)

the code runs normally and when gets to setting the the sample delay i get sensor fusion
i used some prints to trace the the source of the segmentation fault and i found out it happen from the sensor fusion module in modules when it trys to create a new data processor:
libmetawear.mbl_mw_dataprocessor_time_create(
self._data_source_signals[data_source],
mode,
delay,
Fn_VoidPtr(processor_set))

if is use device.sensorfusion.set_sample_delay(SensorFusion.DATA_QUATERION) without a sample delay it works fine but i have way of controlling the data rate of sensor fusion

any help will be appreciated i am new to this filed

I am not certain as to why this is happening I am afraid. I did not write the sensor fusion module myself, I accepted it as a pull request since I do not own a board capable of providing sensor fusion data myself. When I look through it now I see some global variables that (that are set in the processor_set method) are somewhat suspicious, but I don't know for certain.

You can either send a mail to the person who wrote the module (see top of the sensorsfusion.py file) or wait and see if more help arrives on this issue shortly.