Enhancement: SE3 constructor should accept an (N, 4, 4) ndarray as N poses
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 66/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- numpy, python
- Domínio
- backend-api-design
Direção de pesquisa
Start by reading the SE3 constructor and its existing tests for single matrices and lists of matrices. Run those tests, then add coverage for stacked (N, 4, 4) arrays and unsupported shapes, including the check=False behavior. Done means stacked arrays produce N poses like SE3(list(arr)), while unsupported shapes raise a useful error.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
SE3 can be built from a single 4x4 array, from a list of 4x4 arrays (its own internal representation for a sequence of poses), or from other SE3 objects, but not from a stacked (N, 4, 4) ndarray. That is the natural way to hold a pose sequence in NumPy-based code (for example the output of np.stack, or a trajectory loaded from a file), and it is the form that a number of Robotics Toolbox for Python (RTB) functions accept for pose trajectories.
Reproduction
import numpy as np
from spatialmath import SE3
A = SE3.Rx(0.3).A
arr = np.array([A, A, A]) # shape (3, 4, 4)
SE3(arr)
# ValueError: bad argument to constructor
s = SE3(arr, check=False)
len(s), s.A.shape
# (1, (3, 4, 4)) <- silently a malformed object: length 1, but .A is (3, 4, 4)
len(SE3([A, A, A])) # 3, a list of matrices works
Tested with spatialmath-python 1.1.18.
Why it matters
- With the default
check=Truethe error message does not say what is accepted. - With
check=Falsethe constructor silently returns a malformed object. In RTB this turned a user's(N, 4, 4)trajectory into an object that failed deep inside an IK solver withValueError: operands could not be broadcast together with shapes (3,4) (3,), far from the cause.
Suggested behaviour
- Accept an ndarray with
ndim == 3andshape[1:] == (4, 4)as a sequence of N poses, equivalent toSE3(list(arr)). - For other unsupported shapes, raise an error that says which forms are accepted. Ideally this validation of the array shape (not the matrix contents) would also happen with
check=False, which would skip only the expensive checks that the matrices are valid SE(3).
This is an enhancement request, not a regression. RTB works around it by converting the array to a list of matrices before calling the constructor, so there is no urgency.
- Linguagem predominante
- Python
- Estrelas
- 643
- Forks
- 102
- Merge médio
- 11min
- PRs com merge (30d)
- 1
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rai-opensource/spatialmath-python
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
rai-opensource/spatialmath-python#235 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
rai-opensource/spatialmath-python#32 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
rai-opensource/spatialmath-python#234 ·
Mantenedores costumam responder em até 1 dia
-
Line3.isparallel()/__or__ still scale-dependent, like the distance() bug fixed in #224Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
rai-opensource/spatialmath-python#231 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 50/100
rai-opensource/spatialmath-python#177 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de rai-opensource/spatialmath-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
LearningCircuit/local-deep-research#7206 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
chingu-voyages/V62-tier3-team-33#285 ·
Mantenedores costumam responder em até 1 dia
-
Proxy drops log notifications from backends that don't send FastMCP's msg/extra dictTalvez já em andamento @asasemahmed assumiu hoje. Abertabug server
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
[Bug]: Bedrock request metadata forwarding does not work for /embeddingsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug llm translation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia