Cannot access Ping1D data - Ping360 is fine!

Hello all,
I face an issue, I can access data through python scripts on Ping360, but I cannot access to Ping1D. My objective is to acquire the distance data from Ping1D.
To help you with some more info:

  1. I can see the PingViewer mapping.
  2. I can access to Ping360 libraries and acquire the strength/intensity values.
  3. I have the latest firmware.
  4. I have checked USB port, different ports.

I don’t know what to do…
Any suggestions?

Thank you in advance!

Dimitris

Hi @Dimitris_Vosk,

Did you check our example ? Did it work ?

Hello Patrick,
thank you for your reply!
Unfortunately not, this message appeared ““Failed to initialize Ping!””.
But when I managed to connect to the Ping360.

I still cannot understand the reason.

Hi @Dimitris_Vosk -
How are you connecting the Ping sonar to your system? Are you using it with a BlueROV2, or connecting directly to your computer?
If you’re connecting to your computer, what USB to Serial adapter are you using? What comm port # is created by this?

Hello Tony,
I am using the sonar as standalone and it is connected to a Jetson Orin.
When they sent me the sonar, it had a connection JST-GH to JST-GH Inline adapter.
When I initialize a connection through Ping360, I can see that it is connected through “/dev/ttyUSB0” port (if this is what you meant).

Hi @Dimitris_Vosk -
The Ping360 supports a USB connection. The Ping sonar does not support USB, it outputs via serial, so to connect to a USB port you’ll need a Bluart. Simply connecting it directly to a USB port will not work! If the Jetson Orin has a serial port available elsewhere, you could wire the Ping sonar to this as well.

I am a little bit confused now.
When I connect to PingViewer, I can see the mapping of strength and distance values.
So if I buy this Bluart, will I have the chance to use Ping360 and Ping1D at the same time?

Hi @Dimitris_Vosk -
Each ping sonar has its own comm port - one for the ping360, which works without an adapter, and one that requires a USB to Serial adapter!

Hello Tony,
are you talking about this graph?
If so, what are the components that I need to purchase, in order to operate my sonar with both modes (Ping360 and Ping1D)?

P.S: My apologies but I am quite new to this topic.

Best regards,
Dimitris

Hi @Dimitris_Vosk -
No, that graph is not relevant at all!

I think I see the confusion you are having. The Ping360 is not a Ping1D !

Hello Tony!
Okay! I have purchased a Ping360 and I have this connection.
I can see the mapping of the intensities and distances through PingViewer.
Unfortunately, I can acquire the intensity/strength values but not the distance values.
What do I have to do, to get the distance values??

A code example is displayed below:
from brping import Ping360
import numpy as np
myPing = Ping360()
myPing.connect_serial(“/dev/ttyUSB0”, 115200)
if myPing.initialize() is False:
print(“Failed to initialize Ping!”)
exit(1)
data1 = myPing.transmitAngle(100)
data = np.frombuffer(data1.data, dtype=np.uint8)
print(“Locations:”,data.min(), data.max())
threshold = 200
print(“Threshold:”,np.where(data >= threshold))

OUTPUT:
Opening /dev/ttyUSB0 at 115200 bps
All locations: 0 255
Threshold: (array([ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74]),)

Hi @Dimitris_Vosk,

As @tony-white pointed, Ping360 and Ping are different sensors, that operate differently and provide different data.
Ping360 does not provide distance estimation, only a power chart by distance and angle that translate to humans as a 2D map around the sensor.
Ping1D does provide distance estimation, based on the vertical profile from the tip of the sonar.

You can use Ping360 to estimate distance by yourself, it requires analyzing and processing it’s power chart. But this is a lot of work, I recommend just buying a Ping if you want a simple vertical sonar that estimates distance.

2 Likes

Hello Patrick,
thank you for your reply!
I think now in is clear to me!
I would like to use the power chart, so I will have an estimation of sonar’s surroundings.
Can I get the power chart via python coding?
Thank you in advance!

Hi @Dimitris_Vosk,

Yes, you can use the following forum post for more information: