Omron os32c unable to connect
Hello, I am trying to use the Omron os32c laser scanner for gmapping. Distro: Kinetic OS: Ubuntu 16.04 Kernel: 4.15.0-70-generic
I installed the ormon_os32c_driver from github at https://github.com/ros-drivers/omron/... Then ran rosdep to install the dependencies. I changed the host and local IP's in os32c_node.cpp to the scanner IP and computer IP. I changed the host IP in the os32c.launch to the scanner IP.
Unfortunately when I run the launch file I get the error:
[ERROR] [1574677572.980165778]: Exception caught opening session: connect. Reconnecting in 2.00 seconds ...
I am able to ping the scanner from the console. I am able to use the omron software on a windows PC to connect to the scanner and change the settings so I know the scanner works.
I am not very experienced using ROS but have completed all the beginner tutorials. I have also tried installing the dependencies of the os32c driver in the same workspace and running catkin_make.
The output from my ifconfig is:
enp0s31f6 Link encap:Ethernet HWaddr 48:2a:e3:39:11:67
inet addr:192.168.56.9 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::4451:3a7c:6602:9265/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:524 errors:0 dropped:0 overruns:0 frame:0
TX packets:612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36630 (36.6 KB) TX bytes:74453 (74.4 KB)
Interrupt:16 Memory:e9200000-e9220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:628425 errors:0 dropped:0 overruns:0 frame:0
TX packets:628425 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:79647358 (79.6 MB) TX bytes:79647358 (79.6 MB)
wlp4s0 Link encap:Ethernet HWaddr a4:c3:f0:44:aa:ed
inet addr:10.40.7.172 Bcast:10.40.7.255 Mask:255.255.255.0
inet6 addr: fe80::49d:761:3541:d06a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3764794 errors:0 dropped:0 overruns:0 frame:0
TX packets:579673 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5520560752 (5.5 GB) TX bytes:59691934 (59.6 MB)
Does anyone have previous experience using this driver successfully? Are there any tricks to it? Am I doing something wrong with the installation?
Edit:
I have tried setting the localhost and computer name IP addresses in /etc/hosts to the IP of the ethernet port.
I have tried deleting the omron driver and re-installing but with no change to the result.
When I run netstat -Intu
(output below) I can see that ROS MASTER
is at 0.0.0.0:11311
even though I set ROS_MASTER_URI=http://192.168.56.9 ...
yes, likely.
ROS 1 uses plain TCP/IP and UDP/IP.
EtherNet/IP != ethernet
, they are two different things. They (can) use the same physical medium (ie: cables, connectors, network cards, etc, so you can use the same NIC to connect to both EtherNet/IP devices and a "regular" network), but are different."ROS" does not "connect to the laser scanner". It's
os32c_node
that does that, using the support for EtherNet/IP provided byros-drivers/odva_ethernetip
. Only EtherNet/IP is used to communicate with the laser scanner.In essence:
os32c_node
translates between the two. That is the purpose of a "driver node".So coming back to your last question:
it should now be clear: it ...(more)
Thank you gvdhoorn that has clarified the problem but do you have any idea why os32c_node is not connecting to the scanner?
I'm afraid not.
Personally, I would start Wireshark and start capturing traffic while starting up
os32c_node
to see whether it actually sends data to the right addresses and ports.The
netstat
output you show is probably not whenos32c_node
is running, as I don't seeudp://:2222
there.Thank you that is good advice, I installed Wireshark and ran it as you suggested but I can't tell from the output why the destination is unreachable (below). The netstat was with os32c_node running so maybe it is not set up correctly if udp://2222 is expected.
Well, is
192.168.56.5
the IP of the laserscanner? Is it in the correct mode (ie: adapter)?I would also not edit
.cpp
files to change any IPs or ports, as that is all configurable using the.launch
file.From an earlier edit:
Clearpath never really intended to make this package open-source. Or at least: they did that based on requests from the community. They have stated, multiple times, they would not be maintaining it, nor documenting it any further. For the people that requested Clearpath to open-source this work, all of this did not matter: they knew how to work with EtherNet/IP devices and were just happy to be able to use the library.
That may not help you now, but I thought it would be good to clarify the status of the package.
There is a new/different maintainer now, but I'm not sure whether the situation has changed at all.
Yes 192.168.56.5 is the IP of the laser scanner. How to do I check/change the mode? I have removed my edits from the os32c_node.cpp. Does the Protocols in frame parameter show it is using EthernetIP?
Frame 36: 74 bytes on wire (592 bits), 74 bytes captured (592 bits) on interface 0 Interface id: 0 (enp0s31f6) Interface name: enp0s31f6 Encapsulation type: Ethernet (1) [Protocols in frame: eth:ethertype:ip:tcp]
I have no idea. That would be device specific. Some/many EtherNet/IP devices can be put in either scanner or adapter mode. I don't know whether this device is capable of that. In any case, it should probably be an adapter.
But it's just something to check. I do not claim it is the cause of your problems here.
be sure to update the
.launch
file with the correct values then.os32c_node
cannot use anything else but, so it is. No need to check that.