ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Omron os32c unable to connect

asked 2019-11-25 05:00:27 -0500

joew930 gravatar image

updated 2019-11-26 03:53:15 -0500

gvdhoorn gravatar image

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 ... (more)

edit retag flag offensive close merge delete

Comments

1

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 ...(more)

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 03:57:43 -0500 )edit

Thank you gvdhoorn that has clarified the problem but do you have any idea why os32c_node is not connecting to the scanner?

joew930 gravatar image joew930  ( 2019-11-26 04:20:22 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 04:22:50 -0500 )edit

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)
joew930 gravatar image joew930  ( 2019-11-26 04:47:11 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 04:59:23 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 05:09:54 -0500 )edit

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]

joew930 gravatar image joew930  ( 2019-11-26 05:19:40 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 05:22:39 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-11-26 09:09:32 -0500

joew930 gravatar image

updated 2019-11-26 09:44:27 -0500

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/man... 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.

edit flag offensive delete link more

Comments

That would certainly explain why the destination is unreachable.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 09:13:24 -0500 )edit

If you could add the model nrs that do support EtherNet/IP connections, that would make this answer even better.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-26 09:14:37 -0500 )edit

Thanks for your help with this gvdhoorn, I think I am going to get a SICK scanner instead.

joew930 gravatar image joew930  ( 2019-11-26 09:45:09 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-11-25 05:00:27 -0500

Seen: 718 times

Last updated: Nov 26 '19