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

Correct ROS_MASTER_URI format for IPV6?

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

rmck gravatar image

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

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:


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>
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/", line 2101, in rostopicmain
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostopic/", 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/", line 1197, in _rostopic_list
    master = rosgraph.Master('/rostopic')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/", line 100, in __init__
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/", 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,


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>
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/", line 89, in roswtf_main
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/", line 172, in _roswtf_main
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/", line 219, in wtf_check_environment
    error_rule(r, r[0](ctx), ctx)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/", line 100, in error_rule
    _check_rule(rule, ret, ctx, ctx.errors, WtfError)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roswtf/", line 71, in _check_rule
    ctx_list.append(level(f_msg%d + ret%d, f_msg, ret))
ValueError: unsupported format character ...
edit retag flag offensive close merge delete


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 -0600 )edit

Thanks! I've raised an issue

rmck gravatar image rmck  ( 2017-08-20 23:15:07 -0600 )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 -0600 )edit

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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

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



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

Seen: 1,466 times

Last updated: Feb 23 '20