Drake
drake::common Namespace Reference

Namespaces

 internal
 
 test
 

Classes

class  MatlabRemoteVariable
 Holds a reference to a variable stored on the matlab client, which can be passed back into a future lcm_call_matlab call. More...
 

Functions

void ToMatlabArray (const MatlabRemoteVariable &var, MatlabArray *matlab_array)
 
void ToMatlabArray (double var, MatlabArray *matlab_array)
 
void ToMatlabArray (const Eigen::Ref< const Eigen::MatrixXd > &mat, MatlabArray *matlab_array)
 
void ToMatlabArray (const Eigen::Ref< const Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic >> &mat, MatlabArray *matlab_array)
 
void ToMatlabArray (const std::string &str, MatlabArray *matlab_array)
 
template<typename... Types>
MatlabRemoteVariable CallMatlabSingleOutput (const std::string &function_name, Types...args)
 Special cases the call with one output. More...
 
template<typename... Types>
std::vector< MatlabRemoteVariableCallMatlab (int num_outputs, const std::string &function_name, Types...args)
 Invokes a mexCallMATLAB call on the remote client. More...
 
template<typename... Types>
void CallMatlab (const std::string &function_name, Types...args)
 Special cases the call with zero outputs, since it's so common. More...
 
template<typename T >
MatlabRemoteVariable NewRemoteVariable (T value)
 Creates a new remote variable with the corresponding value set. More...
 
 GTEST_TEST (TestCallMatlab, DispEigenMatrix)
 
 GTEST_TEST (TestCallMatlab, RemoteVarTest)
 
 GTEST_TEST (TestCallMatlab, SimplePlot)
 
 GTEST_TEST (TestCallMatlab, MeshTest)
 

Variables

static int globally_unique_id = 0
 

Function Documentation

std::vector<MatlabRemoteVariable> drake::common::CallMatlab ( int  num_outputs,
const std::string &  function_name,
Types...  args 
)

Invokes a mexCallMATLAB call on the remote client.

Parameters
num_outputsNumber of return variables (left-side arguments) to request from matlab. As in matlab, you need not request all of the outputs for any given method.
function_nameName of the matlab function to call. Any argument that could have been passed to mexCallMATLAB is allowed. https://www.mathworks.com/help/matlab/apiref/mexcallmatlab.html
argument1Any data type which has a ToMatlabArray method implemented.
argument2Same as above. ...

See call_matlab_test.cc for some simple examples.

Here is the call graph for this function:

Here is the caller graph for this function:

void drake::common::CallMatlab ( const std::string &  function_name,
Types...  args 
)

Special cases the call with zero outputs, since it's so common.

Here is the call graph for this function:

MatlabRemoteVariable CallMatlabSingleOutput ( const std::string &  function_name,
Types...  args 
)

Special cases the call with one output.

Here is the call graph for this function:

Here is the caller graph for this function:

drake::common::GTEST_TEST ( TestCallMatlab  ,
DispEigenMatrix   
)

Here is the call graph for this function:

drake::common::GTEST_TEST ( TestCallMatlab  ,
RemoteVarTest   
)

Here is the call graph for this function:

drake::common::GTEST_TEST ( TestCallMatlab  ,
SimplePlot   
)

Here is the call graph for this function:

drake::common::GTEST_TEST ( TestCallMatlab  ,
MeshTest   
)

Here is the call graph for this function:

MatlabRemoteVariable drake::common::NewRemoteVariable ( value)

Creates a new remote variable with the corresponding value set.

Here is the call graph for this function:

void ToMatlabArray ( const MatlabRemoteVariable var,
MatlabArray *  matlab_array 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ToMatlabArray ( double  var,
MatlabArray *  matlab_array 
)
void ToMatlabArray ( const Eigen::Ref< const Eigen::MatrixXd > &  mat,
MatlabArray *  matlab_array 
)
void ToMatlabArray ( const Eigen::Ref< const Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic >> &  mat,
MatlabArray *  matlab_array 
)
void ToMatlabArray ( const std::string &  str,
MatlabArray *  matlab_array 
)

Variable Documentation

int globally_unique_id = 0
static