Skip to content
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

the number of global paths could not be matched with the number of local paths caused Autoware.ai to get stuck in a dead loop. #5392

Open
3 tasks done
PhyllisJi opened this issue Nov 1, 2024 · 0 comments

Comments

@PhyllisJi
Copy link

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

We find that in some scenarios, Autoware fails to start because the global path and local path are not aligned. This misalignment caused Autoware to continuously attempt to align the two paths, resulting in an infinite loop.
Through examining the source code of Autoware, we find that when the op_global_planner module generates a global path, it creates multiple alternative straight-line paths at points where multiple lane changes are detected in the initial planned path. This multi-path generation causes a mismatch between globalPathId_roll_outs and globalPathId in the local_planning module, ultimately leading to a crash.

// globalPathId_roll_outs is the gid of the first Waypoint object in the last Lane object from the /local_trajectories message.
    // globalPathId is the gid of the first Waypoint object in the first Lane object from the /lane_waypoints_array message. 
    if(globalPathId_roll_outs == globalPathId) 
    {
        bWayGlobalPath = false; // If this variable is not true, the program will keep looping
        m_GlobalPathsToUse = m_GlobalPaths;
        std::cout << "Synchronization At Trajectory Evaluator: GlobalID: " <<  globalPathId << ", LocalID: " << globalPathId_roll_outs << std::endl;
    }

Autoware should limit the number of generated global paths, retaining only the optimal path or a limited set of alternative paths to prevent crashes in subsequent modules due to path ID mismatches. Alternatively, the path selection logic in local_planning can be modified to handle multiple path options, eliminating the strict dependency on matching globalPathId_roll_outs and globalPathId.

Expected behavior

Autoware works fine in normal scenarios.

Actual behavior

Since the local and global paths are not synchronised, the program is stuck in a dead loop.

Steps to reproduce

If there are multiple lane change points in the Initialisation single path (i.e., there are multiple nodes in the path that are not in the straight ahead direction), the function generates multiple alternative straight-line paths at those points, thus generating multiple path scenarios in allPaths. This is where the problem of unalignment is likely to occur.

Versions

No response

Possible causes

No response

Additional context

No response

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

No branches or pull requests

1 participant