Asked — Edited

Possible Feature Or Script Help

In EZ builder there is a "pause" option box for the personality generator and speech recognition. I am wondering if a future update could include a "pause" option in the Movement Panel as well. What I am looking to do is when the robot boots up I would like the Movement Panel to be paused (init script). I would like it to remain in pause until voice command given "enable track motors" is given. If the robot is told to move in any direction while this is paused I would like it to report " my track motors are disabled". Thanks for any and all help! Chris


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

#1  

More of a hardware solution and just spit-balling, I haven't thought it all the way through, but could you put TIP120 or other transistors on the signal line(s) to your motor controller to disable it getting any movement commands until you turn the digital port(s) on to open that connection? You are using a Roboclaw right? So it is just one signal line, so just one additional digital port to control the transistor.

Alternately, if you aren't already, you could use the custom Movement Panel which executes a script for each movement command. The first thing the script would do is check for a variable to see if movement is allowed and take the appropriate action accordingly.

Alan

#2  

Hey Alan,

Yes Roboclaw, and yes what you wrote is a possible work around. I was hoping to do it without "custom circuitry" although I do like the idea. I may need to design a pcb like Dave to add a couple tip circuits to my machine. Thanks for the idea.

                    Chris
#3  

BTW I am using a custom movement panel. Thanks Chris

#4  

With custom Movement Panel it is suoer easy, since your movement is scripted anyway.

Just check for a movement allowed variable to be set to true before each movement.

Let me know if you need an example and I'll write it up.

Alan

#5  

For speech recognition I currently use a variable system to prevent accidental movement. it could be scripted easily into the custom movement panel. Simply have an if statement check that the variable is reading yes for the movement, and then go to the move sequence already scripted. All you have to do is add to your existing.

#6  

Alan if you give an example that would be perfect. Thank you very much

#7  

In your Init script add this line:


$movement = "false"

Then, in each direction of your movement panel, add the if statement form the code below, and put your actual movement command between the else and the endif. The print commands can be deleted, they were just there for testing.


if($movement = "false")
print("movement prohibited")
SayEzb("my track motors are disabled")
Else 
print("moving")
#put your movement command here between the Else and the EndIf
endif

Finally, add a speech command to change the variable. Example below changes it to true, but actually any value other than false will work.


$movement = "true"

I would not put the IF statement in the stop command of your movement panel, just in the 4 direction functions.

You could also have a voice command or other script other than init to set the value back to false and disable movement.

Alan

#8  

Alan not to be a PITA but what does the print command do? I've read the script help using the blue question mark but im not sure what I would use it for? Thanks Chris

#9  

It is supposed to show what is in the print command in the debug window, but it doesn't. If you run the script in a script object it does show there, so I used them to make sure I had the syntax correct. You can just delete those lines.

Alan

#10  

Thanks very much! It worked out nicely. I really need to find some time to play more with this software. Thanks again

                               Chris