英文:
How to customize nonlinear constraints?
问题
我正在尝试在我的项目中设计一些非线性约束。在先前的版本中,我使用了抽象类 drake::solvers::NonLinearConstraint 来派生我的非线性约束。在当前版本中,我找不到这个类,甚至找不到头文件 drake/solvers/nonlinear_constraint.h。我该如何在当前版本中设计非线性约束?
我尝试使用关键词 nonlinear 和 nonlinear 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 {
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论