aliasrobotics / aztarna

aztarna, a footprinting tool for robots.
https://aliasrobotics.com
GNU General Public License v3.0
89 stars 27 forks source link

ROS2 module for aztarna #26

Closed olaldiko closed 5 years ago

LanderU commented 5 years ago

This is unfinished work, right?

LanderU commented 5 years ago

Crystal error:

root@wks4:~/aztarna# aztarna -t ROS2
aztarna.cmd - Exception occurred during execution
Traceback (most recent call last):
  File "/usr/local/bin/aztarna", line 11, in <module>
    load_entry_point('aztarna==1.0', 'console_scripts', 'aztarna')()
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/cmd.py", line 90, in main
    self.stdin = sys.stdin
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/cmd.py", line 82, in main
    is done automatically. The optional arguments stdin and stdout
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/ros/ros2/scanner.py", line 100, in scan
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/__init__.py", line 25, in init
    context = get_default_context() if context is None else context
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/utilities.py", line 31, in get_default_context
    g_default_context = Context()
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/context.py", line 28, in __init__
    from rclpy.impl.implementation_singleton import rclpy_implementation
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/impl/implementation_singleton.py", line 31, in <module>
    rclpy_implementation = _import('._rclpy')
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/impl/__init__.py", line 21, in _import
    return importlib.import_module(name, package='rclpy')
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'rclpy._rclpy

Dashing error:

root@wks4:~/aztarna# aztarna -t ROS2
aztarna.cmd - Exception occurred during execution
Traceback (most recent call last):
  File "/usr/local/bin/aztarna", line 11, in <module>
    load_entry_point('aztarna==1.0', 'console_scripts', 'aztarna')()
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/cmd.py", line 90, in main
    self.stdin = sys.stdin
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/cmd.py", line 82, in main
    is done automatically. The optional arguments stdin and stdout
  File "/usr/local/lib/python3.7/dist-packages/aztarna-1.0-py3.7.egg/aztarna/ros/ros2/scanner.py", line 100, in scan
  File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/__init__.py", line 70, in init
    context = get_default_context() if context is None else context
  File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/utilities.py", line 31, in get_default_context
    g_default_context = Context()
  File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/context.py", line 28, in __init__
    from rclpy.impl.implementation_singleton import rclpy_implementation
  File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/impl/implementation_singleton.py", line 31, in <module>
    rclpy_implementation = _import('._rclpy')
  File "/opt/ros/dashing/lib/python3.6/site-packages/rclpy/impl/__init__.py", line 21, in _import
    return importlib.import_module(name, package='rclpy')
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'rclpy._rclpy'
LanderU commented 5 years ago

I think the problem are the python versions.

olaldiko commented 5 years ago

@LanderU, I have isolated the dependency on Python3.7, so now it should be installable on default ROS2 python installations. I have also limited the maximum ROS domain ID to 232, it was throwing an error on @borkenerice's machine. I have read that this is the limit for several DDS implementations (FastRTPS and RTI), is that correct? There's not much documentation about it.

LanderU commented 5 years ago

You're right, https://github.com/ros2/rmw_fastrtps/issues/261

olaldiko commented 5 years ago

Given the unstability of using multiple rmw implementations I have moved the multi-rmw functionality to a separate branch. We will tackle the usage of multiple rmw implementations after base scanner merge. I have added functionality for getting service information from hosts.

LanderU commented 5 years ago

So, is this finished? If so, I'll test it this night and if we're okay, merge it.

olaldiko commented 5 years ago

I think so! Let's hope that everything is ok and we will be able to merge it tomorrow.

olaldiko commented 5 years ago

I have updated the readme and the docs. I think that we are done with this! If so, merge the PR and I will update the PyPi and RTD versions!