Skip to content

Commit

Permalink
Merge branch '40-error-computing-soi-when-a-obstacle-is-not-in-scene-…
Browse files Browse the repository at this point in the history
…yet' into 'develop'

Resolve "Error computing SOI when a obstacle is not in scene yet"

Closes #40

See merge request cps/commonroad/commonroad-criticality-measures!35
  • Loading branch information
YuanfeiLin committed Apr 28, 2024
2 parents 86d26eb + 629e1d7 commit 31a2b26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- check whether the vehicles are in the same lanelet: now the lanelet is extended by its successors and predecessors
- adds the error handling of the out-of-projection-domain for many measures, such as TTC, THW, ALongReq, ALatReq
- Initialization of the ego vehicle in the base class
- fix the pf measure, when the other vehicle is not present in the scenario for some time steps
- fix the pf and soi measure, when the other vehicle is not present in the scenario for some time steps
## [0.3.2 & 0.3.3] - 2024.03.16
### Added
- Error handling for check in same lanelet
Expand Down
2 changes: 1 addition & 1 deletion commonroad_crime/measure/index/soi.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def compute(self, time_step: int = 0, vehicle_id: int = None, verbose: bool = Tr
# Skip ego-vehicle and obstacles out of scope (e.g. timeline ended for this obstacle)
if (
isinstance(obstacle, DynamicObstacle)
and len(obstacle.prediction.trajectory.state_list) < ts
and obstacle.state_at_time(ts) is None
):
continue
if obstacle.obstacle_id == self.ego_vehicle.obstacle_id:
Expand Down

0 comments on commit 31a2b26

Please sign in to comment.