Asked
Resolved by DJ Sures!
How can I duplicate skills, especially scripts so that I can easily reuse my code? Unfortunately, as is, This requires me to open the script editor for a script, select all of the code, copy it, create a second script skill, open that new script's editor, and paste the new code in. I would like to just right-click on the script skill window copy it and paste it so that I would then have two identical scripts. Again, if you could do this for any skill, it would be FANTASTIC. If it were just scripts, that would help a lot too.
Related Hardware EZ-B v4
If you wish to duplicate a robot skill, use the Merge option. Here's the instructions: https://synthiam.com/Support/ARC-Overview/loading-saving-robot-projects/Merge%20Project
Load your project or press SAVE on your current project
Press the MERGE button and select the same project file that you already have loaded
Select the robot skill(s) that you'd like to import/merge
Press OK
*Note: this was converted to a question because it is not a feature request as the feature exists
Sigh. Not what I was looking for, but as a work-around, I guess I will have to do it that way.
I understand. There are a number of ongoing developments in the platform. While this "copy and paste" function would be convenient to a select few, there's a solution by using the "merge" button. The "merge" button essentially will do the exact same thing by importing a duplicate of the same control. So we can advance the software by suggesting using workarounds such as this
OK. Thanks for the information DJ.
I'm curious what is the use case for duplicating an entire script or function in the same project?
In my mind I can picture using the merge function to import other scripts and coded processes into a new project. I can also picturing using code snippets for example repeating a specific IF-THEN loop in a few scripts but copy and paste is generally the tool for that. I can't picture myself wanting to repeating an entire script in a project so I'm curious what you are scripting....I'm nosy!
Hi Justin,
Glad to share some info on my project. Thanks for asking. You see, I am creating a life-size humanoid robot with a chatbot and a large number of AI skills.
Simone the A.I. Fembot (see the link!)
I have had the need to create about 40 different scripts (motor control and testing, sensor reading and testing, chatbot tests, etc.)and many of them are similar. Typically I create one script for a particular feature or function, let's say raise your right arm (several motors are used for that). Once it is working I would want to copy that script and make a separate script for the left arm. I am a very visual person and as such a very visual programmer. It is easier for me to debug lots of small scripts rather than one or two long ones. It's also easier to debug! (For me that is. "Your mileage may vary.")
Ultimately Simone will be an entertainment/companion robot. You see, I have been reading about and watching videos on Hanson's Sophia robot and I wanted one, so rather than spend $88,000 on a Sophia (the wife was opposed to a second mortgage.) I decided to build my own.
--Thomas
DJ,
Your solution did not work for me. I get an error dialog:
Any idea what I did wrong?
Load your project or press SAVE on your current project CHECK!
Press the MERGE button and select the same project file that you already have loaded CHECK!
Select the robot skill(s) that you'd like to import/merge CHECK!
Press OK CHECK!
and then I get the error dialog.
--Thomas
Ensure you’re running the latest ARC early access. There was a fix for that last week.
read here: https://synthiam.com/Products/ARC/Releases/ARC-2021-04-28-Early-Access-Runtime-20546