Skip to content

Updates to ray caster ray alignment and more customizable drift sampling #2556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jsmith-bdai
Copy link
Collaborator

@jsmith-bdai jsmith-bdai commented May 23, 2025

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

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

* Adds a new ray_alignment parameter - either world, yaw, or base
* Fixes drift height sampling
@jsmith-bdai
Copy link
Collaborator Author

NOTE: It might make sense to have yaw_only flag along with ray_alignment with a deprecation warning in the meantime until we eventually deprecate it. Thoughts @Mayankm96 @kellyguo11 @jtigue-bdai @pascal-roth ?

@jsmith-bdai
Copy link
Collaborator Author

Also, I likely need to fix the ray caster tests, just want to get some feedback on the feature changes before doing so

@pascal-roth
Copy link
Collaborator

NOTE: It might make sense to have yaw_only flag along with ray_alignment with a deprecation warning in the meantime until we eventually deprecate it. Thoughts @Mayankm96 @kellyguo11 @jtigue-bdai @pascal-roth ?

Yes, please, let's try not to break the interface.

@jsmith-bdai
Copy link
Collaborator Author

NOTE: It might make sense to have yaw_only flag along with ray_alignment with a deprecation warning in the meantime until we eventually deprecate it. Thoughts @Mayankm96 @kellyguo11 @jtigue-bdai @pascal-roth ?

Yes, please, let's try not to break the interface.

👍 I've added backwards compatibility now! Maybe we can drop support in 2 releases?

@pascal-roth
Copy link
Collaborator

NOTE: It might make sense to have yaw_only flag along with ray_alignment with a deprecation warning in the meantime until we eventually deprecate it. Thoughts @Mayankm96 @kellyguo11 @jtigue-bdai @pascal-roth ?

Yes, please, let's try not to break the interface.

👍 I've added backwards compatibility now! Maybe we can drop support in 2 releases?

Sounds good, thanks

@kellyguo11
Copy link
Contributor

We might need to update some of the environment configs, the anymal C rough locomotion environment is failing unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants