Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed ROS core python packages #14

Open
asmodehn opened this issue Mar 7, 2019 · 3 comments
Open

Embed ROS core python packages #14

asmodehn opened this issue Mar 7, 2019 · 3 comments

Comments

@asmodehn
Copy link
Member

asmodehn commented Mar 7, 2019

So that someone doesn't need to do the whole ROS setup mess, just to test simple pyros scripts...

One could just copy paster rospy here, but that would be troublesome from maintenance...
Or we could include a patched version from hte installer, or the package dependencies (maybe an option) ?
Anyway documentation would help as well.

@asmodehn
Copy link
Member Author

asmodehn commented Mar 7, 2019

ie. We want to avoid this situation :

2019-03-07 17:48:32,636 loading pyros_setup and configuring your ROS environment
2019-03-07 17:48:32,720 Loading configuration from /home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/var/pyros_setup-instance/pyros_setup.cfg
2019-03-07 17:48:32,720 Default configuration has been generated in /home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/var/pyros_setup-instance/pyros_setup.cfg
2019-03-07 17:48:32,720 Dynamic PyROS setup starting...
2019-03-07 17:48:32,721  => Pyros_setup v0.2.1 Emulating ROS setup now for distro unknown and workspaces ()
2019-03-07 17:48:32,721 Configured workspace /opt/ros/unknown not found. Please double check your configuration. Skipping...
2019-03-07 17:48:32,721  => ROS setup emulation done.
2019-03-07 17:48:32,721 Dynamic PyROS setup done.
2019-03-07 17:48:32,722 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x7fcae43ac4a8>: No module named 'rospy'
File "rospy_safe.py", line 6, in <module>:
import rospy Traceback (most recent call last):
  File "/home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/lib/python3.6/site-packages/pyros_interfaces_ros/__init__.py", line 31, in <module>
    from .api import rospy_safe  # early except to prevent unintentional workaround in all modules here for ROS packages
  File "/home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/lib/python3.6/site-packages/pyros_interfaces_ros/api/rospy_safe.py", line 6, in <module>
    import rospy
ModuleNotFoundError: No module named 'rospy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/lib/python3.6/site-packages/bokeh/application/handlers/code_runner.py", line 179, in run
    exec(self._code, module.__dict__)
  File "/home/alexv/Projects/Pyros/sliders.py", line 18, in <module>
    import pyros_interfaces_ros
  File "/home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/lib/python3.6/site-packages/pyros_interfaces_ros/__init__.py", line 45, in <module>
    from .api import rospy_safe
  File "/home/alexv/.local/share/virtualenvs/Pyros-0YBYed3Q/lib/python3.6/site-packages/pyros_interfaces_ros/api/rospy_safe.py", line 6, in <module>
    import rospy
ModuleNotFoundError: No module named 'rospy'
 

By falling back on an "embedded" version of rospy, installed along with pyros-rosinterface (as a dependency or other...)

@asmodehn
Copy link
Member Author

Note : rosimport now comes with genpy and genmsg, as pure python packages.

We might not want to embed all ROS packages in here, but we might want to optionally depend on another wheel, that contains at least the basic packages, useful for testing ROS integration on a usual computer / VM / CI.

@asmodehn
Copy link
Member Author

We need also to decide where it is better to embed the code:

  • in system without ROS.
  • in python pip packages without system.
  • in source without pip packages.

See : pyros-dev/rosimport#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant