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

obstacle_stop_planner does not revert its avoidance path after the avoided obstacle is gone. #2272

Closed
3 tasks done
VRichardJP opened this issue Nov 12, 2022 · 5 comments · Fixed by #2314
Closed
3 tasks done
Assignees
Labels
status:help-wanted Assistance or contributors needed. type:new-feature New functionalities or additions, feature requests.

Comments

@VRichardJP
Copy link
Contributor

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

I have deployed several vehicles near a train station. It is very common for other vehicles to come, stop for a minute to drop off someone, then go away.

Although the avoidance works nicely while the vehicle is parked on the side of the road, autoware still wants to follow the avoidance path after the vehicle is gone. This is very akward for the safety driver, as autoware moves away from its lane for no apparent reason

This can be reproduced with the planning simulator easily:

  1. No obstacle -> no avoidance
    Screenshot from 2022-11-12 08-42-38

  2. A vehicle comes and park -> avoidance path is generated after a few seconds
    Screenshot from 2022-11-12 08-43-34

  3. The vehicle is gone, but autoware does not revert the path to 1 (even if you wait for a very long time)
    Screenshot from 2022-11-12 08-44-05

Expected behavior

If there is no obstacle, there should be no avoidance

Actual behavior

generated avoidance path stays for ever.

Steps to reproduce

See the pictures. You can use the fake bus to emulate a parked vehicle, and delete all obstacles after avoidance path is generated.

Versions

No response

Possible causes

No response

Additional context

No response

@takayuki5168
Copy link
Contributor

FYI: This function is not in obstacle_stop_planner but avoidance module in behavior_path_planner

@satoshi-ota Indeed, this function seems necessary in some cases. You don't have a plan to implement this function for now?

@satoshi-ota
Copy link
Contributor

satoshi-ota commented Nov 12, 2022

@VRichardJP There is currently no function to cancel/revert avoidance path when it is no longer necessary, so this is how it would behave in the scene described above. I am currently working on developing a function that takes into account vehicles in adjacent lanes when avoiding, and if it is not safe to follow avoidance path right now, the vehicle stops behind the avoidance target and lets the adjacent lane's vehicle pass over, so I will consider this function together.

Of course, if you would like to implement revert function in avoidance module as soon as possible, your contributions are welcome 😄

@VRichardJP
Copy link
Contributor Author

@satoshi-ota I am not well versed in the planning logic, but if I find the time I'll try to implement it.

@BonoloAWF BonoloAWF added type:new-feature New functionalities or additions, feature requests. status:help-wanted Assistance or contributors needed. labels Nov 15, 2022
@ismetatabay
Copy link
Member

@satoshi-ota @VRichardJP This issue had caught my attention before, and I did a little research on it. I think the problem is that the avoidance module in the Behavior path planner tree, after detecting the object once and running, stays in the running state until the vehicle reach its goal. This is how I solved this problem:

BT::NodeStatus AvoidanceModule::updateState()
{
const auto is_plan_running = isAvoidancePlanRunning();
DebugData debug;
const auto avoid_data = calcAvoidancePlanningData(debug);
const bool has_avoidance_target = !avoid_data.objects.empty();
if (!is_plan_running && !has_avoidance_target) {
current_state_ = BT::NodeStatus::SUCCESS;
} else {
current_state_ = BT::NodeStatus::RUNNING;
}
DEBUG_PRINT(
"is_plan_running = %d, has_avoidance_target = %d", is_plan_running, has_avoidance_target);
return current_state_;
}

I'm checking the object data from the planner_data_ by adding an if statement to above method. If there is no object, I make the module complete the task by making the avoidance module current_state_ = SUCCESS. If you think this solution is a suitable solution, I can create a PR on this issue by adding this check option as a parameter. Here is the video:

2022-11-17.13-39-55.mp4

@VRichardJP
Copy link
Contributor Author

That looks perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:help-wanted Assistance or contributors needed. type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants