Why am I unable to use "rosinit" on a machine with a purely numeric name in MATLAB R2020a?

6 visualizaciones (últimos 30 días)
I am working on an Ubuntu 16.04 machine. The machine has a purely numeric hostname, for example: 707406378. If I try to use "rosinit" on this machine in MATLAB R2020a, this throws a warning and error and fails to complete successfully:
Warning: The IP address 42.42.42.42 in the "NodeHost" setting is not associated with any network interface.
It is possible that MATLAB cannot be reached by other ROS nodes.
> In ros.internal/Net/generateNodeHost (line 368)
In ros/Node/parseArguments (line 313)
In rosinit (line 92) The ROS master is already running on port 11311. Try connecting to this master or creating a new ROS master
that uses a different port.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 15 de Abr. de 2021
Editada: MathWorks Support Team el 15 de Abr. de 2021
The problem here is that your hostname is in fact interpreted as IP-address by MATLAB. Actually, not only MATLAB will do this, ROS itself (used outside of MATLAB) would have the same behavior and other tools on the system can have issues with this as well. In that sense to resolve the issue and to prevent any further issues going forwards (not only with MATLAB) we would recommend you actually change the hostname of your machine to something which cannot accidentally be interpreted as IP-address.
Some further background on IPv4 addresses
IP4v addresses in the basis are simply 32-bit values, for example:
00101010001010100010101000101010
and it is then just for readability that these values are grouped in four 8-bit values:
00101010 00101010 00101010 00101010
of which the 8-bit unsigned integer decimal values are taken:
42 42 42 42
which are then concatenated into the familiar format which everyone is used to working with: 42.42.42.42.
You can however also just take the whole 32-bit integer value and directly translate it into its 32-bit unsigned integer decimal value, in this example: 707406378. And you can in fact use that value in places to refer to that exact same IP-address.

Más respuestas (0)

Categorías

Más información sobre Publishers and Subscribers en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by