2.When I use ping360.py transmitAngle(x), does “x “ represent the angle from the direction sonar is facing? Also, is the center of the sonar’s orientation (X=0) the same direction as the triangle drawn on the bottom of the sonar?
When X=40 and while looping, does the sonar scan from 0 to 39 and then circle back around without scanning to 0? (0-39 scan → rotate without scanning 40~399 → 0-39 scan → …)
It takes about 0.5s to return to 0. sonar.pdf (99.8 KB)
Yes, assuming you don’t turn off the device in between (parameters are reset to the defaults when the device turns on).
The range per sample is determined by the sample_period, so the total range is determined by sample_period and number_of_samples, together with the speed of sound in the water you’re operating in (see here if you want to estimate it from vehicle data, and here for estimating salinity).
If you transmitAngle(40) and then transmitAngle(0) it will go the shortest direction back to the target angle (0 in this case), and it won’t transmit or take samples until it gets to the target angle. If you want you can test that by sending transmitAngle requests for 40, then 0, then 200 - it will take longer to get from 0 to 200 than from 40 to 0.
The data starts at 0m, but echoes within the sensor head after a transmission take a while to die down, which means that there’s noise in the readings up until about 0.75m, so reflections off external objects within ~0.75m of the sensor can be difficult to see/detect properly.
This image gives a sense of the noise from internal reflections when the sensor is scanning a 2m range:
Note that when the scanning range is set to longer the transmitted pulses are also longer, and the echoes take a bit longer to die out.
How are you detecting and connecting to it? In our Companion software there’s some Ping device detection code that runs on startup, and any devices that don’t register at that time get missed and don’t get configured or connected to properly. Our first troubleshooting step is
I’m unsure if BlueOS supports hot-plugging - I think it’s at least planned to, if it doesn’t already. The general idea would be to monitor/hook into when USB devices are connected, and whenever a new device is detected to try to determine if it’s a Ping device, and if it is configure it as relevant