borglab / GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.
BSD 2-Clause "Simplified" License
41 stars 10 forks source link

URDF/SDF snafu #211

Open dellaert opened 3 years ago

dellaert commented 3 years ago

When I print the Vision60, the joints are listed as below. Clearly, the name in the SDF is already a number, but we seem to invent our own, non-matching number :-)

JOINTS:
10 id=0
        parent link: body
         child link: hip2
        pMc:  0 -0  0,   0.325 -0.1575       0
4 id=1
        parent link: hip2
         child link: upper2
        pMc:    0 -0.5    0,  -0.207198          0 -0.0599282
5 id=2
        parent link: upper2
         child link: lower2
        pMc:    0 0.76    0, -0.023523         0 -0.096449
11 id=3
        parent link: body
         child link: hip3
        pMc:  0 -0  0,  -0.325 -0.1575       0
6 id=4
        parent link: hip3
         child link: upper3
        pMc:    0 -0.5    0,  -0.207198          0 -0.0599282
7 id=5
        parent link: upper3
         child link: lower3
        pMc:    0 0.76    0, -0.023523         0 -0.096449
8 id=6
        parent link: body
         child link: hip0
        pMc:  0 -0  0,  0.325 0.1575      0
0 id=7
        parent link: hip0
         child link: upper0
        pMc:    0 -0.5    0,  -0.207198          0 -0.0599282
1 id=8
        parent link: upper0
         child link: lower0
        pMc:    0 0.76    0, -0.023523         0 -0.096449
9 id=9
        parent link: body
         child link: hip1
        pMc:  0 -0  0, -0.325 0.1575      0
2 id=10
        parent link: hip1
         child link: upper1
        pMc:    0 -0.5    0,  -0.207198          0 -0.0599282
3 id=11
        parent link: upper1
         child link: lower1
        pMc:    0 0.76    0, -0.023523         0 -0.096449
dellaert commented 3 years ago

A good solution would be to (a), make sure the numbers are the same, and (b) make the name a proper string as in "joint-7".

varunagrawal commented 3 years ago

The name is some arbitrary string right? For the vision60, we have a joints named 10, 8, etc, but for the laikago, we have joints named FR_hip_joint, FR_calf_joint etc.

Ensuring the numbers are the same would have to be done on a case-by-case basis, or involve some checks to see if the name is just a number. An alternative solution would be to just update the URDF file directly and give the joints more descriptive names.