Skip to content

[JTC] goal succeeds even if didn't reach the setpoint (> 2PI) for continuous joint #1599

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

Open
caioaamaral opened this issue Mar 19, 2025 · 3 comments
Labels

Comments

@caioaamaral
Copy link

caioaamaral commented Mar 19, 2025

Describe the bug
For a JTC defined in a continuous joint, if I send a /follow_joint_trajetory goal, joints stop moving before reaching the setpoint and action is given as SUCCEED.

To Reproduce
Steps to reproduce the behavior:

  1. Define a JTC for a continuous joint
  2. Send a FollowJointTrajectory goal (more than a turn) to the JTC
  3. Wait for action completion
  4. See the error

Expected behavior
I expect the joint to move until the setpoint is reach

Screenshots
N/A

Environment (please complete the following information):

  • OS: [Ubuntu 22.04]
  • Version [Humble]
  • Gazebo Fortress with ign_ros2_control

Additional context
N/A

@christophfroehlich
Copy link
Contributor

what do you mean by "more than a turn"? May it be that you need a revolute joint instead of a continuous one?

@caioaamaral
Copy link
Author

what do you mean by "more than a turn"? May it be that you need a revolute joint instead of a continuous one?

Like sending ~160 rad to a joint.

Investigating it further, in the urdf the joint has the velocity limited to 5 rad/s and I was using 2 sec as time_from_start. I believe some timeout is happening, making the goal succeed after 2 sec. Is it the expected behavior if I set no goal constraints?

@christophfroehlich
Copy link
Contributor

christophfroehlich commented Mar 19, 2025

If the rotation of a joint has a meaning above 360degrees, then you should use revolute instead of continuous, because the latter one automatically wraps the setpoints around.

It depends on your parameters or tolerances in the trajectory message. With the default values (constraints.goal_time=0.0, constraints..goal=0.0, and constraints.stopped_velocity_tolerance=0.01), it will wait an infinite amount of time to reach a velocity below 0.01rad/s. But only if you have velocity state interfaces, otherwise it succeeds immediately after 2s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants