Is it possible to use two ping sonar sensors on the same drone, and connect to both of them simultaneously on a laptop (with ping-viewer)? The configuration would be one forward, one down.
Not at the moment. The Companion software image on the Raspberry Pi only recognizes 1x Ping Sonar plugged into it. If two are plugged in, it won’t recognize either right now. This may get implemented in the future, but we do not have an estimated time.
Hey,
I would like to ask if you have implemented something for this in your image ?
Is it possible to connect two Ping 1 d Sonar to the companion computer and read the data in QGC?
(One forward, one down)
Or alternatively connect it to the pixhawk and read the data from QGC?
I wondered about the Rangefinder_0x Parameters going up to 4…
Thanks for your Answer.
.companion.rc
is the code that’s run on startup. From there, lines 14 and 15 refer to the ping1D setup/connection. Both pingproxy.py and ping_mavlink_driver.py
are called/run with no arguments, and only called once, so the companion computer is currently just set up for a single ping1D connection, with the default setup parameters.
For the companion to be able to communicate with more than one would require setting different ports for the additional ones (since otherwise the communications clash), and then calling additional instances of both ping_mavlink_driver.py
and pingproxy.py
with the relevant command-line arguments to get them to connect with those changed ports.
While these posts discuss getting a QGC reading for a ping1d, there’d also be some extra setup involved in getting another one showing up since otherwise they’d be sending competing numbers that would get displayed in the same value position (basically just flipping quickly between the two, at best).
If you’re wanting to try getting it to work yourself, I’m not sure if that extra setup is easily added so that readings are accepted for the DOWN option to complement the existing FORWARD option - you’d likely need to spend some time looking into the mavlink protocol and find where the message to send is defined (presumably in ping_mavlink_driver
) and change it to the DOWN option for the second Ping.
Ok. I’ll start an attempt to fix that next week. I’ll also let you know if there is an solution for that.
Thank you very much for your input and information!
Hi,
Did you manage to implement more than one ping sonar?
I want to implement tree…this to be able to maneuver 1meter on an set angle towards a surface.
Hans Petter