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

i have an error when i want to ros2 node list

asked 2020-02-14 23:10:52 -0500

menguiin gravatar image

updated 2020-02-15 04:36:43 -0500

gvdhoorn gravatar image

when i command ros2 node list, i get follwing line

menguiin@menguiin-Lenovo-IdeaPad-S340-15API:~$ ros2 node list
Traceback (most recent call last):
  File "/opt/ros/dashing/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.7.9', 'console_scripts', 'ros2')()
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2node/command/node.py", line 39, in main
    return extension.main(args=args)
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2node/verb/list.py", line 34, in main
    with NodeStrategy(args) as node:
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2cli/node/strategy.py", line 26, in __init__
    if is_daemon_running(args):
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2cli/node/daemon.py", line 34, in is_daemon_running
    addr = ('localhost', get_daemon_port())
  File "/opt/ros/dashing/lib/python3.6/site-packages/ros2cli/daemon/__init__.py", line 105, in get_daemon_port
    base_port += int(os.environ.get('ROS_DOMAIN_ID', 0))
ValueError: invalid literal for int() with base 10: '10.80.16.200'
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-02-15 04:40:47 -0500

gvdhoorn gravatar image

The error message you include has this:

    base_port += int(os.environ.get('ROS_DOMAIN_ID', 0))
ValueError: invalid literal for int() with base 10: '10.80.16.200'

the cause is most like this: ROS_DOMAIN_ID is not supposed to be an entire IP address (as you have set it to), but a single number. And actually: a number in the range [0, 255) (although it has been suggested to keep it under 232 (here fi: #q318386)).

ROS_DOMAIN_ID is not the same as ROS_MASTER_URI, ROS_IP or ROS_HOSTNAME. It's a single number used to separate ROS 2 "networks" from each other (in a way, there is more to it, but that would be too much detail). See #q318386 again if you want to get some more information.

So change your ROS_DOMAIN_ID from 10.80.16.200 to just a single number and I would expect things to start working.

edit flag offensive delete link more

Comments

Dirk Thomas gravatar image Dirk Thomas  ( 2020-02-15 09:42:55 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-14 23:10:52 -0500

Seen: 897 times

Last updated: Feb 15 '20