0

I'm having problems using Mosek within Drake. If I use nightly build binaries, pydrake is unable to find my mosek license. If I build from git repo, pydrake can use mosek.

Installation steps follow from https://drake.mit.edu/python_bindings.html

Install from binary:

curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-<platform>.tar.gz
rm -rf /opt/drake
tar -xvzf drake.tar.gz -C /opt
export PYTHONPATH=/opt/drake/lib/python3.6/site-packages:${PYTHONPATH}

In the python interpreter, if I run

import pydrake.solvers.mosek as msk
msk.MosekSolver.AcquireLicense().is_valid()

returns False.

Install from source:

git clone https://github.com/RobotLocomotion/drake.git
mkdir drake-build
cd drake-build
cmake -DWITH_MOSEK=ON ../drake
make -j
cd drake-build
export PYTHONPATH=${PWD}/install/lib/python3.6/site-packages:${PYTHONPATH}

In the python interpreter, the previous command

import pydrake.solvers.mosek as msk
msk.MosekSolver.AcquireLicense().is_valid()

returns True.

I'm having other problems with the source build, so I'd like to be able to rely on the binaries instead.

Micah
  • 33
  • 5

1 Answers1

1

Unfortunately, that is the expected behavior. Currently one has to build from source to use Gurobi or Mosek, until we are able to properly navigate the license restrictions for those commercial solvers.

Russ Tedrake
  • 4,703
  • 1
  • 7
  • 10
  • Documentation updates tracked at https://github.com/RobotLocomotion/drake/issues/13603. Shipping Gurobi in binary releases tracked at https://github.com/RobotLocomotion/drake/issues/10804. – jwnimmer-tri Jun 29 '20 at 13:57