modèle de projet vérifié

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-arm

Une 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

Typemodèle de projet
Version0.1.0
LicenceApache-2.0
Contrôle exportnone
Compatible avecarchec >=0.10
Édition0.12
Handlersle langage d’action (```arche), exécuté en TypeScript d’après son code
Sitehttps://github.com/arche-lang/arche-lang

Modèle

SystèmesArm
ComposantsLink Motor Encoder Controller
Exigences2
Messages2

Code fourni

EmplacementLangageLignes
main.arche · Controller.on_shoulder.bodyarche4
main.arche · Controller.on_elbow.bodyarche11

Ce que c’est

Architecture Arm · ses parties et leurs liens
Arm Arm link : Link Pose controller : Controller shoulder_angle elbow_angle shoulder_torque elbow_torque

Two-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

Télécharger le .archepkg Le .archepkg est signé : 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

VersionPubliée learchecÉtatChangementsTéléchargements
0.1.012 nov. 2026>=0.10publique0

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…