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

Your robot can be more than a simple automated machine with the power of ARC Pro!

PRO
Canada
#1  

Hello! It's great to hear about your project with the JD Humanoid and the chassis. You're right that ARC allows only one Movement Panel to be active at a time. However, you can still achieve your goal by using a combination of scripting and the existing skills. Here's how you can manage both the chassis and JD's actions:

Step-by-Step Solution

  1. Use the Auto Position Skill for JD's Actions:

    • Continue using the Auto Position skill for JD's actions. This skill is perfect for managing complex movements and animations for the JD Humanoid.
  2. Control the Chassis with Scripts:

    • Since you can't have two movement panels, you can control the continuous rotation servos on the chassis using scripts. You can manually set the PWM values for the servos connected to ports D20 and D21.
  3. Create a Script for Chassis Movement:

    • You can create a script to control the chassis movement. Here's an example of how you might control the continuous rotation servos:
    // Forward movement
    Servo.setPosition(D20, 180); // Set the left servo to move forward
    Servo.setPosition(D21, 0);   // Set the right servo to move forward
    
    // Stop movement
    Servo.setPosition(D20, 90);  // Stop the left servo
    Servo.setPosition(D21, 90);  // Stop the right servo
    
    // Reverse movement
    Servo.setPosition(D20, 0);   // Set the left servo to move backward
    Servo.setPosition(D21, 180); // Set the right servo to move backward
    
  4. Integrate Scripts with Auto Position:

    • You can integrate these scripts with the Auto Position actions by using the ControlCommand() function. For example, you can trigger the chassis movement script before or after a JD action.
  5. Switch Between Actions:

    • Use the ControlCommand() to switch between JD's actions and chassis movement. For example:
    // Execute a JD action
    ControlCommand("Auto Position", "AutoPositionAction", "Wave");
    
    // Move the chassis forward
    ControlCommand("Script Manager", "Start", "ChassisForwardScript");
    

Additional Tips

  • Testing: Test each script separately to ensure the servos respond correctly before integrating them into a larger sequence.
  • Fine-Tuning: Adjust the servo positions and speeds as needed to achieve smooth movement.
  • Safety: Ensure that the JD is securely mounted on the chassis to prevent any falls or damage during movement.

By using scripts to control the chassis, you can effectively manage both the JD's actions and the chassis movement without needing two movement panels. 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.
#2   — Edited

A robot or any animal, etc have more than one method of movement. In this case, you’re having two methods of movement, which is essentially two separate robots. Because you have both the robot and platform connected to the same ezb controller.

There is no easy way to make this work because of you ask the robot to move forward, what exactly are you asking to move forward? The platform or the robot.

so your decision has to be to decide if you’re using the jd robot to walk and move. If not, then import the Auto Position actions into the Auto Position that isn’t a movement panel.

athena would have difficulty understanding the question because it doesn’t really fit within the way robots are programmed and designed. As you essentially have two separate robots in the question. But we’ll figure out how to make it work:)

PRO
Germany
#3  

If i use a second controller for the chassis, will we have the same problem with the limitation of one Movement Panel ?

#4  

No, because you use two copies of arc. Robots have one program. Programs aren’t shared across robots. If you need to have the robots communicate to each other, there’s plenty of methods to do it. Mqtt is the easiest. That way, both ARC instances can communicate to each other for various tasks.

but, Athena’s suggestion would work. You just won’t be able to control both robot movements with global movement commands.

Consider this if you say robot move forward, what of your two robots are you referring to?

I would suggest adding speech commands with scripts to move the cart. So robot move forward will move jd with movement commands. And cart move forward would move the car with script commands.

PRO
Germany
#5  

yes ok. Seems to be the only way to handle this configuration. Let's see what i can do. Thanks

PRO
Synthiam
#6  

Yeah i think they're suggestions are spot on

  1. use two copies of ARC and have them communicate via mqtt. communication is most gonna be pausing and unpausing speech recognition for each ARC instance based on what robot you're talking to

  2. use one copy of ARC and choose what robot will be the movement panel. the other robot will have to use a script for it's movement control, which is totally fine. create scripts for Forward, Reverse, Left, Right, Stop. And you can add joystick buttons and speech commands to trigger the scripts.

For option #2 you just have to choose what robot will be the movement panel. Since jd robot will be cruising around on his skateboard robot, i'd choose the skateboard robot as being the continuous rotation servo movement panel. then, i'd remove the Auto Position Movement Panel from the project and add a non-movement panel auto position. you can use the import feature of the non-movement panel Auto Position to import the actions from the jd project.

@athena could probably explain better

PRO
Canada
#7  

Absolutely! Let's break down the two options for handling your configuration:

Option 1: Use Two Copies of ARC

  • Setup: Run two instances of ARC, one for each robot (JD Humanoid and the chassis).
  • Communication: Use MQTT to allow the two ARC instances to communicate. This can be useful for coordinating actions or pausing/unpausing speech recognition based on which robot you're addressing.
  • Control: Each robot will have its own movement panel, so you can use global movement commands for each independently.

Option 2: Use One Copy of ARC with Scripted Control

  • Setup: Decide which robot will use the movement panel. Since JD will be on the chassis, it might make sense to use the Continuous servo Movement Panel for the chassis.
  • Auto Position: Remove the Auto Position Movement Panel from the project and add a non-movement panel Auto Position skill. You can import the actions from the JD project into this non-movement panel version.
  • 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.
  • Control: The chassis will use the Movement Panel for its movements, while JD's movements will be controlled via scripts.

Implementation Tips:

  • Speech Commands: You can set up specific speech commands to control each robot. For example, "JD move forward" could trigger JD's movement script, while "Chassis move forward" could use the movement panel.
  • Joystick Control: Assign joystick buttons to trigger the movement scripts for JD, allowing for manual control.

By choosing one of these options, you can effectively manage both the JD Humanoid and the chassis, ensuring they work together seamlessly. 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
Germany
#8  

ok i have to read carefully all these infos. I just discover that there is an Auto Position skill under servo skills! i hope i can make it , it would be great.

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