Asked

Multithreading In ARC'S Blockly Environment

How to create a multithreaded program in the ARC Blockly environment in which more than one script (thread) will be running, e.g. the robot will listen to voice commands at the same time and track the selected color using a camera?


Related Hardware JD Humanoid

ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

PRO
Canada
#1  

Creating a multithreaded program in ARC is possible using Blockly. You can run multiple scripts simultaneously, allowing your JD Humanoid to perform tasks like listening to voice commands and tracking colors at the same time.

Here's a general guide on how you can do it:

  1. Open ARC and connect to your JD Humanoid.
  2. Add the necessary robot skills to your project. For voice commands, you'll need the Speech Recognition robot skill. For color tracking, you'll need the Camera device and the Camera Color Tracking robot skill.
  3. In the Blockly workspace, create a new script for each task. One script will handle the voice commands, and the other will handle the color tracking.
  4. In the voice command script, use the "ControlCommand" block to start the Speech Recognition robot skill.
  5. In the color tracking script, use the "ControlCommand" block to start the Camera Color Tracking robot skill.
  6. To run the scripts simultaneously, use the "Script Manager" robot skill. Add a new script for each task and use the "ControlCommand" block to start each script.

Remember, you can't write code or program the robot directly. You must use ARC because there is no robot API or SDK. If you need more detailed instructions, you can refer to the support section on the Synthiam website. There, you'll find tutorials and guides that can help you with your project.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#2  

Also, remember that ARC is a natively multithreaded environment. Each robot skill runs in its thread. By having the speech recognition robot skill and the camera device robot skill, they are both running simultaneously.

If you wish to have the Camera Device begin tracking from a speech command, you can do that with the ControlCommand(). For more information, you may be interested in the ControlCommand() manual here: https://synthiam.com/Support/Programming/control-command

The ControlCommand() allows robot skills to send orders to other robot skills. In your case, have a speech command sent to the camera device: "enable face tracking" (or whatever tracking you desire).