Communication to external sensor

I have a BlueROV2 and I want to connect a Serial nanomodem / acoustic sensor to it.

https://www.mdpi.com/2079-9292/11/9/1446

I can connect the sensor to the Raspberry Pi using an interface serial/USB. I want to send a command to the sensor, which has a unique address (for example, 159). I am using a Python driver to communicate with the sensor, which works perfectly.
https://github.com/bensherlock/nm3-python-driver

My question is, how can I configure BlueOS to make this happen?

Please refer to the image below. I want to run my Python script on the host and ping/communicate with the sensor through BlueOS. I believe it is necessary to set up some sort of port forwarding.

Thanks!

Hi @markusbuchholz
Checkout one of our newest guides, it may be able to help you!

Hi @tony-white,

Thank you for your support. Your guidance has been extremely helpful since I use BlueBoat in addition to BlueROV2.

Due to the urgency of my case, I decided to use the solution presented in the following image. The software I use communicates with USB (acoustic sensors), so I easily built a Docker container with a ROS environment. The Docker container has to be built on the RPI and then run. A ROS node takes samples from the sensor /dev/ttyUSB0 and publishes them as a ROS topic.

I have not changed anything inside the BlueOS. This concept has been tested and works perfectly fine.

Thank you again and good luck!

Hi Markus!
Congrats on getting it working! Have you checked out the ROS extension you can find here?
If you’d like to share your code, it may be super helpful for others! As it is already dockerized, it should be very easy to turn it into a BlueOS extension. A quick pull request and it’s listed on for all! We’re working to add capacity to even charge $ for extensions, so developers like you can benefit directly in the future.
Checkout the extension documentation, and let us know if you try this and get stuck.

In terms of the recent guide I shared, if you want your topside computer to receive the data from the device as if it were plugged in directly, you could convert it to a ROS topic locally using VirtualHere for the connection.

I’m curious, what sort of usb device and acoustic sensor are you using?

Hi @tony-white,

I’ll do my best to contribute to this exciting project by making a pull request. I work in academia as a post-doc in marine robotics. We use nano-mode acoustic communication, which is a state-of-the-art technology for underwater communications. You can find more information about it in the links below. The software I developed is a simple ground truth vehicle estimation concept, which is displayed below:

article
documentation

Thanks! The links you shared before were a bit tricky, but this is super cool work to see!

1 Like