Unverified Commit b579c503 authored by renezurbruegg's avatar renezurbruegg Committed by GitHub

Fixes missing max raycast distance in RayCaster sensor (#48)

# Description

This MR fixes a minor issue where the max raycast distance in the config was ignored
in the raycaster sensor.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.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 run all the tests with `./orbit.sh --test` and they pass
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------
Co-authored-by: 's avatarPascal <roth.pascal@outlook.de>
parent 82258319
......@@ -261,6 +261,7 @@ class RayCaster(SensorBase):
self._data.ray_hits_w[env_ids] = raycast_mesh(
ray_starts_w,
ray_directions_w,
max_dist=self.cfg.max_distance,
mesh=RayCaster.meshes[self.cfg.mesh_prim_paths[0]],
)[0]
......
......@@ -53,8 +53,8 @@ class RayCasterCfg(SensorBaseCfg):
pattern_cfg: PatternBaseCfg = MISSING
"""The pattern that defines the local ray starting positions and directions."""
max_distance: float = 100.0
"""Maximum distance (in meters) from the sensor to ray cast to. Defaults to 100.0."""
max_distance: float = 1e6
"""Maximum distance (in meters) from the sensor to ray cast to. Defaults to 1e6."""
drift_range: tuple[float, float] = (0.0, 0.0)
"""The range of drift (in meters) to add to the ray starting positions (xyz). Defaults to (0.0, 0.0).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment