apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Question about constraints in qp_spline_reference_line_smoother

Open YaoQii opened this issue 8 years ago • 4 comments

Hi, In the reference smoother class, the constraint are added as below(Line165-183):

 // all points (x, y) should not deviate anchor points by a bounding box
  if (!spline_constraint->Add2dBoundary(evaluated_t, headings, xy_points,
                                        longitudinal_bound, lateral_bound)) {
    AERROR << "Add 2d boundary constraint failed.";
    return false;
  }

  // the heading of the first point should be identical to the anchor point.
  if (!spline_constraint->AddPointAngleConstraint(evaluated_t.front(),
                                                  headings.front())) {
    AERROR << "Add 2d point angle constraint failed.";
    return false;
  }

  // all spline should be connected smoothly to the second order derivative.
  if (!spline_constraint->AddSecondDerivativeSmoothConstraint()) {
    AERROR << "Add jointness constraint failed.";
    return false;
  }

It's very great to get a smooth spline. But I think maybe the kappa/dkappa of the first point should be identical to the first anchor point. Do the contraints above ensure that? Thanks very much.

YaoQii avatar May 31 '18 07:05 YaoQii

In the current code, we don't guarantee kappa and dkappa of the first point identical to the first anchor point.

startcode avatar Jun 05 '18 17:06 startcode

Thanks for your answer. And for the steering wheel to rotate continuously, maybe the ReferenceSmoother need it.

YaoQii avatar Jun 06 '18 00:06 YaoQii

Hello, Can you tell me how to add the constraint of kappa/dkappa in the referenceSmoother? Thanks a lot.

YaoQii avatar Jun 07 '18 00:06 YaoQii

Hello, Can you tell me how to add the constraint of kappa/dkappa in the referenceSmoother? Thanks a lot.

do you have any solution for this

lesun90 avatar May 08 '19 20:05 lesun90