如何定制非线性约束?

huangapple go评论97阅读模式
英文:

How to customize nonlinear constraints?

问题

我正在尝试在我的项目中设计一些非线性约束。在先前的版本中,我使用了抽象类 drake::solvers::NonLinearConstraint 来派生我的非线性约束。在当前版本中,我找不到这个类,甚至找不到头文件 drake/solvers/nonlinear_constraint.h。我该如何在当前版本中设计非线性约束?

我尝试使用关键词 nonlinearnonlinear constraint 在C++文档中搜索,但没有找到帮助。是否有替代的API和示例可供使用?

英文:

I am trying to design some nonlinear constraints in my project. In previous version, I utilized the abstract class drake::solvers::NonLinearConstraint to derive my nonlinear constraint. I doesn't find this class in current vesion, even the header file drake/solvers/nonlinear_constraint.h. How can i design nonlinear constraints within current version?

I try to seacrch in C++ documentation with the keywords nonlinear and nonlinear constraint, but it doesn't help. Any substitute api and example for this?

答案1

得分: 1

我相信你只想使用 drake::solvers::Constraint。 你可以在代码库中找到很多示例,例如 ComPositionConstraint

class ComPositionConstraint final : public solvers::Constraint {
英文:

I believe you just want to use drake::solvers::Constraint. You can find many examples in the codebase, e.g. the ComPositionConstraint.

class ComPositionConstraint final : public solvers::Constraint {

huangapple
  • 本文由 发表于 2023年5月13日 17:36:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76242029.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定