tgu / RosSwift

ROS Robotic Operating System - Swift implementation of core client libraries and rosmaster. Based on roscpp.
MIT License
58 stars 17 forks source link

Run-time errors with ubuntu 20.04 #4

Closed kohonda closed 3 years ago

kohonda commented 3 years ago

Expected behavior

The sample listener and publisher expected to work as if using macOS.

Actual behavior

It does not work on Ubuntu 20.04.

The following error occurred when launching roscore and publisher (or listener)

[13:45:39.645] [ERROR] [Master.swift:372 execute(method:request:host:port:)] The operation could not be completed. (NIO.NIOConnectionError error 1.)
[13:45:39.647] [ERROR] [param.swift:249 has(key:)] hasParam failed: NIOConnectionError(host: "localhost", port: 11311, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO.SingleConnectionFailure(target: [IPv4]localhost/127.0.0.1:11311, error: connection reset (error set): Connection refused (errno: 111))])

Steps to reproduce

Build and Test from a terminal on Ubntu20.04

$ cd RosSwift
$ swift build
$ swift test

-> I can get the same error as described above.

If possible, minimal yet complete reproducer code (or URL to code)

No code modification is required for reproduction.

RosSwift version/commit hash

Current main branch

ba5964bbca6021a55dcd9b105b602ec4f6ed169a

Swift & OS version (output of swift --version && uname -a)

honda@honda:~$ swift --version && uname -a
Swift version 5.4.2 (swift-5.4.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Linux honda 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Thanks for making the great library!

tgu commented 3 years ago

I cannot reproduce the error on Ubuntu 20.04, the error message indicates that the ros master is not found! Have you checked that ROS_MASTER_URI is properly configured?

kohonda commented 3 years ago

Sorry, I didn't set the ROS_MASTER_URI. After setting it, it works well. I misunderstood because macOS automatically searched for the ROS_MASTER_URI without setting it manually. Thank you.