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

Minimal ROS2 Python package

asked 2017-11-04 12:49:48 -0500

thinwybk gravatar image

updated 2017-11-04 13:44:43 -0500

How looks the structure and the content of a plain ROS2 library level package? The intent of the package is to encapsulate functionality implemented in Python which can be imported into other ROS2 packages.

  • no ROS2 dependency (despite for building, linting, etc.)
  • no scripts
  • no nodes
  • no docs
  • no tests just plain ament linter checks (copyright, flake8, pep257)

EDIT: Draft on GitHub.

edit retag flag offensive close merge delete


Will be obsolete as soon as is implemented.

thinwybk gravatar image thinwybk  ( 2018-08-18 16:03:17 -0500 )edit

How are Python package dependencies managed in ROS2? I could just find an example where an install_requires dependency is assumed to be pre-installed via install or PyPi.

thinwybk gravatar image thinwybk  ( 2018-10-09 04:41:52 -0500 )edit

In this case there shouldn't be any limitations w.r.t. Python packaging (Pipfile, etc.) right?

thinwybk gravatar image thinwybk  ( 2018-10-21 13:50:57 -0500 )edit

I don't think so. So long as the alternative mechanism (pipfile or requirements.txt or whatever) will avoid installing things that are already installed by the system package manager (like apt).

William gravatar image William  ( 2018-10-22 22:03:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-09 13:06:19 -0500

William gravatar image

It will work just like any file works. However, if you want to release it in our infrastructure you'll want to duplicate the entries in the package.xml and ensure there are rosdep rules for it. This would allow for dependencies to be fetch from something other than pip, like apt.

edit flag offensive delete link more

Question Tools



Asked: 2017-11-04 12:49:48 -0500

Seen: 833 times

Last updated: Nov 04 '17