Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Asked — Edited

Strange Issue With Servo Speed/Delay/Steps And Usb Camera

Hi everyone, I have been following you for some time and first of all I wanted to thank this forum and the fantastic Ez Robot because you have allowed me to learn many things.
I started building a hexapod around an ez board v4 and I played a bit with AutoPosition but I have a strange problem with the speed of the servos.
When I turn on the ez board v4 for the first time I have to turn on the PC camera even for a second and then turn it off otherwise the movements are slow, I don't understand why I didn't set anything in the camera device.
I tried to turn on the ez camera instead of the camera pc but the movements remain slow.
Same problem with the mobile app.
I thought of resetting all the movements without ever turning on the pc camera, but maybe I'm missing something?
I inserted a video that maybe will explain better than my English "google".


Related Hardware EZ-Robot EZ-B v4
Related Controls Speed Auto Positioner (Gait)
AI Support Bot
Related Content
Synthiam
Synthiam
#1  
Can you slide the Auto Position speed control down and up again rather than starting the camera control? Will that fix it? I'm wondering if the speed isn't being initialized.

You can force a speed initialization in the connection control with these steps...

1) Press the GEAR icon on the connection control to open the settings window

2) press the pencil icon to edit the script for "0 - Connection Established Cmd"

3) Paste in this initialization code...

Code:


SetSpeed(255)


4) Save and reconnect to the robot. Reconnecting will ensure the SetSpeed() is set.
#2  
Hi Dj Sures, thanks for the reply.
Sorry I forgot to mention that I had already set up an init script.
User-inserted image
And I also tried to move the speed slide before starting the USB camera but it doesn't solve the problem.
I Had also tried to add in the init script servospeed (Dxx, 0) for each servo but it does not work.
I also tried a new project and I imported the AutoPosition frame and action and init script but it doesn't work.
Today I made the last attempt I installed ARC on another PC but it does not work until I turn on the USB camera... Maybe at the hexapod likes to see my face from PC before walk fast..:D
Synthiam
#3  
That's really interesting - I'll have to take a look and see if it can be replicated on my end. Would you mind sharing your project with me? Use the FILE attach button on this editor to attach the EZB file.
#6  
Wow DJ Sures You're really fantastic and professional!
I tried the new Beta release, I created a new project and I imported only AutoPosition Frame/action and Init script but we were unlucky.
It does not work yet until I add camera device and start for a second the USB camera.
I do this.. I never ever ever ever start USB camera in my project and i fix delay/step/speed of each movement. Easy!;)
But I want to thank you and I would like to take the opportunity to ask you another question.
I created a variable to change the speed of each frame/action because I saw that Fast Movement Modifier is present only on  "Forward(), Left(), Right(), Reverse(), Stop() " and SetSpeed() don't work on the others Actions.
This is the variable i start in a init script: 

Code:

#Variable "Delay" proportional to "SetSpeed"
:loop
$Delay = Map(GetSpeed(),0,255,40,10)
$Delay = Round($Delay)
print($Delay)
WaitForChange(GetSpeed())
Sleep(500)
Goto(loop)
after i create a action :

Code:

# Strafe Right Ripple
:loop
ControlCommand("Auto Position", AutoPositionFrame, "Strafe Right 1", $Delay, 4, 0)
WaitFor( $autopositionStatus=0 )
ControlCommand("Auto Position", AutoPositionFrame, "Strafe Right 2", $Delay, 4, 0)
WaitFor( $autopositionStatus=0 )
ControlCommand("Auto Position", AutoPositionFrame, "Strafe Right 3", $Delay, 4, 0)
WaitFor( $autopositionStatus=0 )
ControlCommand("Auto Position", AutoPositionFrame, "Strafe Right 4", $Delay, 4, 0)
WaitFor( $autopositionStatus=0 )
goto(loop)
Now how do I stop the script " strafe right" when I change action?
Because just it finishes the new action, "Strafe Right" starts from where it had remained.
I tried to use the If/ElseIf/else and Waitforchange() / waitfor() functions but I couldn't fix it.. The script stays paused but then starts again on its own.
Sorry for the beginner question.
Synthiam
#7  
I’ll continue looking into the speed issue. Adding the usb camera may work but it’s not a viable solution.:) 

as for your second question... I think it makes sense for the speed modifier to apply to all actions. I’ll have the software updated for that. Stay tuned!
#10   — Edited
Dj Sures, i don't know what to say..
Less than 24 hours to release the new build!!
You awesome!*cool*
#11  
Excuse me again.
I need clarification with fast movement modifiers. For example if I create an action with these values:

User-inserted image


When the setSpeed value is 255 I should have 10delay 5steps 1speed, but unfortunately the + 3steps of the fast movement modifiers are not added, and the result is 10delay 2step. Does anyone have the same problem as me?
Synthiam
#12  
I'll take a look this weekend and see if there's anything outstanding. Far as i know the calculated values are correct because there hasn't been a report otherwise.
#13  
in fact I imagined I only had this problem because I use lewansoul servos "for now" but finally "robotshop europe" has recently put ezrobot servo hd on sale .. so as soon as I can buy 18 i make the leap in quality!*cool*
Synthiam
#14  
That'll be a big difference for sure. The LewanSoul servos aren't that great - they had potential when you read the documentation and promotion, but the final product in practical application ends up disappointing. Mostly the challenge with software and hardware is real-world vs software. What we write in code has to interact with a real world, and there's a ton of physics involved dealing from power, heat, weight, gearing, etc... and that's just for motors, not including sensor data. 

So moving things in the real world can sometimes be tricky, but we're working on that:D