Skip to content

Commit

Permalink
Add warning as recommended in ros2/rosidl_python#141
Browse files Browse the repository at this point in the history
* Also link out to combined C++/Python in the "Developing a ROS2 Package" as it's a valid third option

Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
RFRIEDM-Trimble committed Aug 15, 2022
1 parent 73f10d9 commit 4915267
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/How-To-Guides/Ament-CMake-Python-Documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ See the :doc:`ament_cmake user documentation <Ament-CMake-Documentation>` for mo
To create an ``ament_python`` package, see :doc:`Creating your first ROS 2 package <../Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package>`.
``ament_cmake_python`` should only be used in cases where that is not possible, like when mixing C/C++ and Python code.


.. warning::

Calling ``rosidl_generate_interfaces`` and ``ament_python_install_package`` in the same CMake project does not work.
See this `Github issue <https://github.com/ros2/rosidl_python/issues/141>`_ for more info. It is best practice to instead
separate out the message generation into a separate package.

.. contents:: Table of Contents
:depth: 2
:local:
Expand Down
8 changes: 8 additions & 0 deletions source/How-To-Guides/Developing-a-ROS-2-Package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,11 @@ and a ``setup.py`` file that looks like:
],
},
)
Combined C++ and Python Packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When writing a package with both C++ and Python code, the
``setup.py`` file and ``setup.cfg`` file are not used.
Instead, use :doc:`ament_cmake_python <./Ament-CMake-Python-Documentation>`.

0 comments on commit 4915267

Please sign in to comment.