Asked
Resolved Resolved by DJ Sures!

How To Duplicate Robot Skills?

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

ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

PRO
Synthiam
#1   — Edited

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

  1. Load your project or press SAVE on your current project

  2. Press the MERGE button and select the same project file that you already have loaded

  3. Select the robot skill(s) that you'd like to import/merge

  4. Press OK

*Note: this was converted to a question because it is not a feature request as the feature exists

#2  

Sigh. Not what I was looking for, but as a work-around, I guess I will have to do it that way.

PRO
Synthiam
#3  

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:)

#5  

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!

#6  

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.xD) I decided to build my own.

--Thomas

#7  

DJ,

Your solution did not work for me. I get an error dialog:

User-inserted image

Any idea what I did wrong?

  1. Load your project or press SAVE on your current project CHECK!

  2. Press the MERGE button and select the same project file that you already have loaded CHECK!

  3. Select the robot skill(s) that you'd like to import/merge CHECK!

  4. Press OK CHECK!

and then I get the error dialog.

--Thomas