So, it basically boils down to an old problem: how do I get some user-controlled inputs in Matlab?
Keyboard handling in real-time is basically nonexistant, joystick is alright, but the most easy way to get some input and freedom of controlling things is – to poll the mouse position.
xy = get( 0, 'PointerLocation' )
Let’s get going with a short series of tutorials dedicated to nonlinear control examples with Matlab/Octave implementation. First to go: unicycle.
https://github.com/matlab2tikz/matlab2tikz – Matlab to TikZ (Latex graphics) conversion tool for plots
https://www.sharelatex.com/learn/TikZ_package – TikZ documentation – general graphics
https://www.sharelatex.com/learn/Pgfplots_package – Pgfplots documentation – plotting tool inside Latex
Modifications and examples below.
Did you know you can tag the plots in Matlab for easier searching? Because I fuckin’ didn’t.
Why so brutal? Well, after 6 years of writing your PhD in Matlab you CAN become furious when you realise instead of keeping the links to the currently opened plots in a global variables and different lists you could’ve been naming them all that time…
Tag the plot: description for searching
aa = plot(2,2);
set(aa, 'Tag', 'foot trajectory' )
set( findobj('Tag','foot trajectory'), 'XData', [2 3], 'YData', '4 5')
This one is a simple experiment done to test if the Dynamixel motor in an open loop (no internal PID) are fast enough when controlled by Matlab/USB-serial so that a HZD-based method will work.
This is an old one, but is working quite nice and should be still useful for working with Dynamixel motor (AX-12+, AX-12A).
The goal was to have a nice toolbox used for direct control of Dynamixel motors using USB2Dynamixel or any other USB-Serial (half-duplex, ~1Mbps) adapter.
This is an old one – a simple two-wheeled robot (unicycle) based on microcontroller esp8266 (with internal Wifi, in a stamp-like footprint, cool!), two servos, battery and with Matlab connectivity. How it works? Youtube:
All hail the mighty Matlab! … when it works
Ok, YARP and iCub-main are up and working, time for the jewel in the crown of every applied math-robotisct… robosicis… robotics mathematician: Matlab