Home        Store        Docs        Blog

Ping Implementation Overview

(Drew Fulton) #21

I’m getting the same error but realized that even using the pip install from git I’m only getting 0.0.7.

EDIT: Maybe i’ll just wait a few hours to see if it needs to update through servers/caches somewhere.

(Drew Fulton) #22

Do I need to update ping-python on the companion computer?

(Patrick José Pereira) #23

It’s not necessary to update companion, please wait a couple of hours to install the library and to try again.

(Drew Fulton) #24

Sounds great. Thanks for your help Patrick. I’ll check back in later today and let you know how it is going. Thanks!

(Drew Fulton) #25

I’m still only getting version 0.0.7 via normal pip install or doing the pip git install. I’ll check back in tomorrow and if that doesn’t work, I’ll look at cloning from git and building from source. Just thought I’d update here in case anyone else was following this.

(Patrick José Pereira) #26

Hi Drew,

Since we don’t have a new version yet, it’ll show as 0.0.7 but it’ll have the last modifications. For both pip git+ and pip install ....master.zip.

1 Like
(Drew Fulton) #27

I didn’t even think about that. Works fine now. I am able to get that script and ping viewer to run simultaneously. One interesting behavior is that when I was running just the script, I would get this feedback (sample of 1 entry):

ID: 1211 - distance_simple
Header: start_1: 66 start_2: 82 payload_length: 5 message_id: 1211 src_device_id: 0 dst_device_id: 0
Payload:
  - distance: 2244
  - confidence: 57
Checksum: 605 check: 605 pass: True


--------------------------------------------------

Once ping viewer started running, I started getting a more extensive feedback. This is the sample data:

ID: 1300 - profile
Header: start_1: 66 start_2: 82 payload_length: 226 message_id: 1300 src_device_id: 0 dst_device_id: 0
Payload:
  - distance: 0
  - confidence: 0
  - pulse_duration: 26
  - ping_number: 405
  - scan_start: 0
  - scan_length: 914
  - gain_index: 2
  - profile_data_length: 200
  - profile_data: ['0xa2', '0x1e', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfa', '0xd6', '0x71', '0x58', '0x30', '0x2b', '0x1f', '0x32', '0x42', '0x86', '0xa0', '0xfc', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xfd', '0xec', '0xc5', '0x93', '0x62', '0x49', '0x24', '0x18', '0x12', '0x9', '0x7', '0x9', '0xa', '0x8', '0x8', '0x6', '0x3', '0x1', '0x0', '0x0', '0x0', '0x1', '0x2', '0x3', '0x3', '0x4', '0x3', '0x3', '0x4', '0x3', '0x3', '0x3', '0x3', '0x3', '0x4', '0x5', '0x8', '0x9', '0xb', '0xf', '0x11', '0x15', '0x17', '0x1a', '0x1c', '0x1f', '0x1e', '0x1e', '0x20', '0x1c', '0x1c', '0x19', '0x18', '0x16', '0x17', '0x14', '0x15', '0x14', '0x11', '0x10', '0xd', '0xa', '0x8', '0x7', '0x4', '0x3', '0x1', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0xc1', '0xfd', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0']
Checksum: 28050 check: 28050 pass: True


--------------------------------------------------

I found it interesting that my script didn’t change the request but I started getting the profile rather than the distance_simple data. Guess I’ll just change that sample script to request the profile all the time and then I can pull the data I need out of that (distance/confidence).

Oh, ignore the crazy data values. It is sitting on a workbench so it isn’t going to get anything valuable.

Thanks for all of your help Patrick and Jacob.

(Patrick José Pereira) #28

Hi Drew,

Yes, it’s not possible to know who requested the messages, you’ll also get everything requested by all application that are communicating with Ping since we do not support src/dst id requests for now.

(Drew Fulton) #29

I just wanted to say thank everyone for their help. I have it fully integrated into my software now and it seems to be working great. Thanks!

(Drew Fulton) #30

I’ve spent most of the evening working on this and now have it basically working as I want it to however I am finding one weird glitch. The python script seems unable to process the data from ping-proxy as fast as PingViewer can. For example, the ROV with Ping installed is sitting on my desk. With pingviewer running, I can put my hand on the ping itself and the data changes in ping viewer immediately. If I have my script running, it can take more than 10 seconds to see that data reflect in the data there. That script can be running either on my topside computer or on my companion computer. Either way, I get a delay. I wanted to post this tonight in case there is a theoretical thing that I’m missing. Tomorrow I will simplify my code down to the bare bones and post it here if I can’t solve it on my own.

Also, if I kill off my script with a Ctrl+C it also stops the feed on PingViewer. If I close and reopen PingViewer then it continues. I am also getting some errors unpacking payloads which seems to be pretty random. The first thing I am going to do in the morning is open up the electronics tube again and update the firmware on the ping since I am still running 3.24 as it shipped.

(Drew Fulton) #31

To follow up on my strange delays I was experiencing, I tracked it down to a time.sleep() command in my while True main loop. By removing that brief sleep pause, it seems to be working just fine now. Very excited to have it functional. I can’t wait to actually get it in the water now. Still going to update the firmware this afternoon.

1 Like