• James Smith's avatar
    Updates to ray caster ray alignment and more customizable drift sampling (#2556) · d02d3b8a
    James Smith authored
    This PR pushes some changes from our internal RAI fork of Isaac Lab.
    
    The 2 main changes are:
    
    #### Adds a new `ray_alignment` parameter to replace the previous
    `yaw_only` arg.
    
    Now the ray alignment can be aligned to `world`, `yaw`, or `base.
    
    #### Improves drift height sampling
    
    At the moment, the `RayCasterCfg` hosts a parameter called
    `drift_range`. It allows to randomize the position of the sensor in
    world frame, which comes with a couple of downsides:
    * If the projection is done along the gravity vector, the z-component
    drift term cannot be visualized (it is implicitly given in the pose, and
    added to the height scan in the observation term).
    * The perturbation is applied in world frame, i.e., if the ray cast is
    yaw aligned, then the drift varies with the yaw angle
    * The drift is applied to all (x,y,z) components equally
    
    This PR adds a new parameter ray_cast_drift_range. It gives more freedom
    in choosing the drift ranges as x, y and z components can be treated
    separately. It also applies the drift after projecting and rotating the
    ray cast points, i.e. the drift is now invariant under the yaw angle and
    the drift in z is can be visualized
    
    I've added Fabian Jenelten and Jeonghwan Kim to this PR as they worked
    on these changes within RAI - I'm simply helping to push them up 😄
    
    ## Type of change
    
    <!-- As you go through the list, delete the ones that are not
    applicable. -->
    
    - New feature (non-breaking change which adds functionality)
    - Breaking change (fix or feature that would cause existing
    functionality to not work as expected)
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./isaaclab.sh --format`
    - [x] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my
    feature works
    - [ ] I have updated the changelog and the corresponding version in the
    extension's `config/extension.toml` file
    - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
    exists there
    
    <!--
    As you go through the checklist above, you can mark something as done by
    putting an x character in it
    
    For example,
    - [x] I have done this task
    - [ ] I have not done this task
    -->
    
    ---------
    Signed-off-by: 's avatarooctipus <zhengyuz@nvidia.com>
    Co-authored-by: 's avatarooctipus <zhengyuz@nvidia.com>
    d02d3b8a
run_ray_caster.py 4.73 KB