bluerobotics / ping-python

Python scripts and examples for the Ping sonar.
MIT License
40 stars 29 forks source link

How to scan as fast as ping-viewer in python #101

Open lixinghe1999 opened 3 years ago

lixinghe1999 commented 3 years ago

From my experiment, in Ping-viewer, Ping360 can scan 20 beams for one second. While when I keep all the parameters the same, and use transmitAngle(self, angle) in python, I can only scan 11 beams for one second. I guess the reason is "in ping-viewer" we only have one command to scan a certain area. While in transmitAngle, we have arbitrary scan direction which have one command for each direction. Thus an arbitrary scan will have more delay. So I wonder whether my guess is correct and how I can scan as fast as in ping-viewer (only scan certain area in the front of sonar)? I appreciate your kindly help. Thanks.

patrickelectric commented 3 years ago

Hi @lixinghe1999,

Both run with the same approach, a request per profile message, I would recommend to check ping-cpp repository if you desire performance: https://github.com/bluerobotics/ping-cpp

It would also helps if you share your python script.