Skip to content

Add and change functions for backward driving

Yuma Nihei requested to merge yn-mrse/common:feature/backward_driving into master

Implemented feature

Add and change functions for backward driving. Related issue is core_planning#8 (closed) .

Description

This MR has the following advantages:

  • Facilitates identifying waypoints direction for each node supporting waypoints.
  • isFront() function is changed to identifyDirection() function as an upward compatible function.
  • isFront() function is changed to inDrivingDirection() function as an upward compatible function.
  • getClosestWaypoint() function that are already defined can also support backward waypoints.

This MR provides the following:

  • Identify forward waypoints or backward waypoints.
    • Function based on the posture and the position of waypoints.
    • Function based on the velocity of waypoints.
    • Function based on integrating the above two methods.
  • Existing function isFront() is changed to identifyDirection() as an upward compatible function.
    • identifyDirection() now supports an exception when the waypoints direction cannot be identified.
  • Existing function isFront() is changed to inDrivingDirection() as an upward compatible function.
    • inDrivingDirection() returns whether there is a target point in the driving direction.

Implementation considerations

For safety reasons, the existing isFront() function is obsolete.

The identifyDirection() function is upward compatible with it. The inDrivingDirection() function is upward compatible with it.

autoware.ai(v1.12) does not have any other package that uses the isFront() function, but it may not support external systems using the existing libwaypoint_follower.

How to test

Please check if the test code passes.

Edited by Yuma Nihei

Merge request reports

Loading