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

Strange behaviors while using rviz ManualController plugin #5427

Closed
3 tasks done
evshary opened this issue Oct 27, 2023 · 13 comments · Fixed by #6230
Closed
3 tasks done

Strange behaviors while using rviz ManualController plugin #5427

evshary opened this issue Oct 27, 2023 · 13 comments · Fixed by #6230
Assignees
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) type:bug Software flaws or errors.

Comments

@evshary
Copy link
Member

evshary commented Oct 27, 2023

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

While using the rviz2 plugin ManualController, the vehicle will lose control if I set positive and negative velocity repeatedly

image

Expected behavior

The vehicle should work no matter in the positive or negative velocity.

Actual behavior

The vehicle will lose control

Steps to reproduce

  1. Set the vehicle to 10 km/h
  2. Then set to -10 km/h
  3. Set to 10 km/h again
  4. The vehicle will accelerate and move forward crazily

Versions

Ubuntu 22.04 with latest humble Autoware.

Possible causes

I guess this is something wrong with handling acceleration in ManualController, but haven't taken a deeper look.

Additional context

Autoware galactic doesn't have the issue.

@idorobotics idorobotics added the type:bug Software flaws or errors. label Oct 31, 2023
@xmfcx xmfcx added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 1, 2023
@mehmetdogru
Copy link
Contributor

@evshary

Thank you for creating the issue.

I was not able to reproduce the issue by following Steps to reproduce in the description.

Could you share a video that is happening?

@evshary
Copy link
Member Author

evshary commented Nov 9, 2023

Sure, here is the video

2023-11-09.16-33-45.mp4

@mehmetdogru
Copy link
Contributor

Thank you for the video @evshary, @TakaHoribe will ask TIER IV engineer who is responsible for the plugin.

@maxime-clem
Copy link
Contributor

I found this issue can be fixed by forcing the car to go through the PARK gear when switching from reverse to drive.

if (ackermann.longitudinal.speed > eps) {
gear_cmd.command = GearCommand::DRIVE;
} else if (ackermann.longitudinal.speed < -eps && current_velocity_ < eps) {
gear_cmd.command = GearCommand::REVERSE;
ackermann.longitudinal.acceleration *= -1.0;
} else {
gear_cmd.command = GearCommand::PARK;
}

This can be accomplished by changing the condition

to

    if (ackermann.longitudinal.speed > eps && current_velocity_ > -eps) {

The switch to PARK forces the car to completely stop when switching from negative to positive velocity (similar to the current switch from positive to negative) so it is not ideal.

Unrelated, but there might be a bug with the calculation of the time step dt.

Here it is constant but it should be calculation from the difference in the timestamps of the received VelocityReport.

@mehmetdogru
Copy link
Contributor

@maxime-clem to see if a PR needs to be created

@maxime-clem
Copy link
Contributor

I opened a PR to fix this issue: #6230

@mehmetdogru
Copy link
Contributor

@evshary

Could you confirm if #6230 solves your issue so that we can close it?

@maxime-clem maxime-clem moved this from Todo to In Progress in Planning & Control Working Group Feb 29, 2024
@maxime-clem maxime-clem self-assigned this Feb 29, 2024
@maxime-clem
Copy link
Contributor

@evshary friendly ping.

@evshary
Copy link
Member Author

evshary commented Feb 29, 2024

Hi @mehmetdogru @maxime-clem Sorry that I didn't have time to test it recently. I hope I can give it a try next week.
But it's ok to close the issue without waiting for me.
Thank you for the help on solving the issue.

@maxime-clem
Copy link
Contributor

@evshary It is fine if you can check it next week. I just want to make sure the proposed solution is suitable.
Thank you

@evshary
Copy link
Member Author

evshary commented Mar 4, 2024

@maxime-clem After some tests, I believe the bug is fixed now. Thank you!

@evshary evshary closed this as completed Mar 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Planning & Control Working Group Mar 4, 2024
@maxime-clem
Copy link
Contributor

@evshary thank you for checking.
Are you able to approve the PR ?

@evshary
Copy link
Member Author

evshary commented Mar 4, 2024

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) type:bug Software flaws or errors.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants