waypoints: reconstruir o pacote perdido como RECONSTRUCAO DECLARADA

O gitlink src/waypoints (sha 115553cfa8c2ace122414ac5a9b235cd2e225693) apontava
para codigo que nao existe em nenhum remoto conhecido (Gitea, GitHub, maquina,
web) e que o autor ja nao tem. O resultado era concreto: `rosrun waypoints
waypoints_server`, que guide.txt manda correr, nao resolvia num clone limpo, e a
unica saida honesta era reconstruir ou documentar a falta. O autor autorizou a
reconstrucao ("ja nao tenho waypoints, se conseguires criar um, agradecia"),
por isso o gitlink e substituido por conteudo dentro do repositorio
(`git rm --cached src/waypoints` + ficheiros commitados), escrito a partir das
pistas que sobreviveram:

  * guide.txt: nome do pacote (`waypoints`) e do executavel
    (`waypoints_server`), sem argumentos - o unico contrato documentado;
  * p3dx_navigation.rviz: as classes `waypoints/waypointPanel` (painel) e
    `waypoints/Waypoints` (ferramenta, `Topic: waypoint`) provam que o original
    tambem trazia plugins rviz em C++ e que o topico `waypoint` era usado.

O que fica e uma RECONSTRUCAO DECLARADA, nao o trabalho original: Python (o
autor pediu legibilidade, e um no C++ com interface adivinhada nao poderia ser
compilado nem testado aqui), um servidor de waypoints conservador
(`geometry_msgs/PoseStamped` em `waypoint` -> `geometry_msgs/PoseArray`
latched em `waypoints`), e um README dentro do pacote que diz o que e certo
(o nome do no), o que e inferido (topicos, tipos, parametros), que os plugins
rviz do original NAO foram reproduzidos e que quem reutilizar isto deve
confirmar o interface antes de confiar nele.

Os documentos passam a dizer isto: README.md (seccao do waypoints e linha da
tabela de licencas: GPLv3, como o resto do repo), tests/known-gaps.txt (a
lacuna deixa de ser o codigo e passa a ser o ORIGINAL, e o `darknet_ros` do
guide.txt continua por resolver) e tests/run.sh + tests/negative.sh (8
verificacoes novas, incluindo as negativas em copias mktemp: apagar o no,
tirar o package.xml, tirar o +x, renomear o no, estragar o Python, tirar a
declaracao e voltar a fazer gitlink). O .gitmodules nao muda: so `rosaria`
continua a ser submodulo, e como `waypoints` era o ultimo gitlink sem
mapeamento, `git submodule status` deixa de se queixar e o clone limpo deixa de
trazer um diretorio vazio.

O que isto NAO prova, e fica dito: nao houve ROS neste ambiente, portanto nao
houve catkin_make nem rosrun. So a estrutura, o nome do no e a sintaxe
(python3 -m py_compile) foram verificados.
This commit is contained in:
dsh
2026-10-08 16:58:17 +01:00
parent 0305718a67
commit 0148385266
9 changed files with 571 additions and 38 deletions
+43 -28
View File
@@ -16,7 +16,7 @@ vendored under `src/` keep their own licences:
| `urg_node`, `urg_c`, `laser_proc`, `rgbd_launch` | BSD |
| `object_detection`, `p3dx_navigation`, `p3dx_slam` | not declared (`TODO` in `package.xml`) |
| `rosaria` | **GPL-2.0-only** (declared in the upstream `package.xml`; the upstream repository has no licence file) |
| `waypoints` | no content in any known remote — see above |
| `waypoints` | GPL-3.0 (`GPLv3` in `package.xml`) — a **declared reconstruction**, not the original; see [`src/waypoints/README.md`](src/waypoints/README.md) |
MIT is not possible here: the GPL-3.0 package `p3dx_description` and the LGPL-3.0
`robot`/`estop` impose their own obligations on the combined work.
@@ -43,12 +43,15 @@ ignored by git so it will not be committed again.
## Submodules: a clean clone must bring code, not empty directories
`src/rosaria` and `src/waypoints` are recorded in this repository's history as
`src/rosaria` and `src/waypoints` were both recorded in this repository's history as
**gitlinks** (index mode `160000`, i.e. submodule entries), not as plain
directories. A gitlink stores only a commit id — the code itself lives in another
repository. For a clone to bring that code, each gitlink needs a matching entry in
`.gitmodules`; without one, `git clone` simply creates an **empty directory**.
Only `src/rosaria` is still a gitlink today. `src/waypoints` was replaced by in-tree
content written as a **declared reconstruction** of the lost original — see below.
That was the state of this repository until this fix, and it broke the build:
`src/robot/package.xml` declares `<depend>rosaria</depend>`, so while `src/rosaria`
was empty a clean clone could not be built.
@@ -69,14 +72,16 @@ cd p3dx-catkin
git submodule update --init -- src/rosaria
```
**Note the `-- src/rosaria`.** The untargeted `git submodule update --init` still
aborts, because `src/waypoints` is a gitlink with no `.gitmodules` mapping and git
cannot resolve a URL for it. The same applies to a bare `git submodule status`.
Initialising by path works today and keeps working once `waypoints` is sorted out.
**Note the `-- src/rosaria`.** While `src/waypoints` was still a gitlink with no
`.gitmodules` mapping, the untargeted `git submodule update --init` aborted — git could
not resolve a URL for it — and the same happened to a bare `git submodule status`. That
is fixed: initialising by path still works, and the untargeted `git submodule update
--init` and `git submodule status` no longer complain, because every remaining gitlink
is declared.
### `src/waypoints` — origin NOT identified; the author must supply it
### `src/waypoints` — the original is LOST; what is there now is a declared reconstruction
`src/waypoints` points at commit `115553cfa8c2ace122414ac5a9b235cd2e225693`, but
`src/waypoints` used to point at commit `115553cfa8c2ace122414ac5a9b235cd2e225693`, but
**that code does not exist in any remote that could be found** — this was checked,
not assumed. It is not:
@@ -88,24 +93,25 @@ not assumed. It is not:
- on the web — the commit `115553c…` is not reachable from any candidate repository.
Because the origin is unknown, **no `.gitmodules` entry was invented for it**: a
guessed URL would be worse than an honest gap. `tests/run.sh` reports it as a *known
gap* and fails only if that list grows (see `tests/known-gaps.txt`).
guessed URL would be worse than an honest gap. The author was asked, no longer has the
code, and authorised a reconstruction, so the gitlink was replaced by in-tree content
(`git rm --cached src/waypoints` plus the committed files) — the second of the two
honest ways out. That content is **a reconstruction, not the original work**:
The consequence is concrete: `guide.txt` tells you to run
`rosrun waypoints waypoints_server`, and in a clean clone that does **not** resolve,
because `src/waypoints` is empty.
> **[`src/waypoints/README.md`](src/waypoints/README.md)** is the declaration. It names
> the lost commit, says what is documented (`guide.txt` runs
> `rosrun waypoints waypoints_server`, so the package name and the node name are
> certain) and what is inferred (every topic, message type and parameter), says why it
> is Python, and tells anyone who reuses it to confirm the interface before trusting it.
Only the author has this code, and there are two honest ways to close the gap. Both
are his call:
1. **Create a repository for it** (Gitea is the natural home), push the package, then
add the `[submodule "src/waypoints"]` section to `.gitmodules` with its path and
URL; or
2. **Bring the directory into this repository** — `git rm --cached src/waypoints` and
commit the real files, so the package is plain content and needs no submodule.
Either way, once it is fixed, remove the `src/waypoints` line from
`tests/known-gaps.txt`: the suite reports the baseline as stale until you do.
What is genuinely missing now is the **original** `waypoints` package — and with it the
rviz plugins that `p3dx_navigation.rviz` expects (`waypoints/waypointPanel`,
`waypoints/Waypoints`), which the reconstruction deliberately does not reproduce. The
consequence is concrete: a clean clone now brings a real `src/waypoints/` directory
instead of an empty one, so `rosrun waypoints waypoints_server` resolves structurally —
but the interface is a guess, and `p3dx_navigation.rviz` still reports the waypoint
panel and tool as unknown classes. If the original ever reappears, it should replace the
reconstruction. Both gaps are recorded in [`tests/known-gaps.txt`](tests/known-gaps.txt).
## `guide.txt` also runs a package that is not in this workspace
@@ -132,12 +138,21 @@ the index has `package.xml` and `CMakeLists.txt`, that package names are present
unique, that `src/CMakeLists.txt` is catkin's toplevel symlink, that every gitlink is
either declared in `.gitmodules` or a documented known gap, that `src/rosaria`
resolves at the pinned commit, that the declared submodule URL is the verified one,
that every in-tree `<depend>` points at a package that exists, and that every known
gap is documented here. `tests/negative.sh` proves the suite has teeth by breaking one
thing at a time in a throwaway copy.
that every in-tree `<depend>` points at a package that exists, that every known gap is
documented here, and (section 8) that the reconstructed `waypoints` package is
complete: no gitlink any more, a `package.xml` declaring `waypoints`, a `CMakeLists.txt`,
the node that `guide.txt` names present, executable and initialising itself under that
same name, its Python accepted by `python3 -m py_compile`, a README that declares it a
reconstruction and names the lost commit, and a `git submodule status` that no longer
fails. `tests/negative.sh` proves the suite has teeth by breaking one thing at a time in
a throwaway copy — including deleting the reconstructed node, taking its `package.xml`
away, making the node non-executable, renaming the node it initialises, corrupting its
Python, dropping the declaration, and committing the gitlink back.
They do **not** prove that the workspace builds — no ROS was available where they were
written, so `catkin_make` was never run.
written, so `catkin_make` was never run — nor that the reconstructed `waypoints` node
does anything useful when it runs: only its structure, its node name and its syntax are
checked, and its topics are inferred (see [`src/waypoints/README.md`](src/waypoints/README.md)).
**On `rosaria`:** its upstream (`amor-ros-pkg/rosaria`) declares `GPLv2` with no "or later"
clause, which is **incompatible with the GPL-3.0 of this repository** for a combined work. It is