Copy files off Robot during deploy

This might be an odd question, but is there some way to copy files off the roboRIO during a deploy? I found the task for “src/main/deploy” but I assume that is one-way onto the robot only.

We have a calibration file on the robot, which was actually created by having a command write entries. However, now we have the challenge of knowing what is in the file, maintaining a proper backup, etc. If we could sync it in to the code repo each deploy, it would no longer be an issue.

Thanks for any help.

This is easy in Python. We actually learned how to do it at an event in CT in a moment of panic. Thank you all those who helped us figure it out and grab the software (winscp).

But I am not sure about how well that will work with other languages.

Oh, I know how to do with multiple ways. What I am hoping for is a way to automate it during the deploy so that it is always up to date to the programming computer.

1 Like

This is actually something that isn’t super easy to do currently. The tooling we have for ssh doesn’t currently support grabbing files (on our end, not something in the ssh libraries themselves). Make an issue in the gradlerio repo, and I’ll look into making this happen for 2022. Its a decently big change, so probably couldn’t happen this year.

1 Like

Alternatively, isn’t there a way to set up Gradle to execute a one-liner (scp [email protected]:/home/lvuser/whatever .) sometime between compile and deploy? I think Win10 actually ships with SCP installed, although I’ve never tried it myself.

Yeah you can create an exec task to do that. The big issue is plumbing the tasks if they need to run at a specific point. If you just want to run is, and don’t care when it happens in relation to deploy, you can just make the deploy task depend on that exec task.


Thanks. I realized that Carlos’s idea was good enough, since I am just trying to back up 1 file off the robot. Now I just have to figure out the Gradle syntax (I don’t do much Java; old school!)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.