Automatically Setup Robot

Hello, we have a standard product we offer with the UR robot, and each time we set the same settings such as IP address, safety password, remote enable, etc. Basically several things in the hamburger menu. Is there a simple way to write a magic file to set these parameters just by inserting a flashdrive? It would help streamline each new machine setup.

If I could put a default installation (where the IO is already named, TCP taught, etc) along with our CAP on the same flashdrive as this magic file, this would allow me to just insert the usb, open the pre-made installation, load the CAP, and switch to Imperial all in one reboot, without ever entering information from the hamburger menu. It’s a small time saver, but it would add up. Thanks in advance


Please be aware that creating your own magic files can easily lead to altering the file system in such a way that the robot does not boot anymore. Using any non-UR provided magic files is done so at your own risk.


I second this request ^^

Just sharing my current results in case anyone else is trying this stuff. I wrote a magic file that replaces the ip address line in server.conf file with the IP address that I need. It sets it correctly in the file, but not in Polyscope, and upon rebooting, it is replaced with Interestingly, when applying a new IP address in Polyscope, the contents of the file are also not written until it gets rebooted.

@ajp Is there any way to achieve this, or are these settings stored into the backend and written TO the file system? I’ve been operating under the assumption that Polyscope pulls this information from the file system, but maybe that’s not the case?

Hi Eric,

I have some moral objections to propagating the imperial measurement system but I suppose I should still try to help :wink:

Where is the server.conf file that you’re editing?

I would have thought that /etc/network/interfaces would be the one you should edit. I think that’s where Polyscope pulls the system network config in from (I don’t have access to a robot now to confirm 100%).

LOL I feel ya on the metric/imperial, but a lot of welding is in Inches Per Minute of wire, so that’s the motivation! I had been poking around in the .urcontrol folder, so that’s probably where I was going wrong. I found the path your referenced and it’s looking more promising. Thanks!

Thanks to @ajp again for the nudge in the right direction for IP address. I’ve included the main Magic File I created here, and a brief tutorial for modifying it in case anyone else was interested.

# file
# author Eric Feldmann
# Script to setup new machine

# Warn user not to remove USB key
echo "Setting Up..." | DISPLAY=:0 aosd_cat -R red -x 230 -y -210 -n "Arial Black 80"

cp /programs/usbdisk/installScripts/interfaces /../etc/network/interfaces
cp /programs/usbdisk/installScripts/.ursafetypass.file /root/.ursafetypass.file
cp /programs/usbdisk/installScripts/ /root/.polyscope/
cp /programs/usbdisk/installScripts/default.installation /programs/default.installation
cp /programs/usbdisk/installScripts/exampleProgram.urp /programs/exampleProgram.urp
cp /programs/usbdisk/installScripts/exampleCAP.jar /root/.urcaps/exampleCAP .jar
cp /programs/usbdisk/installScripts/ /root/.urcontrol/

# Notify user it is ok to remove USB key
echo "Remove Drive and Restart" | DISPLAY=:0 aosd_cat -x 200 -y -210 -n "Arial Black 80"

On this same Flashdrive, I have the folder “installScripts” where all the files are housed and copied across.

I made these mostly by either copying it from my simulator, or else copying it from the actual robot controller. Then I changed what I needed and wrote the cp command to write it back.

Example for setting the IP address:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth0
iface eth0 inet static

By naming this the same as what was on the controller, the magic file just copies this file from my flashdrive right over top of the one on the controller. You can easily modify the IP address to whatever you would like.


Glad you got it working Eric.

This should come with a disclaimer that we do not recommend creating custom magic files as it is very easy to change the file system in such a way that the robot will not boot if you get it wrong. Could you add something like that to the top of your post please?


1 Like

@eric.feldmann just wanted to add one more file to your list


This contains any information set in the DNS configuration boxes

1 Like