WPI-AIM / ambf

Asynchronous Multi-Body Framework
163 stars 67 forks source link

Joints fail to find parent or child if they have different namespace #206

Closed adnanmunawar closed 1 year ago

adnanmunawar commented 1 year ago

For a joint specified in an ADF file, if the parent/child body has different (overridden) namespace, AMBF will fail to load to that parent/child.

Here is an example ADF:

bodies:
- BODY A
- BODY B
- BODY C
joints:
- JOINT A
- JOINT B
high resolution path: ./high_res/
low resolution path: ./low_res/
ignore inter-collision: true
namespace: /ambf/env/model/ # <- Model level namespace, specified for the whole model
BODY A:
  name: A
  mesh: A.OBJ
BODY B:
  name: B
  mesh: B.OBJ
  namespace: /ambf/env/body/ # <- Body namespace, overrides the model namespace due to "/"
BODY C:
  name: C
  mesh: C.OBJ

JOINT A:
  name: A-B
  parent: BODY A
  child: BODY B # <- Won't find this as AMBF will look for model namespace + body name i.e. '/ambf/env/model/BODY B'
JOINT B:
  name: B-C
  parent: BODY B  # <- Won't find this as AMBF will look for model namespace + body name i.e. '/ambf/env/model/BODY B'
  child: BODY C