/yarp2IC

How to talk to YARP by means of the MATLAB Instrument Control Toolbox

Primary LanguageMATLABGNU General Public License v2.0GPL-2.0

yarp2IC

View Interface YARP with Instrument Control Toolbox on File Exchange

These scripts demonstrate how to easily interface YARP with MATLAB/Simulink without relying on Java bindings.

To this end we can profitably exploit the Instrument Control Toolbox which provides a simple access to sockets, in particular through the tcpip function. Having a socket in MATLAB enables us to directly talk to YARP according to the rules described here.

Just for testing purpose, a Simulink model is available to read from and write to YARP world.

model

Instructions

Launch the following commands in three different shells:

$1> yarpserver
$2> yarp write /write
$3> yarp read /read

Then, open up the block Settings and enter the correct values.

Finally, run the simulation and type any two numbers in the shell where you've opened the /write port. Check out the model's display as well as the /read port output.

Have fun 🎉