rst-tu-dortmund / mpc_local_planner

The mpc_local_planner package implements a plugin to the base_local_planner of the 2D navigation stack. It provides a generic and versatile model predictive control implementation with minimum-time and quadratic-form receding-horizon configurations.
http://wiki.ros.org/mpc_local_planner
GNU General Public License v3.0
545 stars 143 forks source link

MPC cant tracking path properly and stuck #36

Open ilkaydost opened 3 years ago

ilkaydost commented 3 years ago

Hi, @croesmann, I'm working on a project and I'm planning to use MPC cuz several reasons, one of them TEB carlike config causes oscillation. So, I started to use MPC. However MPC couldn't generate proper path or tracking trajectory for the tricycle vehicle even if there was a huge gap to pass though. On the other hand TEB can able to produce path and vehicle follow this path (with oscillation) to goal. At the end, I'm investigating the solution to stuck, produce path and path tracking for three wheeled vehicle.

My mpc config file down below. mpc_carlike.txt -- I tried several configurations such as force_inclusion_dist or solver and planner types but none of them can't solved my problem. -- Costmap params for global map 1.2 both inflation and cost scaling fac. For local cost map: 0.8 cost scaling and 1.2 inflation Note: Even if I reduce the costmap params same behavior occurs.

-In the first picture mpc giving up the track path and stop. -In the second and third picture mpc cant turning even there was a proper gap and plan. -In the last two picture mpc started oscillation and stuck.

stuck1

stuck2 stuck4

stuck3 stuck3_oscillation

Huyhust13 commented 3 years ago

I think you should use "planning/objective/type: "minimum_time_viapoints" and set viapoint_sep.

Vào Th 4, 7 thg 4, 2021 vào lúc 14:55 ilkaydost @.***> đã viết:

Hi, @croesmann https://github.com/croesmann, I'm working on a project and I'm planning to use MPC cuz several reasons, one of them TEB carlike config causes oscillation. So, I started to use MPC. However MPC couldn't generate proper path or tracking trajectory for the tricycle vehicle even if there was a huge gap to pass though. On the other hand TEB can able to produce path and vehicle follow this path (with oscillation) to goal. At the end, I'm investigating the solution to stuck, produce path and path tracking for three wheeled vehicle.

My mpc config file down below. mpc_carlike.txt https://github.com/rst-tu-dortmund/mpc_local_planner/files/6269671/mpc_carlike.txt -- I tried several configurations such as force_inclusion_dist or solver and planner types but none of them can't solved my problem. -- Costmap params for global map 1.2 both inflation and cost scaling fac. For local cost map: 0.8 cost scaling and 1.2 inflation Note: Even if I reduce the costmap params same behavior occurs.

-In the first picture mpc giving up the track path and stop. -In the second and third picture mpc cant turning even there was a proper gap and plan. -In the last two picture mpc started oscillation and stuck.

[image: stuck1] https://user-images.githubusercontent.com/33389957/113825169-4fcbc480-9789-11eb-924a-053d921b98f6.png

[image: stuck2] https://user-images.githubusercontent.com/33389957/113825196-565a3c00-9789-11eb-9ca4-49eff9fd8d33.png [image: stuck4] https://user-images.githubusercontent.com/33389957/113825204-5823ff80-9789-11eb-9e8b-19d21445c817.png

[image: stuck3] https://user-images.githubusercontent.com/33389957/113825199-56f2d280-9789-11eb-834e-9f6f26d240cd.png [image: stuck3_oscillation] https://user-images.githubusercontent.com/33389957/113825201-578b6900-9789-11eb-9c54-ec6bd34dd9f6.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rst-tu-dortmund/mpc_local_planner/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIFPE4ITWVJHPL44KX46CILTHQFWFANCNFSM42QIHEMA .

-- Nguyen Van Huy T: (+84) 972 973 146 (zalo) | Skype: @. | M: @. Mechatronics Engineer

ilkaydost commented 3 years ago

@Huyhust13 Thanks for the reply. I dont want to use so much global planner when vehicle moves but I tried your idea nevertheless couldnt solve my problem either. Still stucking. Even if Mpc produce local path to w.r.t global planner with via_points and also there was a gap to pass through, MPC himself giving up to move forward with saying is not feasible. Indeed MPC wasnt even try to pass. It's just aborting himself. But Teb could successfully passed in the same situation.

Tubagc commented 3 years ago

Hi @ilkaydost , I have encountered the same problem with you. I do not want to use teb_local_planner because the plan and velocity oscillates when it is a car-like robot. I wondered if you solved the problem of stucking inside narrow corridors. I am waiting for your reply :)

ilkaydst commented 2 years ago

Hi @Tubagc , I couldnt solve stucking problem for MPC, then I started the use TEB local planner again. In my case I decreased acc_lim_angular and acc_lim_linear parameters like as 0.06 value also considering the motor and vehicle specs. Then TEB started to move without oscillation both narrow and wide areas ;)

LotfiZ commented 2 years ago

Hi @ilkaydst , happy to see that TEB worked for you, we have a forklift in a form of a tricycle with front steering drive wheel and we have a lot of problem of oscillations so i have some questions for you if its possible : did you modify the kinematic constraints in the TEB or did you just set cmd_angle_instead_rotvel to True ? also, how do you control the steering angle rate ? do you just set a fixed velocity or there is something else ? Thank you very much