-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix(vehicle_cmd_gate): fix the problems while transition from/to stopped state #5183
Conversation
Hi @TakaHoribe, about the problem mentioned this issue, I moved the steering converge checking from controllers to vehicle_cmd_gate to solve this issue. If this method is okay, please let me know, I will create another PR to remove steering converge checking from controllers. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5183 +/- ##
==========================================
- Coverage 14.37% 14.37% -0.01%
==========================================
Files 1907 1907
Lines 130072 130077 +5
Branches 37618 37617 -1
==========================================
Hits 18695 18695
- Misses 90367 90372 +5
Partials 21010 21010
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ed5b3ef
to
ae9d1d6
Compare
ae9d1d6
to
b6b2646
Compare
Hi @TakaHoribe @tkimura4, sorry to disturb you, but just I want to kindly ping you. |
Could you review this PR?
What do you think about this opinion? |
@brkay54 Thank you for your PR. It is reasonable not to use the stop steering command when the vehicle is trying to stop. However, I can't see the purpose of the move of the steering convergence check. What is the reason why you think the check should be in the gate? |
@TakaHoribe, thank you for the reply.
The main cause is #4915
Because vehicle_cmd_gate checks conditions for start and stopping, I think it makes sense to move steering checking into vehicle_cmd_gate. |
@brkay54 Thank you, I understood. It sounds reasonable. Would you reproduce the non-start issue in psim? Or does it happen only in the real vehicle testing? |
@TakaHoribe Yes, I can reproduce in psim. 2023-11-06.15-54-52.mp4
|
b6b2646
to
c6276d6
Compare
@TakaHoribe -san, I rebased on the current master and solved the conflicts. And tested again, worked as we wanted. cap-.2023-11-11-16-34-22.mp4Merge order: Thank you for your effort, if you have any concerns please let me know. |
@TakaHoribe -san, sorry to bother you, it is a friendly ping. |
c6276d6
to
bded34a
Compare
bded34a
to
3a0d19f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@TakaHoribe
Could you approve this PR as a code owner?
Sorry, I have a comment for this PR. Please check it.
if (!isSteeringConverged(filtered_commands.control.lateral)) { | ||
filtered_commands.control.longitudinal = createStopTransitionControlCmd(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else if (enable_keep_steering_until_convergence_) {
if (fabs(current_kinematics_.twist.twist.linear.x) < stopped_vel_th) {
if (!isSteeringConverged(filtered_commands.control.lateral)) {
filtered_commands.control.longitudinal = createStopTransitionControlCmd();
}
}
}
Do you have any reasons to implement this block into vehicle_cmd_gate
?
I think it should be implemented at the end of trajectory_follower_node
because vehicle_cmd_gate
should just switch the control commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi thank you for the review. Actually, I explained the reason above here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to bother you, but could you check the comment below? @TakaHoribe @rej55
@brkay54 @TakaHoribe @rej55 I checked the code, there are 3 relevant modules, which are trajectory_follower, vehicle_cmd_gate, default_ad_api;
So the vehicle enters a dead loop and keeps |
Firstly, we need to avoid sending Thank you for the suggestion @ahuazuipiaoliang! It makes sense to me, however, it will cause an undesired behavior. If we change both I am not sure if it is a behavior we wanted or not. If it is okay, we can change it like @ahuazuipiaoliang said. cc @rej55 @TakaHoribe |
@brkay54 cc @TakaHoribe |
@rej55 Thanks, Fujiyama. Actually, I have modified the code in my way and tested on real vehicle for several days. I have not found any issue yet. |
@rej55 Thanks for the reply, it makes sense to me. I am updating the PR. |
…ped state Signed-off-by: Berkay Karaman <[email protected]>
3a0d19f
to
19b03ae
Compare
@rej55 @ahuazuipiaoliang Sorry to disturb you guys, thank you for your replies! To be able to not listen to the trajectory_follower's output when the vehicle fully stopped, I found another way. I changed the structure like this:
In this way, the vehicle will be able to control steering if the vehicle is in PAUSED state. Also, it won't be able to control the steering when it is fully stopped and disengaged. I made some tests to check: cap-.2024-02-02-14-03-35.mp4In the video above, I tested whether the vehicle can control the steering when we set a large steering value by using the manual controller or not. When I changed state to In the second part, I set a large steering value again and I changed its state to Also, I checked the behavior of the vehicle while stopping. (It can control the steering or not while moving and disengaged) You can see the result in the video below: cap-.2024-02-02-14-17-47.mp4As you can see, It still can control steering after I click the STOP button. Also, I tried this structure too:
It also solves the problems above, but, when the vehicle fully stopped, trajectory_follower can control the steering as you can see below: cap-.2024-02-02-14-31-00.mp4Therefore I used the first structure. Please share your comments with me! Thank you for your efforts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry for late review.
@tkimura4 @TakaHoribe We need code-owner approve. Could you check the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
Note: the keep-stop command can send the target steering in order to control steering before moving.
…ped state (autowarefoundation#5183) (#1328) Co-authored-by: Berkay Karaman <[email protected]>
Description
This PR solves the following issues:
Related links
Tests performed
Tested on Psim, working as we want.
Notes for reviewers
Interface changes
Effects on system behavior
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.