Skip to content

Commit

Permalink
fix possible bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorlouisdg committed Mar 27, 2024
1 parent 68a6ed9 commit 59a6960
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions airo_drake/path/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
JointPathType,
PosePathType,
)
from loguru import logger

from airo_drake import joint_path_has_large_jumps
from airo_drake.path.analysis import find_closest_configuration
Expand All @@ -28,6 +29,10 @@ def create_paths_from_closest_solutions(
for start_configuration in start_configurations:
path = [start_configuration]
for joint_solutions in path_joint_solutions[1:]:
logger.info(f"len(joint_solutions): {len(joint_solutions)}")
if len(joint_solutions) == 0:
logger.warn("Could not create paths, one of the states has no joint solutions.")
return []
closest_config = find_closest_configuration(path[-1], joint_solutions)
path.append(closest_config)
paths.append(np.array(path))
Expand Down

0 comments on commit 59a6960

Please sign in to comment.