Handling "fromto" with 2-element size fields

Discussion in 'Modeling' started by Alex Ray, Jul 15, 2017.

  1. In the modeling spec, geoms specified with "fromto" (cylinders and capsules) seem to expect a single-element size. (the second element being used as the half-length otherwise)

    However it seems like MuJoCo accepts 2-element sizes with capsules/cylinders with 2-element size fields.

    The `humanoid.xml` provided with 1.50 is an example. Specifically the right_uarm1/left_uarm1 geoms:

    <geom name='right_uarm1' type='capsule' fromto='0 0 0 .16 -.16 -.16' size='0.04 0.16' />

    How are these supposed to be modeled? (Ignore the second size term? Override the implied length?)

    Thanks!
    ~Alex
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    It only uses the first N size parameters that are needed, where N is defined by the geom type and whether or not fromto is being used. So in this case N=1, and I don't know why the model has two numbers (I guess it is a leftover).