0
$\begingroup$

Rosanswers logo

Hi,

Im working with an autonomous sailboat with a raspberry pi 3 that uses these sensors:

Gill Ultrasonic Windsensor

MTi-G xsesnsor (gyro and gps data)

Im having an issue related to the c++ program that connects my software to the wind sensor. The problem is that the wind sensor will connect to usb1 staticly (using serial) in which it will be pure luck that this is the correct usb as it is dynamically assigned when inserted. The xsensor on the other hand will find itself with the driver I got from ROS git rep. Problem occurs when the wind sensor driver will try to use the same USBx as the xsens driver, resulting in the xsens crashing.

Is there a way to physically assign say, USB0 to always be the bottom right usb on the raspberry pi? and if so how?

I've tried to google this alot without any good results.

I'm using Ubuntu mate for ROS by the way.


Originally posted by andreasvo on ROS Answers with karma: 7 on 2017-06-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Not really a ROS problem, but I would suggest you look into udev and setting up some rules for your USB devices so that they are always assigned a unique symlink.

That way you could set things up so your wind sensor gets a device file such as: /dev/sensors/wind_sensor, and your X-sens: /dev/sensors/xsens (these are obviously examples, you can do whatever you want).


Originally posted by gvdhoorn with karma: 86574 on 2017-06-15

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by andreasvo on 2017-06-15:
Thank you gvdhoorn!

udev is just what I was looking for.

Yes, not a ROS problem at all. Just wanted to hear here first incase ROS had any features for this that I didn't know about.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.