# \[Notice\] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics

**URL:** <https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944>\
**Category:** Navigation\
**Created:** [December 3, 2024, 8:49pm UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944 "2024-12-03T20:49:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smac](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/smac/32/6763_2.png) [@smac](https://discourse.openrobotics.org/u/smac)\
**Post date:** [December 3, 2024, 8:49pm UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/1 "2024-12-03T20:49:34Z")

</div>

Hi all,

Your Friendly Neighborhood Navigator here!

I wanted to announce a key breaking change in Nav2: We have now migrated away from `Twist` in favor of `TwistStamped` for all `cmd_vel` and related topics!

This was a change motivated for several reasons, including the Aerial community’s interest in working with command velocities in various reference frames, as well as AMR applications wanting a stamp to reject stale velocity commands in the header.

[We started this process earlier this year](http://discourse.ros.org/t/nav2-support-for-twiststamped-available-rolling-jazzy/35995), but selected to not make it default in Nav2 for Jazzy due to its LTS nature. Since Kilted is non-LTS, this is a nice staging distribution to … break … folks and start the Nav2 adjacent and robot hardware packages’ migrations.

If you are one such broken item, the migration is very straight forward. Good news! We have some utility functions you can leverage that we use across Nav2 that makes it easy to switch: a [Twist Publisher](https://github.com/ros-navigation/navigation2/blob/main/nav2_util/include/nav2_util/twist_publisher.hpp) and [Twist Subscriber](https://github.com/ros-navigation/navigation2/blob/main/nav2_util/include/nav2_util/twist_subscriber.hpp). It then also sets a standard parameter name (`enable_stamped_cmd_vel`) that is used across the board for toggling between Twist and Twist Stamped messages. In the migration, we simple switched them from `false` to `true` and made the appropriate updates in the simulation / hardware `cmd_vel` subscriptions. At some point in the distant future, we may depreciate Twist in favor of solely TwistStamped, but that would be many years away.

I have also filed tickets in the related ecosystem packages I could think of:

- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #317 · ros-visualization/rqt · GitHub](https://github.com/ros-visualization/rqt/issues/317)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #908 · cra-ros-pkg/robot\_localization · GitHub](https://github.com/cra-ros-pkg/robot_localization/issues/908)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #54 · ros-teleop/twist\_mux · GitHub](https://github.com/ros-teleop/twist_mux/issues/54)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #93 · ros-teleop/teleop\_tools · GitHub](https://github.com/ros-teleop/teleop_tools/issues/93)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #290 · ros-drivers/joystick\_drivers · GitHub](https://github.com/ros-drivers/joystick_drivers/issues/290)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #27 · neobotix/neo\_nav2\_bringup · GitHub](https://github.com/neobotix/neo_nav2_bringup/issues/27)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #1038 · ROBOTIS-GIT/turtlebot3 · GitHub](https://github.com/ROBOTIS-GIT/turtlebot3/issues/1038)
- [[Notice] Nav2 Migrated to TwistStamped to replace Twist for cmd\_vel Topics · Issue #504 · turtlebot/turtlebot4 · GitHub](https://github.com/turtlebot/turtlebot4/issues/504)

If I missed anyone, please let them know! We’ve also updated Nav2’s documentation on this in our [Migration Guide](https://docs.nav2.org/migration/Jazzy.html) with examples of how to migrate Gazebo (spoiler: easy). If you would not like to use TwistStamped, you can set `enable_stamped_cmd_vel: false` for all nodes in Nav2 and it should continue to use Twist.

Let us know if you have any issues, questions, or comments!

Happy twisting!

Steve Macenski

 ![new_logo](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/2/6/263109a9f1a2282a43414749b285218cbea230e5.png)

---

<div class="post-metadata">

**Author:** ![vinnnyr](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/vinnnyr/32/6598_2.png) [@vinnnyr](https://discourse.openrobotics.org/u/vinnnyr)\
**Post date:** [December 3, 2024, 9:19pm UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/2 "2024-12-03T21:19:02Z")

</div>

The toggle is a great idea!

---

<div class="post-metadata">

**Author:** ![Dariush\_Roostaei](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dariush_roostaei/32/15809_2.png) [@Dariush\_Roostaei](https://discourse.openrobotics.org/u/Dariush_Roostaei)\
**Post date:** [March 1, 2025, 11:19am UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/3 "2025-03-01T11:19:28Z")

</div>

hi . i use “enable\_stamped\_cmd\_vel: true” in nav2\_params.yaml and add to parameters navigation lunch file but still cmd\_vel\_nav type is “twist” not “twiststamped” . my ros is jazzy .

---

<div class="post-metadata">

**Author:** ![RFRIEDM](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/rfriedm/32/10410_2.png) [@RFRIEDM](https://discourse.openrobotics.org/u/RFRIEDM)\
**Post date:** [March 3, 2025, 4:02am UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/4 "2025-03-03T04:02:47Z")

</div>

> [@smac](#):
>
> but selected to not make it default in Nav2 for Jazzy

Which node? Perhaps share a branch to reproduce this?

---

<div class="post-metadata">

**Author:** ![Dariush\_Roostaei](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dariush_roostaei/32/15809_2.png) [@Dariush\_Roostaei](https://discourse.openrobotics.org/u/Dariush_Roostaei)\
**Post date:** [March 15, 2025, 3:58pm UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/5 "2025-03-15T15:58:33Z")

</div>

## I was able to do it with enable\_stamped\_cmd\_vel : true

## twist\_mux: ros\_\_parameters: topics: navigation: topic : cmd\_vel\_nav

## twist\_mux\_params = os.path.join(get\_package\_share\_directory(‘gg\_gazebo’),‘config’,‘twist\_mux.yaml’) twist\_mux = Node( package=“twist\_mux”, executable=“twist\_mux”, parameters=[twist\_mux\_params, {‘use\_sim\_time’: True,‘use\_stamped’: True}], remappings=[(‘/cmd\_vel\_out’,‘/gg\_diff\_cont\_controller/cmd\_vel’)] )

ros2 topic info -v /cmd\_vel\_nav  
Type: geometry\_msgs/msg/TwistStamped

Publisher count: 6  
Node name: controller\_server (1)  
Node name: behavior\_server (5)

Subscription count: 2  
Node name: twist\_mux  
Node name: velocity\_smoother

Inside nav2\_params.yaml I put all the parts related to publishers enable\_stamped\_cmd\_vel: True  
My personal robot (gg Robot) can now navigate with the diff\_drive\_controller/DiffDriveController and use\_stamped\_vel on Jazzy ros2 .  
Is this the correct way to set parameters for enable stamped\_cmd\_vel?(thanks)

---

<div class="post-metadata">

**Author:** ![Dariush\_Roostaei](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/dariush_roostaei/32/15809_2.png) [@Dariush\_Roostaei](https://discourse.openrobotics.org/u/Dariush_Roostaei)\
**Post date:** [March 15, 2025, 6:02pm UTC](https://discourse.openrobotics.org/t/notice-nav2-migrated-to-twiststamped-to-replace-twist-for-cmd-vel-topics/40944/6 "2025-03-15T18:02:40Z")

</div>

![Screenshot from 2025-03-15 14-01-26](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/d/c/dc43bff59a6e618ac6ff8aaae00b14a4f2268fcf.jpeg)
