Running a script when you start MRL from the command line

Lets say you have a python script for MyRobotLab that you would like to start automatically.  Here's an example of how to run a script directly from the command line when myrobotlab launches.

java -jar myrobotlab.jar -service runtime Runtime python Python -invoke python execFile MyScript.py 
 
The above command line starts the runtime and python services, then it invokes the python service's method "execFile" with the argument of "MyScript.py" 
 
I integrate that command into a startup script on my Ras PI3.  This way, as soon as the raspberry pi starts up, it automatically start myrobotlab with the harry.py script and starts up the video streaming services.
 
I'll try to find a place to check in my scripts as examples so they can be included with part of the build.  (It will make it easier for people who want MyRobotLab to start on boot on a linux based system (such as the ras pi)
 
Enjoy!
 
 

 


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pedrosenarego's picture

thanks kwatters! i also want

thanks kwatters! i also want to use raspberry pi eventually!