Closed liangfok closed 7 years ago
I first noticed this problem while trying to debug https://github.com/RobotLocomotion/drake/pull/1898.
@david-german-tri: I assigned this to you in the hopes that you would know who could best resolve this issue.
I would suggest guarding the tests with a CMake variable along the lines of USE_MATLAB_AEROSPACE_TOOLBOX
and set it to ON
by default for now.
Let's not add more complexity to cmake options for this. These are all silly things that are easily resolved. The immediate "fix" is to throw an error with the MissingDependency syntax used by checkDependency.
Also -- these are just for tests, and the build servers are ok, so i don't consider it an emergency.
Note I said variable, not option (this is an internal implementation detail).
Suggesting that someone would pass it in on the command line?
They could if they really needed to in the short term, but the idea would be to grab the list of installed toolboxes at CMake configure time and set the variables appropriately.
Since @RussTedrake says these dependencies are easily removed, now that we have MATLAB at TRI, I'll see if I can squash some of them as an introductory exercise. @liangfok, I'll start from the bottom of your list and work up, in case you're working from the top down.
Thanks @david-german-tri. I'm currently debugging another unit test that I believe is a true positive: https://github.com/RobotLocomotion/drake/pull/1898#issuecomment-207042156. I will return to this after I squash the bugs that I believe are real.
SGTM. Useful thing for assessing the extent of a MATLAB infection, by the way: [flist, plist] = matlab.codetools.requiredFilesAndProducts('/path/to/file.m')
@david-german-tri, I tried executing the matlab.codetools.requiredFilesAndProducts()
method on:
For both, the result was:
plist =
Name: 'MATLAB'
Version: '9.0'
ProductNumber: 1
Certain: 1
What does this tell us?
@liangfok That's not what I get. Did you already clean up coordinateTest locally?
Trial>> [flist, plist] = matlab.codetools.requiredFilesAndProducts('/Users/davidgerman/drake-distro/drake/examples/Pendulum/test/coordinateTest.m')
flist =
'/Users/davidgerman/drake-distro/drake/examples/Pendulum/test/coordinateTest.m'
plist =
1x2 struct array with fields:
Name
Version
ProductNumber
Certain
Trial>> plist.Name
ans =
MATLAB
ans =
Symbolic Math Toolbox
@david-german-tri: I did not modify coordinateTest.m
. Could this be a MATLAB version issue? Here's what I'm using:
>> ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: XXXX
Operating System: Mac OS X Version: 10.11.4 Build: 15E65
Java Version: Java 1.7.0_75-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.0 (R2016a)
Simulink Version 8.7 (R2016a)
Control System Toolbox Version 10.0 (R2016a)
Curve Fitting Toolbox Version 3.5.3 (R2016a)
Optimization Toolbox Version 7.4 (R2016a)
Simulink 3D Animation Version 7.5 (R2016a)
Statistics and Machine Learning Toolbox Version 10.2 (R2016a)
Interesting. Apparently requiredFilesAndProducts
can't tell you about products you don't have.
http://www.mathworks.com/help/matlab/ref/matlab.codetools.requiredfilesandproducts.html
iddata
structure is an input to an actual production function in Drake. Haven't looked at the Aerospace Toolbox quaternion stuff.I think @hongkai-dai might be able to resolve the quaternion stuff super quickly if we need help.
the iddata is a real dependency on the system id toolbox. we should use checkDependency at the top of that file.
Sorry I just saw this thread. Will work on the quaternion stuff.
Closing as wontfix.
I noticed that if certain MATLAB toolboxes are not installed, numerous Drake unit tests will fail. Below is a summary:
Failures due to lack of the Aerospace Toolbox:
Failures due to lack of the System Identification Toolbox:
Failures due to lack of the Neural Network Toolbox:
Failures due to lack of the Symbolic Math Toolbox:
Either the above-mentioned toolboxes should be listed as required dependencies or the unit test execution logic should be updated to automatically remove the above-mentioned unit tests when the required toolboxes are not installed.
Since the above-mentioned toolboxes are quite pricey (e.g., the standard Neural Network, Symbolic Math, System Identification, and Aerospace toolboxes are $1000 each), it may be better to make them optional dependencies.