Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

paycap crashes for robots with n != 6 and its docstring does not match its behaviour

Aperta
#728 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@huxiaoyi-ovo ci sta già lavorando.

Dal 10/10/2026.

  • #731 di @huxiaoyi-ovo — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start from Dynamics.paycap and its docstring, and compare the wmax allocation with the per-joint assignment that fails for n != 6. Uncomment test_paycap in tests/test_DHRobot.py, then run the Panda repro from the issue. Done means n != 6 works, the return value matches the docstring, and the signature and frame docs are corrected. Pull request #731 already targets this, so check it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Dynamics.paycap allocates wmax = np.zeros((trajn, 6)) but assigns an n-element per-joint vector, so any robot with n != 6 raises:

ValueError: could not broadcast input array from shape (7,) into shape (6,)

Repro: rtb.models.DH.Panda().paycap([0, 0, -1, 0, 0, 0], tauR, q=q) with tauR an (n, 2) array of joint torque limits.

For n = 6 it works but returns per-joint scale factors, not the 6-vector wrench the docstring describes. The maximum load along w is wmax.min() and joint is the limiting joint. On a DH Puma 560 at qr, with w = [0, 0, -1, 0, 0, 0], this gave 4392 N limited by joint 2, and recomputing the joint torques at that load put joint 2 exactly at its limit.

Other problems:

  • The docstring signature paycap(q, w, f, tauR) does not match the code paycap(w, tauR, frame=1, q=None), and the frame description ('base'/'ee') does not match the int argument.
  • w is normalised, so it is only a direction, which the docs do not say.
  • It uses gravload, so it gives nonsense on models with zero dynamics such as the default URDF-based Panda. This should be documented or detected.
  • tests/test_DHRobot.py::test_paycap is commented out.

Raised from discussion #430.

Lingua principale
C++
Stelle
3.5k
Fork
630
Merge medio
3g 7h
PR unite (30g)
50

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di petercorke/robotics-toolbox-python

Tutte le issue di petercorke/robotics-toolbox-python

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.