Skip to content

[JTC] Trajectory replacement does not interpolate from active trajectory #574

@christophfroehlich

Description

@christophfroehlich

Describe the bug
While copying documentation from ROS 1 Wiki we realized that the trajectory replacement does not work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout the jtc_tests branch from my gazebo_ros2_control fork
  2. Run this launch file
    ros2 launch gazebo_ros2_control_demos cart_example_velocity_jtc.launch.py
  3. Run this action client
    ros2 run gazebo_ros2_control_demos example_position_with_velocity_nonzero
  4. Run it again before the old goal was reached.

Used JTC configuration:

joint_trajectory_controller:
  ros__parameters:
    joints:
      - slider_to_cart
    command_interfaces:
      - velocity
    state_interfaces:
      - position
      - velocity
    allow_nonzero_velocity_stop: true
    gains.slider_to_cart.ff_velocity_scale: 1.0

Action goal:

  • position + velocity points are sent -> cubic spline.
  • traj start is left zero, which means "start now" acc to ROS 1 Wiki and as far as I understand the code here.

Expected behavior
The trajectory should be interpolated from the current state (or current desired values) to the new one, as described in the ROS 1 Wiki

Screenshots
At 9s a new action goal was sent and immediately overridden by the new one:
image

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Version: master branches of ros-controls repos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions