You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hbrob...@googlegroups.com
Using a SONAR sensor driven by code running on Linux is prone to a lot of problems. Importantly, the time-slicing nature of scheduling in Linux makes it hard to get predictability and accuracy in generating useful messages for use by the Nav2 system in ROS 2. If you don’t also use timers and interrupt handlers, there’s a whole other level of problem with accuracy and repeatability you have to deal with.
I have some code that deals with most of the problems, but it does so by managing sensors on a system which can provide most of the characteristics of a hard-realtime system. Importantly, you can get predictable, repeatable sensing with low jitter, high reporting frame rates, and can easily add in a safety system. But I’m not going to show you how to do all of that. At some point, I will show you, but providing a non-toy level of dealing with sensors in ROS 2 is a long conversation.
But, I can show you a lot of code that you can use to write your own Arduino-based sensor processing for SONAR sensors.
I’ve enclosed a PDF file I wrote (with a bit of help from an AI system so I don’t have to type every word, so any errors are definitely the AI’s, not mine). I’ve also included a bit of technical information that is pretty much never discussed.