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

Correct ROS_MASTER_URI format for IPV6?

asked 2017-08-20 19:23:33 -0500

rmck gravatar image

updated 2017-08-21 18:03:51 -0500

According to an answer to a previous question, IPV6 networking has been integrated into the core ROS networking stack. I'm using Kinetic on Ubuntu 16 on PC and Kinetic on Ubuntu Mate 16 on a Raspberry Pi.

When I try to use an IPV6 address for my master URI it fails to work. What would be the correct format for the IPV6 address? I've tried with a conventional IPV4 network and been able to communicate between my two devices but when I switch to my IPV6 adhoc network I have no success.

As far as I can tell my adhoc network is working as expected. For example, I can SSH into my Raspberry Pi using ssh pi@IPV6address%wlan0, does %wlan0 need to be included in the master URI somehow?

At present I have tried the following:

ROS_MASTER_URI=http://[xxxx::xxxx:xxxx:xxxx:xxxx]:11311
ROS_MASTER_URI=http://xxxx::xxxx:xxxx:xxxx:xxxx:11311
ROS_MASTER_URI=http://[xxxx::xxxx:xxxx:xxxx:xxxx]%wlan0:11311
ROS_MASTER_URI=http://[xxxx::xxxx:xxxx:xxxx:xxxx%wlan0]:11311

When I run rostopic list I get the following result:

    Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/rostopic", line 35, in <module>
    rostopic.rostopicmain()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/__init__.py", line 2101, in rostopicmain
    _rostopic_cmd_list(argv)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/__init__.py", line 2041, in _rostopic_cmd_list
    exitval = _rostopic_list(topic, verbose=options.verbose, subscribers_only=options.subscribers, publishers_only=options.publishers, group_by_host=options.hostname) or 0
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/__init__.py", line 1197, in _rostopic_list
    master = rosgraph.Master('/rostopic')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 100, in __init__
    self._reinit(master_uri)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 118, in _reinit
    raise ValueError("invalid master URI: %s"%(master_uri))
ValueError: invalid master URI:http://[xxxx::xxxx:xxxx:xxxx:xxxx]%wlan0:11311

Any suggestions appreciated! Thanks

This PR looks related, https://github.com/ros/ros_comm/issue...

Edit:

I should note that I can ping both ways using the using the following commands

On the PC: ping6 raspberryPiIPV6%wlan0

On the Pi ping6 PCIPV6%wlan0

roswtf outputs the following on the PC:

    Loaded plugin tf.tfwtf
No package or stack in context
Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/roswtf", line 35, in <module>
    roswtf.roswtf_main()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/__init__.py", line 89, in roswtf_main
    _roswtf_main()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/__init__.py", line 172, in _roswtf_main
    wtf_check_environment(ctx)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/environment.py", line 219, in wtf_check_environment
    error_rule(r, r[0](ctx), ctx)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/rules.py", line 100, in error_rule
    _check_rule(rule, ret, ctx, ctx.errors, WtfError)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/rules.py", line 71, in _check_rule
    ctx_list.append(level(f_msg%d + ret%d, f_msg, ret))
ValueError: unsupported format character ...
(more)
edit retag flag offensive close merge delete

Comments

I did a little testing, and I believe this is a bug. I suggest you report it on the issue tracker for ros_comm.

Ed Venator gravatar image Ed Venator  ( 2017-08-20 22:48:26 -0500 )edit

Thanks! I've raised an issue

rmck gravatar image rmck  ( 2017-08-20 23:15:07 -0500 )edit

I haven't solved this problem but worked around it by creating an additional wlan0 interface on the Raspberry Pi that uses avahi-autoipd to automatically assign itself an IPv4 address for link-local usage

rmck gravatar image rmck  ( 2017-08-22 19:07:32 -0500 )edit
1

For anyone else in the rare situation of using an ad-hoc network for this, here's the extra interface I added to /etc/network/interfaces;

auto wlan0:0
iface wlan0:0 inet manual
  up avahi-autoipd -D --force-bind wlan0:0
  down avahi-autoipd -k wlan0:0
rmck gravatar image rmck  ( 2017-08-22 19:08:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-23 16:17:57 -0500

khasreto gravatar image

check this husarion-docs

export ROS_MASTER_URI=http://master-hostname:11311

export ROS_IPV6=on
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-08-20 19:23:33 -0500

Seen: 1,479 times

Last updated: Feb 23 '20