Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "license" option to all uses of ros2 pkg create. (backport #4070) #4073

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/How-To-Guides/Developing-a-ROS-2-Package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ All ROS 2 packages begin by running the command

.. code-block:: bash
ros2 pkg create <pkg-name> --dependencies [deps]
ros2 pkg create --license Apache-2.0 <pkg-name> --dependencies [deps]
in your workspace (usually ``~/ros2_ws/src``).

Expand All @@ -42,13 +42,13 @@ To create a package for a specific client library:

.. code-block:: bash
ros2 pkg create <pkg-name> --dependencies [deps] --build-type ament_cmake
ros2 pkg create --build-type ament_cmake --license Apache-2.0 <pkg-name> --dependencies [deps]
.. group-tab:: Python

.. code-block:: bash
ros2 pkg create <pkg-name> --dependencies [deps] --build-type ament_python
ros2 pkg create --build-type ament_python --license Apache-2.0 <pkg-name> --dependencies [deps]
You can then update the ``package.xml`` with your package info such as dependencies, descriptions, and authorship.

Expand Down
6 changes: 3 additions & 3 deletions source/Tutorials/Advanced/FastDDS-Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,23 @@ First, create a new package named ``sync_async_node_example_cpp`` on a new works
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
ros2 pkg create --build-type ament_cmake --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
.. group-tab:: macOS

.. code-block:: console
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
ros2 pkg create --build-type ament_cmake --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
.. group-tab:: Windows

.. code-block:: console
md \ros2_ws\src
cd \ros2_ws\src
ros2 pkg create --build-type ament_cmake --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies rclcpp std_msgs -- sync_async_node_example_cpp
Then, add a file named ``src/sync_async_writer.cpp`` to the package, with the following content.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Navigate into the ``ros2_ws/src`` directory and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_cmake bag_recorder_nodes --dependencies example_interfaces rclcpp rosbag2_cpp std_msgs
ros2 pkg create --build-type ament_cmake --license Apache-2.0 bag_recorder_nodes --dependencies example_interfaces rclcpp rosbag2_cpp std_msgs
Your terminal will return a message verifying the creation of your package ``bag_recorder_nodes`` and all its necessary files and folders.
The ``--dependencies`` argument will automatically add the necessary dependency lines to ``package.xml`` and ``CMakeLists.txt``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Navigate into the ``ros2_ws/src`` directory and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_python bag_recorder_nodes_py --dependencies rclpy rosbag2_py example_interfaces std_msgs
ros2 pkg create --build-type ament_python --license Apache-2.0 bag_recorder_nodes_py --dependencies rclpy rosbag2_py example_interfaces std_msgs
Your terminal will return a message verifying the creation of your package ``bag_recorder_nodes_py`` and all its necessary files and folders.
The ``--dependencies`` argument will automatically add the necessary dependency lines to the ``package.xml``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ The command syntax for creating a new package in ROS 2 is:

.. code-block:: console
ros2 pkg create --build-type ament_cmake <package_name>
ros2 pkg create --build-type ament_cmake --license Apache-2.0 <package_name>
.. group-tab:: Python

.. code-block:: console
ros2 pkg create --build-type ament_python <package_name>
ros2 pkg create --build-type ament_python --license Apache-2.0 <package_name>
For this tutorial, you will use the optional arguments ``--node-name`` and ``--license``.
``--node-name`` option creates a simple Hello World type executable in the package, and ``--license`` declares the license information for the package.
Expand All @@ -180,13 +180,13 @@ Enter the following command in your terminal:

.. code-block:: console
ros2 pkg create --build-type ament_cmake --node-name my_node my_package --license Apache-2.0
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --node-name my_node my_package --license Apache-2.0
.. group-tab:: Python

.. code-block:: console
ros2 pkg create --build-type ament_python --node-name my_node my_package --license Apache-2.0
ros2 pkg create --build-type ament_python --license Apache-2.0 --node-name my_node my_package --license Apache-2.0
You will now have a new folder within your workspace's ``src`` directory called ``my_package``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Since we will use the pub/sub and service/client packages created in earlier tut

.. code-block:: console
ros2 pkg create --build-type ament_cmake tutorial_interfaces
ros2 pkg create --build-type ament_cmake --license Apache-2.0 tutorial_interfaces
``tutorial_interfaces`` is the name of the new package.
Note that it is, and can only be, a CMake package, but this doesn't restrict in which type of packages you can use your messages and services.
Expand Down
4 changes: 2 additions & 2 deletions source/Tutorials/Beginner-Client-Libraries/Pluginlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Create a new empty package in your ``ros2_ws/src`` folder with the following com

.. code-block:: console
ros2 pkg create --build-type ament_cmake --dependencies pluginlib --node-name area_node --license Apache-2.0 polygon_base
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies pluginlib --node-name area_node polygon_base
Open your favorite editor, edit ``ros2_ws/src/polygon_base/include/polygon_base/regular_polygon.hpp``, and paste the following inside of it:
Expand Down Expand Up @@ -101,7 +101,7 @@ Create a second empty package in your ``ros2_ws/src`` folder with the following

.. code-block:: console
ros2 pkg create --build-type ament_cmake --dependencies polygon_base pluginlib --library-name polygon_plugins --license Apache-2.0 polygon_plugins
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies polygon_base pluginlib --library-name polygon_plugins polygon_plugins
2.1 Source code for the plugins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In your workspace ``src`` directory, create a package ``more_interfaces`` and ma

.. code-block:: console
ros2 pkg create --build-type ament_cmake more_interfaces
ros2 pkg create --build-type ament_cmake --license Apache-2.0 more_interfaces
mkdir more_interfaces/msg
2 Create a msg file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Navigate into ``ros2_ws/src`` and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_cmake cpp_parameters --dependencies rclcpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameters --dependencies rclcpp
Your terminal will return a message verifying the creation of your package ``cpp_parameters`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Navigate into ``ros2_ws/src`` and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_python python_parameters --dependencies rclpy
ros2 pkg create --build-type ament_python --license Apache-2.0 python_parameters --dependencies rclpy
Your terminal will return a message verifying the creation of your package ``python_parameters`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ So, navigate into ``ros2_ws/src``, and run the package creation command:

.. code-block:: console
ros2 pkg create --build-type ament_cmake cpp_pubsub
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_pubsub
Your terminal will return a message verifying the creation of your package ``cpp_pubsub`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Navigate into ``ros2_ws/src`` and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_cmake cpp_srvcli --dependencies rclcpp example_interfaces
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_srvcli --dependencies rclcpp example_interfaces
Your terminal will return a message verifying the creation of your package ``cpp_srvcli`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ So, navigate into ``ros2_ws/src``, and run the package creation command:

.. code-block:: console
ros2 pkg create --build-type ament_python py_pubsub
ros2 pkg create --build-type ament_python --license Apache-2.0 py_pubsub
Your terminal will return a message verifying the creation of your package ``py_pubsub`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Navigate into ``ros2_ws/src`` and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_python py_srvcli --dependencies rclpy example_interfaces
ros2 pkg create --build-type ament_python --license Apache-2.0 py_srvcli --dependencies rclpy example_interfaces
Your terminal will return a message verifying the creation of your package ``py_srvcli`` and all its necessary files and folders.

Expand Down
4 changes: 2 additions & 2 deletions source/Tutorials/Intermediate/Launch/Launch-system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ Create a workspace for the package to live in:

.. code-block:: console
ros2 pkg create py_launch_example --build-type ament_python
ros2 pkg create --build-type ament_python --license Apache-2.0 py_launch_example
.. group-tab:: C++ package

.. code-block:: console
ros2 pkg create cpp_launch_example --build-type ament_cmake
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_launch_example
2 Creating the structure to hold launch files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Create a new package of build_type ``ament_python`` called ``launch_tutorial``:

.. code-block:: console
ros2 pkg create launch_tutorial --build-type ament_python
ros2 pkg create --build-type ament_python --license Apache-2.0 launch_tutorial
Inside of that package, create a directory called ``launch``:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ So, navigate into ``ros2_ws/src`` and then create a new package there:

.. code-block:: console
ros2 pkg create --build-type ament_cmake cpp_parameter_event_handler --dependencies rclcpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 cpp_parameter_event_handler --dependencies rclcpp
Your terminal will return a message verifying the creation of your package ``cpp_parameter_event_handler`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Navigate to workspace's ``src`` folder and create a new package:

.. code-block:: console
ros2 pkg create --build-type ament_cmake --dependencies geometry_msgs rclcpp tf2 tf2_ros turtlesim --license Apache-2.0 -- learning_tf2_cpp
ros2 pkg create --build-type ament_cmake --license Apache-2.0 --dependencies geometry_msgs rclcpp tf2 tf2_ros turtlesim -- learning_tf2_cpp
Your terminal will return a message verifying the creation of your package ``learning_tf2_cpp`` and all its necessary files and folders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Then create the package:
.. code-block:: console
cd second_ros2_ws/src
ros2 pkg create urdf_tutorial_r2d2 --build-type ament_python --dependencies rclpy --license Apache-2.0
ros2 pkg create --build-type ament_python --license Apache-2.0 urdf_tutorial_r2d2 --dependencies rclpy
cd urdf_tutorial_r2d2
You should now see a ``urdf_tutorial_r2d2`` folder.
Expand Down