Skip to content

# [turtlebot4_gz/Create3] /diffdrive_controller/cmd_vel does not honor configured acceleration limits under safe /cmd_vel commands #96

Description

@147258369ymc

Robot Model

Turtlebot4 Standard

ROS distro

Jazzy

Networking Configuration

Simple Discovery

OS

Ubuntu 24.04

Built from source or installed?

Installed

Package version

ros-jazzy-turtlebot4-simulator: 2.0.2-1noble.20260616.091643
ros-jazzy-turtlebot4-gz-bringup: 2.0.2-1noble.20260616.085653
ros-jazzy-turtlebot4-gz-toolbox: 2.0.2-1noble.20260615.145933
ros-jazzy-irobot-create-control: 3.0.4-1noble.20260616.082318
ros-jazzy-irobot-create-gz-bringup: 3.0.4-1noble.20260616.083553
ros-jazzy-irobot-create-gz-toolbox: 3.0.4-1noble.20260615.161517
ros-jazzy-irobot-create-nodes: 3.0.4-1noble.20260615.161556
ros-jazzy-ros-gz: 1.0.22-1noble.20260616.074726
Gazebo: Harmonic / gz

Expected behaviour

When TurtleBot4 simulation receives safe `geometry_msgs/msg/TwistStamped` commands on `/cmd_vel`, the internally published limited command topic `/diffdrive_controller/cmd_vel` should respect the configured Create3/TurtleBot4 acceleration limits:

- `|d(linear.x)/dt| <= 0.9 m/s^2`
- `|d(angular.z)/dt| <= 7.725 rad/s^2`

If an incoming `/cmd_vel` sequence changes faster than the acceleration bound, the simulator/control path should ramp or clamp the command before publishing the limited command and before it affects wheel/odom motion.

The relevant installed control configuration has:

```yaml
linear.x.has_acceleration_limits: true
linear.x.max_acceleration: 0.9
angular.z.has_acceleration_limits: true
angular.z.max_acceleration: 7.725
angular.z.min_acceleration: -7.725
publish_cmd: true

### Actual behaviour

## Actual behaviour

```markdown
Under safe `/cmd_vel` inputs well below the configured velocity envelope, `/diffdrive_controller/cmd_vel` shows command-path acceleration ratios far above the configured limits, and `/odom` then shows downstream acceleration-envelope violations.

In a 1000-round automated TurtleBot4 Jazzy simulation run:

- max `/diffdrive_controller/cmd_vel` linear acceleration ratio: **11.76x** the configured `linear.x.max_acceleration`
- max `/diffdrive_controller/cmd_vel` angular acceleration ratio: **6.62x** the configured `angular.z.max_acceleration`
- max input command remained safe: `|linear.x| <= 0.150 m/s`, `|angular.z| <= 0.800 rad/s`
- configured velocity limits are wider: `linear.x.max_velocity = 0.46 m/s`, `angular.z.max_velocity = 1.9 rad/s`

Representative frame `1782640335.8862267`:

```text
TB4 linear acceleration envelope violated:
  odom accel = 2.600 m/s^2
  odom ratio = 2.89x
  limit      = 0.900 m/s^2

Supporting /diffdrive_controller/cmd_vel ratios:
  linear = 6.13x
  angular = 3.75x

Representative frame 1782642590.4508777:

TB4 angular acceleration envelope violated:
  odom accel = -10.506 rad/s^2
  odom ratio = 1.36x
  limit      = [-7.725, 7.725] rad/s^2

Supporting /diffdrive_controller/cmd_vel ratios:
  linear = 6.07x
  angular = 3.59x

The failure appears after the external command enters the TurtleBot4/Gazebo/Create3 command path, not because the user command is out of range.


### Error messages

```bash
## Error messages


TB4 linear acceleration envelope violated: accel=2.600 m/s^2 ratio=2.89 limit=0.900
TB4 angular acceleration envelope violated: accel=-10.506 rad/s^2 ratio=1.36 limit=[-7.725, 7.725]

To Reproduce

To Reproduce

1. Start TurtleBot4 Standard simulation on ROS 2 Jazzy / Ubuntu 24.04.
2. Record these topics:
   - `/cmd_vel`
   - `/diffdrive_controller/cmd_vel`
   - `/odom`
   - `/wheel_vels`
   - `/clock`
3. Publish a safe `geometry_msgs/msg/TwistStamped` command sequence.

Representative linear repro sequence:

| step | linear.x (m/s) | angular.z (rad/s) |
|---:|---:|---:|
| 1 | +0.019 | -0.650 |
| 2 | -0.120 | -0.384 |
| 3 | +0.136 | +0.111 |
| 4 | -0.097 | +0.416 |
| 5 | +0.030 | -0.358 |
| 6 | -0.054 | -0.691 |
| 7 | +0.030 | +0.657 |
| 8 | -0.030 | +0.325 |

Representative angular repro sequence:

| step | linear.x (m/s) | angular.z (rad/s) |
|---:|---:|---:|
| 1 | -0.123 | -0.171 |
| 2 | +0.050 | -0.553 |
| 3 | -0.018 | -0.250 |
| 4 | +0.112 | +0.261 |
| 5 | -0.050 | +0.141 |
| 6 | +0.130 | -0.127 |
| 7 | -0.050 | +0.407 |
| 8 | +0.005 | -0.650 |

All commands are inside the velocity envelope:

- `|linear.x| <= 0.150 m/s < 0.46 m/s`
- `|angular.z| <= 0.800 rad/s < 1.9 rad/s`

4. Compute adjacent-sample acceleration on `/diffdrive_controller/cmd_vel` and `/odom`.
5. Observe `/diffdrive_controller/cmd_vel` acceleration ratios above the configured acceleration limits, followed by `/odom` acceleration violations.

Other notes

This issue is about the TurtleBot4/Gazebo/Create3 command path, not invalid user input.

The bridge path maps ROS `/cmd_vel` to the Gazebo model command topic and remaps the model command topic back to ROS as `diffdrive_controller/cmd_vel`. One suspicious boundary is that the simulated diffdrive controller parameter has `use_stamped_vel: false`, while TurtleBot4 Jazzy exposes `/cmd_vel` as `geometry_msgs/msg/TwistStamped` and bridges it into the Gazebo command path.

Suggested investigation points:

- `turtlebot4_gz_bringup` / ROS-GZ bridge launch path
- `irobot_create_gz_bringup` command bridge
- Create3 diffdrive command limiting
- conversion between `TwistStamped`, Gazebo `Twist`, and the published limited command

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions