in order to store matrix at the current directory:
ROS_HOME=`pwd` roslaunch ros-invertmotornstep sox.launch
In order to get keyboard input along with the ROS program:
(I use for store and restore matrix):
See the last solution in URL: https://answers.ros.org/question/63491/keyboard-key-pressed/