【发布时间】:2019-11-29 03:47:58
【问题描述】:
这段示例代码: ''' 将 numpy 导入为 np 将 pydrake.solvers.mathematicalprogram 导入为 mp 从 pydrake.solvers.ipopt 导入 IpoptSolver 定义 foo(x): 返回 np.sign(x)
prog = mp.MathematicalProgram()
x = prog.NewContinuousVariables(1)
prog.AddConstraint(foo, [1.], [1.], vars=x)
prog.AddLinearCost(1 * x[0])
result = mp.Solve(prog, np.array([10.]), None)
print(result.is_success())
print(result.GetSolution(x))
''' 返回错误:分段错误(核心转储),当我在 jupyter notebook 打开的终端下运行它时,由课程提供:http://underactuated.csail.mit.edu/Spring2019/install_drake_docker.html。 (虽然代码本身已经在这里证明了,https://github.com/RobotLocomotion/drake/issues/12410)
【问题讨论】:
标签: segmentation-fault jupyter-notebook coredump drake