Skip to main content

Toolsuite for running ROS environments directly from python code, without any specific requirements outside of usual python

Project description

https://travis-ci.org/asmodehn/pyros-setup.svg?branch=master

Toolsuite for running ROS environments directly from python code, without any specific requirements outside of usual python.

This is a pure python package, to be installed in your system, in order to allow easy ROS access from your python environment.

To install it:

sudo pip install -i https://testpypi.python.org/pypi pyros_setup

To run the self tests, using entry_points defined in setup.py:

pyros_setup

OR using the python package directly:

python -m pyros_setup

OR using nosetests specifically:

nosetests pyros_setup

It can also be used from source inside a catkin workspace in the same way. The workspace act as a virtual environment (using https://github.com/asmodehn/catkin_pure_python). This is useful for development along with ROS packages:

$ catkin_make
$ source devel/setup.bash
$ python -m pyros_setup
$ pyros_setup
$ nosetests pyros_setup

However it is also usable by catkin from source for ease of development and compatibility testing.

Basically it allows you to do this:

try:
    import rospy
    import roslaunch
    import rosgraph
    import rosnode
except ImportError:  # if ROS environment is not setup, we emulate it.
    import pyros_setup
    pyros_setup = pyros_setup.delayed_import_auto(base_path=os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..', '..'))
    import rospy
    import roslaunch
    import rosgraph
    import rosnode

A ROS package WILL NOT be provided, since there is no simple and clean way to turn a pure python package into a catkin package. If you want to depend on pyros-setup, you should use the rosdep pip dependency mechanism.

Note: If you know any easier / less tricky / more pythonic way of handling dynamic imports, let me know!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyros_setup-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

pyros_setup-0.1.0-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyros_setup-0.1.0.tar.gz.

File metadata

  • Download URL: pyros_setup-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyros_setup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 731391256aed0f00642066af37eb26168154cbda73a24ee789534cd68ebbae64
MD5 5295d243caa18100f4115584a1e013d8
BLAKE2b-256 53642cd1f8e7d534823f24d7e3a3ca81e2ef37d26710a4616ad9baaecef14db3

See more details on using hashes here.

File details

Details for the file pyros_setup-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyros_setup-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 65aee1475ffc379edfb81c936d8b7c72532ca2dc2b6ff0cf4d44b43057f62261
MD5 678aa3dcb1c86b25bc8a442b73ad9191
BLAKE2b-256 65b4bd8c58b40ce95544dd41335ac1548cadc2fa37a7b74d2fe7f7754f8cbfcb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page