Ask Your Question
0

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

Comments

Will be obsolete as soon as https://github.com/ros2/ros2cli/issue... is implemented.

thinwybk gravatar imagethinwybk ( 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 setup.py install or PyPi.

thinwybk gravatar imagethinwybk ( 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 imagethinwybk ( 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 imageWilliam ( 2018-10-22 22:03:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

William gravatar image

It will work just like any setup.py 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 362 times

Last updated: Nov 04 '17