Comments (6)
If you launch two nodes, both will try to connect to the first USB device (device_number = 0
), which will fail for the second one because the LIBUSB interface has already been acquired by the first one. You can avoid this by setting the device_number
parameter:
So start the sick_tim310
node with the parameter device_number = 0
and the sick_551
node with device_number = 1
, or the other way around (you'll have to try).
It would be cool to have a better way to assign the proper nodes, e.g. by device serial number. I'm happy to accept pull requests! :)
from sick_tim.
Hi mintar, thanks for the help!
Can't believe it was that simple. How is the device number generated?
Again, many thanks!
from sick_tim.
Glad to help! The device number n simply means "the nth device in the list returned by libusb" (AFAIK, ordered first by USB bus, then USB device). It remains stable (also during reboots) as long as you always plug in the devices into the same USB ports and don't switch them around.
from sick_tim.
Just to document this here: Libusb does not guarantee consistent device ordering
See libusb/libusb#311:
If I call libusb_get_device_list with the same context, will I always get the devices in the same order? This works under linux, but is it guaranteed to work on all platforms? (assuming there's no hardware changes between calls).
No, there is no guarantee of ordering. I'll close this since it doesn't appear to be a bug report. Let me know otherwise.
from sick_tim.
Thanks for the information! However, the text you quoted says "This works under Linux". I'd interpret this as saying that consistent ordering isn't guaranteed across platforms, but the Linux implementation just happens to return a consistent ordering. Since probably 99% of the people running our driver use Linux, that could be good enough?
I agree that it's a brittle way of addressing the devices, and it would be better to use something like the device serial number (something that many cameras support), but I don't know if that's supported by the SICK scanners. Note that this problem only happens if you're using the USB interface. On Ethernet, the scanners are properly addressed via their IP address.
from sick_tim.
Could be. The device_number
parameter is not that stable, because this can change by reorganizing all all USB cables. A selection from the serial number would be better.
But since ROS is going EOL and we now have the official drivers from SICK, I guess this package will go EOL as well. Unfortunately, sick_scan2
has no interest in supporting USB SICKAG/sick_scan2#22. That's the only reason we currently use this driver with the ros_bridge
.
from sick_tim.
Related Issues (20)
- terminate called after throwing an instance of 'std::runtime_error' HOT 6
- SICK TIM651 - Frequency too low HOT 12
- MRS1000: Add intensities to point cloud HOT 4
- Problem with TIM561 when we change IP HOT 1
- Error while I use roslaunch for tim561 HOT 3
- RLexception: Sick_tim551_2050001 is neither a launch file error. HOT 1
- Roslaunch for sick_tim_561 HOT 2
- TIM310-1030000S01 - LIBUSB - Read Error: -7. HOT 9
- cloud HOT 1
- SICK TIM320-1131000 - V2.51 --> received less fields than expected fields (actual: 303, expected: 580), ignoring scan" HOT 8
- Can't compile with Windows 10 ROS environment HOT 1
- sick tim351-2134001 firmware HOT 1
- Noetic release HOT 1
- Support for TiM581? HOT 2
- Error :catkin_make -DCMAKE_BUILD_TYPE="Release"
- Port 2112 or 2112 is not created (Device is not seen). HOT 1
- TiM351 - Failed to init scanner: 2 HOT 1
- TiM TIM510-9950000S01 HOT 10
- TIM510 Scandata missaligned and distorted HOT 2
- ROS2 Migration HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sick_tim.