Programming by chatgpt

Hello,

A teacher asked me about chatgpt integration options to develop robot programs. I’ve searched and haven’t found anything.
Do you know any application?

Thank you

i was looking into the same topic here. did you get any info or update about it?
there’s a topic that i found where it’s stated that Chatgpt is not yet there with URScript code. but i cant really figure out about whole programs.

I’ve used ChatGPT to help write some fairly basic stuff (all scripts - I really doubt it could even start to write usable Polyscope nodes or .urp files.). For example, I was creating a fairly large array, so I described what the array should consist of and it built it, so that saved some typing. This is created as part of a script. Might be able to pull that into the installation or variables files, but you’d have to be careful to not screw up the files in the process.

I then asked it to create the logic to do some reading and writing to that array. I had to go back several times to let it know that various things were different in URScript vs whatever it was creating (I assume Python).
I actually created a text file with several of the URScript-specific differences I had found, so the last time I asked it to write some code, I pasted that info in as part of my request.
The other thing I found useful was having it check my script for syntax errors - I was getting an error from the UR that I couldn’t pin down, so I pasted the code into ChatGPT and it quickly found the error (I think it was something dumb like a missing colon on a while statement.) It also gave me a couple other things that it thought were wrong but actually were fine.

It has some significant limits on the size of the script - I was getting an error that I couldn’t track down so I pasted the script for an entire UR program, but it said it was too large.

These are the issues I’ve noted so far and included in my request (probably not complete, and may not all be completely correct, but it got me better results):

  1. if statements and while loops require an end statement.
  2. the only looping structure available is while.
  3. outputs such as textmsg & print are not available - only popups.
  4. variables are not typically declared at the beginning of a function - generally only when called - such as “global Var1 = 5”.
  5. URScript does not support the min() or max() functions.
  6. URScript does not support creating variable length arrays, at least in most versions.
  7. variable names are limited to 15 characters
  8. URScript does not generally recognize indentation rules
1 Like