Hi,
For vehicles with a limited turning radius, it makes sense to consider the maximal turning radius when switching to the next maneuver. To enable a smooth transition between two straight lines, I would like to add the possibility to dynamically adjust the TimeFactor based on how sharp the turn is: transition earlier the more acute the angle between the two straight lines is. From the PathController side, this can be achieved by overloading the getTimeFactor function, but the problem is that it will require knowledge of the next maneuver before the transition is made. What is the best way to achieve this?
I've looked into this, and have arrived at the following suggestion:
- When PathController starts a new maneuver, also have it request the next maneuver. This may be done by a planControl request, and parse the returning arg to find the maneuver after the current man_id (obtained through consumption of PlanControlState?).
- make the information about the next maneuver easily available for child PathControllers, by adding the function getNextManeuver().
- This will enable overloading of getTimeFactor by:
- Finding the angle between the current maneuver and the next (by calling getNextManeuver())
- inscribe a circle with radius equivalent to the minimal turning radius
- Find the distance/time between the intersection of the circle and the current line, to determine the appropriate TimeFactor for transitioning to the next maneuver
How does this sound? Do you agree that this is the most straight forward approach? I know that this will introduce some (minimally invasive) changes to the "holy" PathController base class, so I would like some input before I potentially start this process.
Thanks!
Hi,
For vehicles with a limited turning radius, it makes sense to consider the maximal turning radius when switching to the next maneuver. To enable a smooth transition between two straight lines, I would like to add the possibility to dynamically adjust the TimeFactor based on how sharp the turn is: transition earlier the more acute the angle between the two straight lines is. From the PathController side, this can be achieved by overloading the getTimeFactor function, but the problem is that it will require knowledge of the next maneuver before the transition is made. What is the best way to achieve this?
I've looked into this, and have arrived at the following suggestion:
How does this sound? Do you agree that this is the most straight forward approach? I know that this will introduce some (minimally invasive) changes to the "holy" PathController base class, so I would like some input before I potentially start this process.
Thanks!