Improve initial guess of acceleration limits for dynamic-limited robots in parabolicsmoother2#1519
Conversation
…the robot with dynamic limits. - Issue - So far, DynamicsCollisionConstraint::_CheckState checks dynamic limits. - When it's violated, CFO_CheckTimeBasedConstraints is returned and both velocity limits and acceleration limits are reduced. - Even if the dynamic acceleration limits are violated, the velocity is reduced and tends to be slower trajectory. - Observation - In many places to compute the ramp in parabolicsmoother2, boundary conditions are fixed. - In such case, the dynamic acceleration limits as boundary conditions can be computed as necessary condition for the planning. - Resolution - Before each ramp computation, compute the dynamic acceleration limits as necesary condition.
7e738e0 to
f8eed7b
Compare
|
@snozawa Thank you for the discussion! In |
…robot without dynamic limit. Use shared_ptr of kinbody for computation.
thanks for your reviewing and comment! I made a fix for it! |
…yConditionForDynamicAccLimitForParabolicSmoother2
|
I finished testing this PR on the real cell and simulated tests. Thanks! |
…yConditionForDynamicAccLimitForParabolicSmoother2
Instead of forcibly setting the dof values to zeros, get the correct current values. Co-authored-by: Puttichai Lertkultanon <puttichai.lertkultanon@mujin.co.jp>
Clarify the meaning of dynamic limits. Co-authored-by: Puttichai Lertkultanon <puttichai.lertkultanon@mujin.co.jp>
Make the comment more precise. Co-authored-by: Puttichai Lertkultanon <puttichai.lertkultanon@mujin.co.jp>
…ts with dynamic limits.
…LimitForParabolicSmoother2
|
@snozawa the MR looks good, but can we add a test somewhere to test that smoother is hitting this condition correctly (even your hand-made example is okay). |
thanks for your comment! sure, i'll prepare such automated test case! |
|
@snozawa great, let me know when that's done. |
|
@snozawa @kanbouchou Were you able to get a unit test for this case? It is holding up merging this fix. Thanks |
sorry for being late. |
|
@snozawa what was the data you used to internally test this feature and reproduce the problem? |
…p patch version again.
…p patch version again.
sorry for being late, I just made a test and now waiting for results. |
…ocs/source/changelog.rst. Bump patch version again.
Summary
parabolicsmoother2computation for the robot with dynamic limits.parabolicmoother2.Issue
parabolicsmoother2computes the slow trajectory.parabolicsmoother2(_ComputeRampWithZeroVelEndpoints,_MergeConsecutiveSegments, and_Shortcut), the computed acceleration violates the dynamic limits. If the violation is large, thefTimeBasedSurpassMultbecomes small. It also multiplied both to the velocity limits and the acceleration limits.GetDOFAccelerationLimitsandGetDOFDynamicAccelerationJerkLimitsmight be very large. Thus, the slowing down becomes significant.Resolution
parabolicsmoother2, it computes the ramp fort0andt1. Thus, the boundary conditions for positions and velocities are fixed:x0, v0, x1, v1.t0andt1. This will be a necessary condition for ramp computation, e.g. good initial guess of acceleration.Check2betweent0andt1, we don't need to conduct slowing down iteration due to dynamic limits. In this case, velocity limits are not reduced at all.Check2betweent0andt1, we still need to conduct slowing down iteration as before. But, the value offTimeBasedSurpassMultbecomes closer to1.0, and no unnecessary velocity / acceleration reduction.Experiment
10sec and it becomes around5sec.50msec - 200msec. Due to the non-convex optimization nature ofparabolicsmoother2, there are the cases which duration become worse. but, the amount of deterioration was not that high.Future todos
parabolicsmoother2tend to be slow. for examplesfStartTimeVelMultandfStartTimeAccelMultcarry over the mult from the previous iterations. but, once these become small, the later iterations remain slow._neightstatefnis called inCheck, somehow, large acceleration is created and it might cause much slowing down.