Skip to content

feat(robot): jtraj takes joint coordinates only, SE3 arguments raise - #716

Open
petercorke wants to merge 1 commit into
mainfrom
deprecate/jtraj-pose-args
Open

petercorke wants to merge 1 commit into
mainfrom
deprecate/jtraj-pose-args

Conversation

@petercorke

@petercorke petercorke commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Robot.jtraj was a quintic trajectory between two joint vectors, with a hack that also accepted SE3 poses and solved the inverse kinematics. IK is never simple: which solution is chosen depends on the solver and its starting point, and it can fail. The hack never checked for failure, so it interpolated silently to an invalid configuration, and its **kwargs were forwarded to the IK method, which broke e.g. puma.jtraj(T1, T2, 5, q0=...) with a TypeError.

  • jtraj(q0, qf, t, qd0=None, qd1=None) is now the method form of rtb.tools.trajectory.jtraj, joint coordinates only
  • passing an SE3 for q0 or qf (deprecated in 1.5.0) raises TypeError with a message that says to solve the IK explicitly and gives the replacement
  • the **kwargs forwarded to the IK method are gone, and the arguments, formerly T1/T2, are q0/qf
  • docstring has a .. deprecated:: 1.5.0 note with the replacement recipe, and a versionchanged
  • removes the last by-name caller of Puma560.ikine_a

Incompatible change

Robot.jtraj no longer accepts SE3 poses, it raises TypeError. This is a small incompatible change, committed as a feat (no major version bump), as is usual for such changes here. Nothing in this repository, its docs, examples or the wiki passes poses (they all use the pure rtb.jtraj function with joint vectors), and the same holds for RVC3.

Test plan

🤖 Generated with Claude Code

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
ErrorProne 1 high

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (acc6842) to head (02945cd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/roboticstoolbox/robot/Robot.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #716   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        143     143           
  Lines      14269   14266    -3     
=====================================
+ Misses     14269   14266    -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Robot.jtraj was a quintic trajectory between two joint vectors, with a hack
that also accepted SE3 poses and solved the inverse kinematics.  IK is never
simple (which solution is chosen depends on the solver and its starting point,
and it can fail), and the hack never checked for failure: it interpolated
silently to an invalid configuration.

jtraj(q0, qf, t, qd0=None, qd1=None) is now the method form of
rtb.tools.trajectory.jtraj.  Passing an SE3 for q0 or qf, deprecated in 1.5.0,
raises TypeError with a message saying to solve the IK explicitly.  The
**kwargs that were forwarded to the IK method are gone, and the arguments,
formerly T1 and T2, are now q0 and qf.

This is a small incompatible change, released as a feat as is usual for such
changes here.  It also removes the last caller of Puma560.ikine_a by name.
Nothing in the repository, its docs or examples, or RVC3 passed poses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke force-pushed the deprecate/jtraj-pose-args branch from b16509d to 02945cd Compare October 4, 2026 21:05
@petercorke petercorke changed the title refactor(robot)!: jtraj takes joint coordinates only, SE3 arguments raise feat(robot): jtraj takes joint coordinates only, SE3 arguments raise Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant