Skip to content

Commit

Permalink
Add a release note for the static_transform_publisher args. (#2015)
Browse files Browse the repository at this point in the history
* Add a release note for the static_transform_publisher args.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 15, 2021
1 parent 9a63591 commit 6119553
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
17 changes: 17 additions & 0 deletions source/Releases/Release-Humble-Hawksbill.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,23 @@ The previous enumerators are still available, but are now deprecated and will pr
All code that uses the ``TF2Error`` enumerator should be updated to use the new ``TF2`` prefixed errors.
See https://github.com/ros2/geometry2/pull/349 for more details.

More intuitive command-line arguments for static_transform_publisher
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

The ``static_transform_publisher`` program used to take arguments like: ``ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 1 foo bar``.
The first three numbers are the translation x, y, and z, the next 4 are the quaternion x, y, z, and w, and the last two arguments are the parent and child frame IDs.
While this worked, it had a couple of problems:

* The user had to specify *all* of the arguments, even if only setting one number
* Reading the command-line to figure out what it was publishing was tricky

To fix both of these issues, the command-line handling has been changed to use flags instead, and all flags except for ``--frame-id`` and ``--child-frame-id`` are optional.
Thus, the above command-line can be simplified to: ``ros2 run tf2_ros static_transform_publisher --frame-id foo --child-frame-id bar``
To change just the translation x, the command-line would be: ``ros2 run tf2_ros static_transform_publisher --x 1.5 --frame-id foo --child-frame-id bar``.

The old-style arguments are still allowed in this release, but are deprecated and will print a warning.
They will be removed in future releases.
See https://github.com/ros2/geometry2/pull/392 for more details.

Known Issues
------------
Expand Down
8 changes: 5 additions & 3 deletions source/Tutorials/Tf2/Writing-A-Tf2-Static-Broadcaster-Cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ In our case, roll/pitch/yaw refers to rotation about the x/y/z-axis, respectivel

.. code-block:: console
ros2 run tf2_ros static_transform_publisher x y z yaw pitch roll frame_id child_frame_id
ros2 run tf2_ros static_transform_publisher --x x --y y --z z --yaw yaw --pitch pitch --roll roll --frame-id frame_id --child-frame-id child_frame_id
Publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion.

.. code-block:: console
ros2 run tf2_ros static_transform_publisher x y z qx qy qz qw frame_id child_frame_id
ros2 run tf2_ros static_transform_publisher --x x --y y --z z --qx qx --qy qy --qz qz --qw qw --frame-id frame_id --child-frame-id child_frame_id
``static_transform_publisher`` is designed both as a command-line tool for manual use, as well as for use within ``launch`` files for setting static transforms. For example:

Expand All @@ -441,10 +441,12 @@ Publish a static coordinate transform to tf2 using an x/y/z offset in meters and
Node(
package='tf2_ros',
executable='static_transform_publisher',
arguments = ['0', '0', '1', '0', '0', '0', 'world', 'mystaticturtle']
arguments = ['--x', '0', '--y', '0', '--z', '1', '--yaw', '0', '--pitch', '0', '--roll', '0', '--frame-id', 'world', '--child-frame-id', 'mystaticturtle']
),
])
Note that all arguments except for ``--frame-id`` and ``--child-frame-id`` are optional; if a particular option isn't specified, then the identity will be assumed.

Summary
-------

Expand Down
8 changes: 5 additions & 3 deletions source/Tutorials/Tf2/Writing-A-Tf2-Static-Broadcaster-Py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ In our case, roll/pitch/yaw refers to rotation about the x/y/z-axis, respectivel

.. code-block:: console
ros2 run tf2_ros static_transform_publisher x y z yaw pitch roll frame_id child_frame_id
ros2 run tf2_ros static_transform_publisher --x x --y y --z z --yaw yaw --pitch pitch --roll roll --frame-id frame_id --child-frame-id child_frame_id
Publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion.

.. code-block:: console
ros2 run tf2_ros static_transform_publisher x y z qx qy qz qw frame_id child_frame_id
ros2 run tf2_ros static_transform_publisher --x x --y y --z z --qx qx --qy qy --qz qz --qw qw --frame-id frame_id --child-frame-id child_frame_id
``static_transform_publisher`` is designed both as a command-line tool for manual use, as well as for use within ``launch`` files for setting static transforms. For example:

Expand All @@ -408,10 +408,12 @@ Publish a static coordinate transform to tf2 using an x/y/z offset in meters and
Node(
package='tf2_ros',
executable='static_transform_publisher',
arguments = ['0', '0', '1', '0', '0', '0', 'world', 'mystaticturtle']
arguments = ['--x', '0', '--y', '0', '--z', '1', '--yaw', '0', '--pitch', '0', '--roll', '0', '--frame-id', 'world', '--child-frame-id', 'mystaticturtle']
),
])
Note that all arguments except for ``--frame-id`` and ``--child-frame-id`` are optional; if a particular option isn't specified, then the identity will be assumed.

Summary
-------

Expand Down

0 comments on commit 6119553

Please sign in to comment.