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

Minimal ROS2 Python package

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

thinwybk gravatar image

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

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 image thinwybk  ( 2018-08-18 16:03:17 -0600 )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 image thinwybk  ( 2018-10-09 04:41:52 -0600 )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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Question Tools

2 followers

Stats

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

Seen: 866 times

Last updated: Nov 04 '17