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

rosjava network setup

asked 2015-08-17 20:22:19 -0500

smihael gravatar image

I'm running roscore on a remote computer.

I created a modified RosRunClass to manually set master URI.

    final String master = argv[argv.length - 1]; //
    nodeConfiguration.setMasterUri(new URI(master));

I've also overridden Advertise URI as follows:

    AdvertiseAddressFactory adress = new AdvertiseAddressFactory() {
        String _master = master;
        public AdvertiseAddress newDefault() {
            String IPADDRESS_PATTERN = "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
            Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);
            Matcher matcher = pattern.matcher(_master);
            if (matcher.find()) _master =;
            else _master = "localhost";
            return new AdvertiseAddress(_master);


However I still get following exception when I try to register a new Publisher.

org.ros.exception.RosRuntimeException: Illegal character in authority at index 7:

I have no idea where "" comes from as this is NOT my internal (nor external) IP.

I'm using newest rosjava available in Ubuntu repositories (for ros indigo).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-18 05:29:46 -0500

smihael gravatar image

I found out what my problem was. Despite $ROS_MASTER_IP being set correctly, $ROS_IP was not set in bash session from where I launched my node.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-08-17 20:22:19 -0500

Seen: 225 times

Last updated: Aug 17 '15