Home        Store        Docs        Blog

Ping1D Through Jetson Nano Companion

Hi there,

I have a Ping1D that I’m trying to get working through a Jetson Nano connected to the surface control station using a 2.4GHz DDL. So far, I’ve found it pretty easy to get the Ping working through the standard RPi companion set up, and was able to modify the companion to connect to the control station via wireless, so everything’s good to go… except my understanding of how the companion works and my general coding knowledge. :slight_smile:

Some questions:

  1. I’ve tried to install the associated ping code on the Jetson, but I don’t see how to tell it send its data over UDP. How does companion do this?
  2. Right now it seems the Ping is not even recognized by the Jetson. I get power to the BLUART, but no signal flash. It shows up as ttyUSB*. Could I be missing a driver for the BLUART? Would it just be easier if I connect via serial?
  3. Does companion power up the Ping on boot? If so, is there a way to switch it on and off to conserve energy?

I’m confident I’ll get this working soon with a little help. Thanks in advance!

Hi,

This is done via pingproxy.py, with the a command line that looks like this:
pingproxy.py --device /dev/ttyUSB0

If you are using companion source code, probably our service is looking for ping in /dev/serial/ping/Ping1*, that’s created via ping_enumerator.py.

Ping starts scanning when power is provided, you can disable the sensor with the message: set_ping_enable.

Thanks @patrickelectric. I’ll work with it a more over the next few days and let you know how it goes.

Hi @poozwally,

No problem, let us know how it goes!

Hi again @patrickelectric,

So I’ve managed to get the ping working through my Jetson Nano over wireless by manually inputting pingproxy.py --device /dev/ttyUSB0 at the command line. Now I’m trying to get my startup script (comparable to your .companion.rc) working to load it on boot.

I’ve essentially emulated what BR has done with the rc.local pointing to .companion.rc with some changes to better suit my application and here’s the rc-local status:


And here’s the output from rc-local:

The problem with the Ping is obviously that I don’t have the brping module. How do I get that sorted?

The other problem you can’t see from the above outputs is more general rather than Ping-specific. The .rc file isn’t saving the .param files into the ~/ directory. I can save them into there manually, but that’s not as slick for updating later.

Any guidance is greatly appreciated!

Hello,

You can install it with pip:
pip install bluerobotics-ping

Check this PR by @patrickelectric:

Thanks so much @williangalvani,

The .param file copy is now working correctly, which is fantastic.

I’m still having issues with the ping, but to be fair I can’t even get it to work connected via BLUART to a PC with Ping Viewer on it. Everything’s upto date as of a few weeks ago and it worked fine last week. When it’s plugged in, the BLUART is flashing a green LED every second (pic below) as opposed to the whit LED above it that flashes with each ping when it works properly. I’m also getting the “red dot” on the Ping Viewer Device Manager screen when this happens.

I tried another USB -> serial converter and it works well plugged into the PC, but that’s not working on the base BR pi setup I have for benchmarking nor on my Jetson Nano (probably a driver issue). I’ve tried a few known-to-be-working USB cables with the BLUART and I get the same result as above… or nothing at all. Is it possible I’ve killed the BLUART?

Also are there any .param files needed for pingproxy.py? I took a look through the code, and it doesn’t appear so, but I also don’t see where it’s grabbing the IP and PORT for the UDP connection.

…getting closer…

It listens to port 9090 at all interfaces.

I don’t think the Bluart are easy to break. Try connecting the Bluart’s TX and RX together and type something into a serial console to see if it is echoed. If it echoes the characters you type, it should be fine.

1 Like

Thanks for the help all. I have this working now using a different USB-serial adapter. BLUART tested fine, but was not working her for whatever reason. I’ll likely connect directly to serial, but that’s covered on another conversation so feel free to close this.

1 Like

This topic was automatically closed after 27 hours. New replies are no longer allowed.