coriolis() and Robot.copy().rne() fail for URDF/ETS robots: copied links keep their original parent
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with Robot.copy() and Robot.__deepcopy__, then Robot.rne where self.links.index(joint.parent) fails, and trace how coriolis reaches nofriction(). Check linked PR #732 first, since it already targets this fix. Done means each copied link's parent and children point to copied links, and copy().rne(q, qd, qdd) matches the original robot's result.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
robot.coriolis(q, qd) raises ValueError: Link(...) is not in list for every URDF-based Robot I tried: UR5, KinovaGen3, LBR, and a two-link URDF with full inertials. DH robots are unaffected.
coriolis calls nofriction(), which calls copy(). The same error occurs for robot.copy().rne(q, qd, qdd) directly, while rne on the original robot works. Cause: after copy() each link's parent (and the joint's parent) still refers to the original robot's link object, so self.links.index(joint.parent) in Robot.rne (group_of_link_idx.get(...)) fails.
Repro (any URDF with dynamics):
import numpy as np
from roboticstoolbox.models.URDF.URDFRobot import URDFRobot
r = URDFRobot("/path/to/two_links_robot.urdf") # two revolute joints, with <inertial> elements
q, qd = np.array([0.3, -0.5]), np.array([0.1, 0.2])
r.rne(q, qd, np.zeros(2)) # OK
r.copy().rne(q, qd, np.zeros(2)) # ValueError: Link(...) is not in list
r.coriolis(q, qd) # ValueError: Link(...) is not in list
Notes
- #722 lists
coriolis->ValueErrorunder "models with no dynamic parameters". That attribution is wrong: this is the error, and it happens on models that do have dynamics. - Same family as #705: state that does not survive
copy(). - Workaround:
C(q, qd) qd = rne(q, qd, 0) - gravload(q) + friction(qd). Checked againstcoriolison the DH Puma 560 (max difference 4e-15), and against a Christoffel-symbol calculation from the mass matrix on the URDF robot.
Fix: have Robot.__deepcopy__ remap each link's parent (and children) onto the copied links, and add a regression test that copy() then rne equals the original.
Found while answering Adineh94's question in discussion #158.
- Lingua principale
- C++
- Stelle
- 3.5k
- Fork
- 630
- Merge medio
- 2g 9m
- PR unite (30g)
- 27
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di petercorke/robotics-toolbox-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
petercorke/robotics-toolbox-python#709 ·
I maintainer di solito rispondono entro 2 giorni
-
Adapt to pgraph-python 1.0: plot() option names and the single Vertex classForse già presa @tandede l’ha presa 1 giorno fa. Apertadependencies tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
petercorke/robotics-toolbox-python#738 ·
I maintainer di solito rispondono entro 2 giorni
-
jacob0_dot: docstring errors, and analytic-representation path is a numerical HessianForse già presa @paneendrakumar0 l’ha presa 1 giorno fa. Apertatech-debt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
petercorke/robotics-toolbox-python#734 ·
I maintainer di solito rispondono entro 2 giorni
-
Interbotix URDF models (wx200 etc.): gripper counted as arm joints, ambiguous end-effector, qr outside joint limitsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
petercorke/robotics-toolbox-python#729 ·
I maintainer di solito rispondono entro 2 giorni
-
paycap crashes for robots with n != 6 and its docstring does not match its behaviourForse già presa @huxiaoyi-ovo l’ha presa 3 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
petercorke/robotics-toolbox-python#728 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di petercorke/robotics-toolbox-python
Issue simili
-
【问题】在文件树重命名文件,发现无法用鼠标选中一段文字Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
ros-navigation/navigation2#6648 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno