Skip to content

Commit d98db75

Browse files
authored
Fix Start Position (#1)
This PR aims to resolve issue #2 The key frame from the MuJoCo XML file was not reaching the initial position of the VR teleop. To fix this we need to apply the starting position from the `setup` data. Explanation: > mink.Configuration(model) initializes its internal data to default (zero) qpos, > ignoring any keyframe that ArmSetup already loaded into setup.data. Without this > sync, the IK starts solving from zeros — which on OpenArm puts the arms hanging > straight down through the table on the very first solve. I also added a template `.gitignore` commonly seen in Python projects.
1 parent 2d8618e commit d98db75

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
build/
8+
dist/
9+
*.egg-info/
10+
*.egg
11+
.eggs/
12+
13+
# Editable installs / uv
14+
.venv/
15+
venv/
16+
.uv/
17+
18+
# Test / coverage
19+
.pytest_cache/
20+
.coverage
21+
.coverage.*
22+
htmlcov/
23+
.tox/
24+
.mypy_cache/
25+
.ruff_cache/
26+
27+
# Editor / OS
28+
.vscode/
29+
.idea/
30+
*.swp
31+
.DS_Store

src/openarm_control/kinematics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def __init__(self, setup: ArmSetup, params: IKParams) -> None:
129129
self._max_iters = params.max_iters
130130

131131
self._config = mink.Configuration(setup.model)
132+
self._config.update(q=setup.data.qpos.copy())
132133
mid_qpos = self._config.data.qpos.copy()
133134

134135
task_kwargs = dict(

0 commit comments

Comments
 (0)