Is it possible to remote execute a python ROS file
The question is hard to summarize. My goal is: to have a student in a brief Robotics workshop, with their own computer, to write or modify a simple python ROS script and run it and see the results. The student will have an arbitrary computer and we don't want the to have to try and install ROS.
Laptop "A" running Win, Lin or Mac, does not have a working ROS installation. Robot "R" is running Linux, and has a working ROS installation.
User on "A"writes a python ROS script and "submits it for execution" on the robot. What does it mean to "submit it for execution"? I am not sure. For example, one might scp the python file from "A" to "R" and into the "right" directory. And then ssh to the robot and issue a catkin_make, and roslaunch. That would work pretty well but requires careful use of shell commands.
Next level: we write a sophisticated shell script (in python even) which issues those commands, with good error checking and recovery. Still kludgy but at least easier on the "A" user.
Next level: there is a way to cause a node python file to run and establish contact with roscore and publish and subscribe to topics with a partial ros installation. What would be required? I am not sure.
Another option: "A" computer ssh's to "R" and does their editing and running there. Drawback is that the "R" SBC is slow and it won't allow user of "A" to use their favorite text editor.
Thoughts? I am sure others have had this particular scenario!
How would you feel about using a build server like teamcity? Students could have their own repository for their code. When they're ready to run it, they commit and push. The build server then builds the code, and deploys it to the robot.
Very interesting idea.... How would that work? I don't know TeamCity But for example github actions seem to be useful to activate when code is pushed to a repo. But github is a service and my robots are in the lab. They do have static IP addresses but they are not accessible from outside (I hope :). Even if they were how would the github action deliver the code to the robot and then trigger the roslaunch etc?
DO you have a more specific scenario?
So regarding teamcity in particular, You could install it on a server within your lab. Within teamcity, you can configure each build project to be triggered when somebody pushes code (doesn't matter if the code repo is cloud hosted, or hosted on your server). As part of the build, you can have it run arbitrary shell/bash scripts which could compile the code, copy it to the robot, and start the required launch file. You could even have it send certain commands to the robot to test the code/ execute certain maneuvers.