Skip to content

Commit

Permalink
call_matlab_client: add instructions and reduce erroneous errors to q…
Browse files Browse the repository at this point in the history
…uiet returns (RobotLocomotion#6962)
  • Loading branch information
RussTedrake authored and soonho-tri committed Sep 6, 2017
1 parent b297575 commit a753a23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
21 changes: 0 additions & 21 deletions drake/doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,3 @@ You can choose to download a pre-compiled version of Drake, or to build it from
docker


Optional: Installing MATLAB
===========================

Drake is transitioning from being primarily a MATLAB-based toolbox to a C++ toolbox. To use the MATLAB interface, we require

* MATLAB R2012a or later

Many of the features also use

* Control System Toolbox
* Curve Fitting Toolbox
* Image Processing Toolbox
* Optimization Toolbox
* Simulink
* Simulink 3D Animation
* Statistics and Machine Learning Toolbox
* System Identification Toolbox

You can check your current MATLAB installation using MATLAB's ``ver`` command.


9 changes: 7 additions & 2 deletions drake/doc/matlab_bindings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
Using Drake from Matlab
***********************

We are currently implementing the MATLAB bindings for Drake's new C++ libraries.
Stay tuned for more information.
MATLAB code/bindings available in Drake are unit tested on MATLAB R2017a.
Earlier MATLAB versions may work but are not officially supported.

We are currently experimenting with a few solutions for implementing the
MATLAB bindings for Drake's new C++ libraries. You will find minimal
examples available in master, but most are not available yet. Stay tuned
for more information.

In the meantime,
:ref:`Using Drake from Python <python-bindings>`
Expand Down
5 changes: 3 additions & 2 deletions drake/matlab/util/call_matlab_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
}

google::protobuf::io::FileInputStream raw_input(file_descriptor);
raw_input.SetCloseOnDelete(true);
google::protobuf::io::CodedInputStream input(&raw_input);

// TODO(russt): Document use of mkfifo?
Expand All @@ -64,10 +65,10 @@ void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
// Parse the message.
drake::common::MatlabRPC message;
if (!message.MergePartialFromCodedStream(&input)) {
mexErrMsgTxt("Failed to read from coded stream");
return;
}
if (!input.ConsumedEntireMessage()) {
mexErrMsgTxt("Failed to consume entire message");
return;
}

// Release the limit.
Expand Down

0 comments on commit a753a23

Please sign in to comment.