arche/two-link-arm
Two-link arm
A two-link arm hanging from a fixed shoulder, a motor and an encoder at each joint, and a controller that cancels gravity and reaches its pose; its plant in MuJoCo (archec gen --target mujoco), its test cases run against it (archec sim --plant … --test).
plantmujocorobotarmcontrolgravity-compensation
Partir de ce modèle
archec new my-project --template arche/two-link-armUne copie devient votre projet, à vous de la modifier : ses fichiers dans un nouveau dossier, prêts pour archec build.
▶ Essayer ◆ 3D Ouvrir dans le Playground { } Voir le code son modèle tourne dans votre navigateur, rien à installer
Paquet
| Type | modèle de projet |
|---|---|
| Version | 0.1.0 |
| Licence | Apache-2.0 |
| Contrôle export | none |
| Compatible avec | archec >=0.10 |
| Édition | 0.12 |
| Handlers | le langage d’action (```arche), exécuté en TypeScript d’après son code |
| Site | https://github.com/arche-lang/arche-lang |
Modèle
| Systèmes | Arm |
|---|---|
| Composants | Link Motor Encoder Controller |
| Exigences | 2 |
| Messages | 2 |
Code fourni
| Emplacement | Langage | Lignes |
|---|---|---|
main.arche · Controller.on_shoulder.body | arche | 4 |
main.arche · Controller.on_elbow.body | arche | 11 |
Ce que c’est
Arm · ses parties et leurs liensTwo-link arm
A two-link arm hanging from a fixed shoulder: two 0.5 m links of 1 kg, a motor (N·m) and an encoder at each joint. Its controller cancels gravity and adds a PD law on top, so it reaches its targets — a plain PD, as examples/arm has, stops short of them, held back by gravity.
| | | |---|---| | Plant | 2 hinges (y), 2 torque motors (±20 N·m), 2 encoders, 1 ms step | | Controller | τ = G(q) + KP·(target − q) − KD·q̇, 100 Hz; KP 40, KD 6 | | Requirements | REQ-ARM-REACH (within 0.02 rad in 2 s), REQ-ARM-HOLD | | Test plan | TP-ARM: reach the first pose, hold it, a second pose |
archec new my-arm --template two-link-arm a project from it, yours to change
archec gen main.arche --target mujoco -o out
archec sim main.arche --plant out/mujoco/plant_bridge.py --test
python3 out/mujoco/plant_bridge.py --viewer
In MuJoCo (4.0), from 0, 0 to 0.6, 0.9 rad: within 0.02 rad at 0.78 s, and 2·10⁻⁶ rad off at 3 s. Change the targets (controller.target_shoulder, target_elbow) or the links' mass and length — G(q) uses LINK_MASS and LINK_LENGTH, so change them together.
Fichiers 3 · 6,3 Ko
archec add le vérifie.
Utilise
N’utilise aucun autre paquet.
Utilisé par
Aucun paquet du store ne l’utilise encore.
Versions
★ 0 étoile↓ 0 téléchargement
| Version | Publiée le | archec | État | Changements | Téléchargements |
|---|---|---|---|---|---|
0.1.0 | 12 nov. 2026 | >=0.10 | publique | 0 |
Signature
Signé par arche avec la clé e660d0a8851875b9. Fichiers : 3, empreinte sha256-4b62d917af56341075e5…. archec add vérifie les deux avant d’écrire quoi que ce soit.
Discussion
Chargement…