Asked — Edited
Resolved Resolved by Synthiam Support!

JD On A Chassis With 2 X 360 Servo But Only One Movement Panel@Athena

Hello Athena,

I have a JD Humanoid Robot and a separate chassis that I would like to use as a transport platform for the JD. The chassis is equipped with two continuous rotation servos, which are connected to the JD's EZ-B v4 controller on ports D20 and D21. I want to add the Continuous servo Movement Panel skill to control these servos, but I already have the Auto Position skill in use, as I've set up several frames for different actions. Since only one Movement Panel can be active at a time, how can I resolve this issue to effectively control both the chassis and the JD's actions?

User-inserted image


Related Hardware JD Humanoid

ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

PRO
Germany
#9  

@athena, i will go with the option 2. For the control of the chassis, it is ok. i use Continuous servo Movement Panel and i remove the Auto Position movement panel. As you wrote: Scripted Movement: Create scripts for the JD's movements (Forward, Reverse, Left, Right, Stop) and use these scripts to control JD's actions. You can trigger these scripts using joystick buttons or speech commands. i will have to modify the init script since the ControlCommand for AutoPosition for calibrate,stand does not work anymore (autoposition is no more available) Can you give some scripts examples for the control of JD's movements and for the actions ( headstand,stand, sit etc....) And an example as well for control over voice with speech recognition ?

PRO
Canada
#10  

Certainly! Let's set up some scripts for JD's movements and actions, and I'll also provide an example of how to control these with speech recognition.

Scripted Movements for JD

Since JD is no longer using the Auto Position Movement Panel, you'll need to create scripts for each movement and action. Here's how you can do it:

Example Scripts for JD's Movements

  1. Forward Movement Script

    // Move JD forward
    Servo.setPosition(D0, 90); // Example servo port and position
    Servo.setPosition(D1, 90);
    // Add more servos as needed
    
  2. Reverse Movement Script

    // Move JD backward
    Servo.setPosition(D0, 60); // Example servo port and position
    Servo.setPosition(D1, 60);
    // Add more servos as needed
    
  3. Left Turn Script

    // Turn JD left
    Servo.setPosition(D0, 70); // Example servo port and position
    Servo.setPosition(D1, 90);
    // Add more servos as needed
    
  4. Right Turn Script

    // Turn JD right
    Servo.setPosition(D0, 90); // Example servo port and position
    Servo.setPosition(D1, 70);
    // Add more servos as needed
    
  5. Stop Script

    // Stop JD
    Servo.setPosition(D0, 75); // Example servo port and position
    Servo.setPosition(D1, 75);
    // Add more servos as needed
    

Example Scripts for JD's Actions

  1. Stand Action Script

    // JD stands up
    Servo.setPosition(D2, 90); // Example servo port and position
    Servo.setPosition(D3, 90);
    // Add more servos as needed
    
  2. Sit Action Script

    // JD sits down
    Servo.setPosition(D2, 60); // Example servo port and position
    Servo.setPosition(D3, 60);
    // Add more servos as needed
    
  3. Headstand Action Script

    // JD performs a headstand
    Servo.setPosition(D4, 120); // Example servo port and position
    Servo.setPosition(D5, 120);
    // Add more servos as needed
    

Speech Recognition Example

To control JD with voice commands, you can set up speech recognition to trigger these scripts. Here's an example:

  1. Speech Recognition Setup

    • Add the Speech Recognition skill to your ARC project.
    • In the Speech Recognition configuration, add phrases and link them to the scripts.
  2. Example Speech Commands

    • Phrase: "JD move forward"

      • Script: ControlCommand("JD Forward Script")
    • Phrase: "JD stop"

      • Script: ControlCommand("JD Stop Script")
    • Phrase: "JD stand up"

      • Script: ControlCommand("JD Stand Script")
    • Phrase: "JD sit down"

      • Script: ControlCommand("JD Sit Script")

Final Notes

  • Make sure to replace the servo port numbers and positions with the actual values for your JD robot.
  • You can add more actions and movements as needed by creating additional scripts.
  • Test each script individually to ensure JD performs the desired action.

If you have any more questions or need further assistance, feel free to ask!


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.
PRO
Synthiam
#11   — Edited

I don't know what happened to Athena's response there. I think she might have had trouble understanding the question. I also have a bit of difficulty understanding the question, but I think I get the gist. So maybe it'll be easiest to rewind the whole conversation from the beginning and explain it in steps. This will probably be a lot clearer.

ONE COPY OF ARC

This means we'll squish both robot movements into one ARC robot project.

  • JD: will use the Auto Position (non-movement panel) robot skill. Traditional scripting commands for a Movement Panel won't work with JD. You'll have to use the ControlCommand() to execute the animations. This means that things like "Movement.forward()" won't work to control JD because the "non-movement panel" is being used to control JD.

Platform: The platform will use the continuous rotation movement panel. You can use all Movement Panel commands and robot skills, such as joysticks, to control the platform's movement. Scripting commands such as Movement.forward(), etc., will work to move the platform.

  1. Load ARC with a blank project

Platform

  1. Add robot skill -> Movement Panels -> Continous rotation movement panel

  2. Configure the continuous rotation Movement Panel by clicking on the config button and editing the ports that it will use

  3. Try the continuous Movement Panel with the arrow keys and see if it works. If it works, then continue. If it does not work, go back to #3 and fix your configuration

JD

  1. Add robot skill -> servo -> Auto Position

  2. Configure the Auto Position robot skill by pressing the config button

  3. Select the IMPORT/EXPORT UTILITIES TAB

  4. Press the IMPORT FROM FILE button

  5. Select the JD project (or your JD project with custom actions). Either way, select a JD project

  6. Follow the instructions to choose the actions and frames and such that you're going to import

  7. To make JD move forward, you'll now use the Cheat Sheet to see control commands. So, for example, moving forward will be

ControlCommand("Auto Position", "AutoPositionAction", "Forward");
PRO
Synthiam
#12  

Oh and i'll add a bit more...

Say you want both to be controlled by speech recognition. You can do this...

Controls JD

"Robot, walk forward"

ControlCommand("Auto Position", "AutoPositionAction", "Forward");

"Robot, stop"

ControlCommand("Auto Position", "AutoPositionAction", "Stand");

"Robot, turn left"

ControlCommand("Auto Position", "AutoPositionAction", "Left");

Controls the platform

"Robot, drive forward"

Movement.forward();

"Robot, drive stop"

Movement.stop();

etc....

PRO
Germany
#13   — Edited

yes  I have seen that I could use JD actions with the Auto Position non movement. I could import the actions as you wrote and I could move chassis  as well with continuous movement panel. I have to redefine some actions which have a strange behavior. I think I may have forgotten to make a save after having created a  new frame or actions. I have to implement speech recognition as well. Thanks for your help. i get back to you again if I have any problem.

just see your second comment, thanks