0
$\begingroup$

Rosanswers logo

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/tree/kinetic-devel 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:11311/

joe@joe-mobile-robot:~/navigation$ netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:11311           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:53889           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:41479           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:43431           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:43497           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:40011           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
udp        0      0 0.0.0.0:631             0.0.0.0:*                          
udp        0      0 0.0.0.0:52014           0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:38742           0.0.0.0:*                          
udp        0      0 0.0.0.0:56244           0.0.0.0:*                          
udp        0      0 0.0.0.0:41502           0.0.0.0:*                          
udp        0      0 127.0.1.1:53            0.0.0.0:*                          
udp        0      0 0.0.0.0:68              0.0.0.0:*                          
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::59807                :::*             

Am I fundamentally misunderstanding how ROS connects to devices using ethernetIP?


Originally posted by joew930 on ROS Answers with karma: 16 on 2019-11-25

Post score: 0


Original comments

Comment by gvdhoorn on 2019-11-26:\

Am I fundamentally misunderstanding how ROS connects to devices using ethernetIP?

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 by ros-drivers/odva_ethernetip. Only EtherNet/IP is used to communicate with the laser scanner.

In essence:

[other nodes] <-> ROS <-> os32c_node <-> EtherNet/IP <-> LaserScanner

os32c_node translates between the two. That is the purpose of a "driver node".

So coming back to your last question:

how [does] ROS connect to devices using ethernetIP?

it should now be clear: it doesn't. That's the job of os32c_node.

Comment by joew930 on 2019-11-26:
Thank you gvdhoorn that has clarified the problem but do you have any idea why os32c_node is not connecting to the scanner?

Comment by gvdhoorn on 2019-11-26:
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 when os32c_node is running, as I don't see udp://:2222 there.

Comment by joew930 on 2019-11-26:
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.

1   0.000000000 192.168.56.9    192.168.56.5    TCP 74  41424 → 44818 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=1275813123 TSecr=0 WS=128

2   0.000925364 192.168.56.5    192.168.56.9    TCP 60  44818 → 41424 [RST, ACK] Seq=1 Ack=0 Win=0 Len=0

3   0.000960081 192.168.56.5    192.168.56.9    ICMP    70  Destination unreachable (Port unreachable)

Comment by gvdhoorn on 2019-11-26:
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.

Comment by gvdhoorn on 2019-11-26:
From an earlier edit:

I am frustrated by the lack of documentation for how to use the package.

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.

Comment by joew930 on 2019-11-26:
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]

Comment by gvdhoorn on 2019-11-26:\

How to do I check/change the mode?

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.

I have removed my edits from the os32c_node.cpp

be sure to update the .launch file with the correct values then.

Does the Protocols in frame parameter show it is using EthernetIP?

os32c_node cannot use anything else but, so it is. No need to check that.

Comment by joew930 on 2019-11-26:
Thank you for your help gvdhoorn. I think from what you say there is an issue with the configuration of the scanner rather than the ROS packages. I have been reading

https://assets.omron.eu/downloads/manual/en/v1/z336_os32c-dm_users_manual_en.pdf

which was used to create the driver but there doesn't seem to be any requirement to change settings on the scanner other than the IP address.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think I may have the answer to my question but it is not a good one. The part number of my OS32C scanner is 40603-0020 and according to p15 of the user manual https://assets.omron.eu/downloads/manual/en/v1/z296_os32c_users_manual_en.pdf this model does not support measurement data via EthernetIP. So I guess I need a new scanner!

Edit: Model numbers OS32C-SN-DM: 40591-0040 and OS32C-SN-DM-4M: 40603-0040 do support EthernetIP transfer of measurements.


Originally posted by joew930 with karma: 16 on 2019-11-26

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2019-11-26:
That would certainly explain why the destination is unreachable.

Comment by gvdhoorn on 2019-11-26:
If you could add the model nrs that do support EtherNet/IP connections, that would make this answer even better.

Comment by joew930 on 2019-11-26:
Thanks for your help with this gvdhoorn, I think I am going to get a SICK scanner instead.

$\endgroup$

Your Answer

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