Not able to run multiple matlab ROS nodes simultaneously
Hello all,
I am struggling with ROS on Matlab. It seemed very nice in the beginning that I could use ROS with Matlab but now it seems not to be so flexible as I thought it would be. If ROS is run directly on ubuntu, infinite nodes can run just by opening a terminal and typing rosrun. However, in matlab there is only one terminal. I just want multiple nodes run together. But if I execute one node, then the terminal is not free anymore to run another one. I tried to put them all in 1 script and run this script but this also does not work. I am looking for a way that I can initialize a node in each script and then executing these scripts one by one. Can someone help me with this please?
Regards, Matthias
Would this not be something to ask Mathworks? They are a commercial company with good support channels and engineers.
sorry to ask, but why you are not using roslaunch to start multiple nodes ? An additional typical unix/linux option is to fork processes from shell (rosrun pkg prg&).
Does Matlab support
roslaunch
? I've not been able to find it in the docs.That's exactly what I'm missing now. A roslaunch function in Matlab, which is not available I think.
A cursory glance at the matlab docs shows that running multiple nodes should be possible. It should be possible to start them and then return to the command console, but that I'm not sure about.
Again, I would recommend using Mathworks support for this. They should know.
If you're looking to run existing nodes from MATLAB, you can definitely do this in MATLAB with the ! operator. Following the standard from that previous comment:
!rosrun pkg prg&
But if it's multiple MATLAB scripts, my answer would be the way to go.