I have a ROSbot 2 Pro and have some issue.
I’d like to make custom firmware to allow the IMU to publish at 100-250 Hz instead of 10 Hz.
I’ve tried changing the main_loop_interval, i²c frequency and the value connected to the ImuDriver, but nothing seems to work.
I did these changes in the main.cpp file and built using PlatformIO.
Anyone that can help?
Hello @JensCallewaert ane welcome to the Husarion Community!
According to the datasheet of the sensor, it is theoretically possible to increase the operating frequency to 100 Hz (I attach an illustration). However, it is impossible to debug this on the firmware side in its current state without thorough modifications. I’m afraid I can’t help, especially as this is a ROS 1 firmware and is no longer maintained or supported.
Thanks for the reply.
I fumbled around in the firmware and libraries a bit and somehow managed to get it up to 97 Hz steadily.
So it’s about what I need.
I’m glad you’ve achieved your goal.
If you would like to share your findings and advice for the community, I would be very grateful. It’s possible that someday someone will encounter a similar challenge, so I’ll leave the thread open.
The main changes I did was setting the FIFO_SAMPLE_RATE_OPERATION to 250 on line 8 of the ImuDriver.h in the .pio folder. And also removing the LowPassFilter line somewhere around like 32 of the ImuDriver.cpp in the same folder.
Then I compiled it and everything worked as it should.