
elfege
Hi,
Something is terribly annoying : ez builder resets its default camera so if you are using a different camera than the ezb camera, any script that is supposed to boot your cam and then start it in the camera settings will not activate the one you want.
Is there a way to select a camera in the list as default and lock it so it stops bugging me like trying to force me to buy the low res ezb camera ?
thank you.
PS : ezb v4 is full of bugs. I can't count how many I meet. It is VERY unstable. Please, provide us with a firmware at some point. It is really very annoying. few examples :
-ezb disconnects
-ezb has flawed digital ports : servos and motors won't respond ezb needs to be disconnected then connected again
-ezb v4 used in conjunction with ezb V3 will screw all servos mixing up the old 100 position values and the new 180 positions.
ezbuilder has a very slow response rate - often due to a wifi board that is too slow, apparently, or a flawed buffer in the software, Idk.
-digital ports will all lock to ON position and turn the robot totally nut and crazy
-ezbuilder will crash, very often, as soon as more than 3 scripts run at once.
-i2C port is far too unstable.
and so on... can't remember all the bugs I've encountered but it is really a lot.
So one main camera for all operations, a pan tilt foscam night vision, very convenient, through direct show so it shows in the list of cams in EZB.
Another cam for the arm, this one doesn't need night vision, been using EZB for a while but recently switched with a cam coming from a wowwee toy for I need ezb cam for another purpose at work.
Now, it would really be awesome if swithcing cams in the list could be scripted.
Thanks
Version 1
Code:
Version 2
Code:
So what's happening in Version 1 is that the GetADC value is applied to the variable only one time, before the RepeatWhile begins. Version 2 gets the ADC value each time the loop occurs.
What happens when you assign a variable is it holds a value. For example, when you put..
Code:
The $variable will hold the value that the ADC Port #0 had for ever, until it's told otherwise. If you assign a variable a value, it will never change unless you tell it to. A variable is like a pocket in your pants. If you put a used tissue in your pocket, no matter how long you wait, it will always be there. If you wish for the tissue to not be there, you have to remove it. If you wish for something else to be in the pocket instead of the tissue, you remove the tissue and replace it with something else.
Here is how variables work...
Code:
The same applies when you assign the value to a result of a function..
Code:
There is a feature when editing scripts called Cheat Sheet. This is a tab which displays all available commands of any control added to ARC.
The option you are looking for is listed in the Cheat Sheet under the camera control. Here is exactly how to use it..
[feature]
ControlCommand("Camera", CameraStart, [Camera URL:PORT])
[/feature]
and an example code would be
Code:
ARC is MASSIVE and it's funny - because some people say "document more", but we do, it's just that the documentation is also massive! Haha, such as the cheat sheet. The Cheat Sheet is the world's best documentation for "what you can do". The problem is that there's a lot you can do!
I always forget what commands are even possible. When you asked about the camera, i had to look to see if it was even there!
I'm coming back to this forum because I'm still struggling with cameras. I can't get the script supposed to start the camera to actually start it because each time I used a camera, well I need to refresh the list for the camera to work again. Otherwise the start button is stuck to "stop" (as if camera was running, but it's not) and I get error messages each time I try to actually stop it.
So, in clear : most of the time I can't stop a camera to restart it while there's no more picture. It's frozen on run mode. The only way is to restart ARC.
here is the error message :
Error Initializing Camera: System.Runtime.InteropServices.COMException (0x800401E4): Invalid syntax (Exception from HRESULT: 0x800401E4 (MK_E_SYNTAX))
at System.Runtime.InteropServices.UCOMIMoniker.ParseDisplayName(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, String pszDisplayName, Int32& pchEaten, UCOMIMoniker& ppmkOut)
at Rp33miUMIGbqXYpali.lvF6UlmL50Nw9ZUXPA.scapxQaT9t(String )
at Rp33miUMIGbqXYpali.lvF6UlmL50Nw9ZUXPA..ctor(String )
at EZ_B.Camera.StartCamera(ValuePair videoCaptureDevice, Control processedPreviewControl, Control realtimePreviewControl, Int32 captureWidth, Int32 captureHeight). Resolution: 320x240
Error Initializing Camera: System.Runtime.InteropServices.COMException (0x800401E4): Invalid syntax (Exception from HRESULT: 0x800401E4 (MK_E_SYNTAX))
at System.Runtime.InteropServices.UCOMIMoniker.ParseDisplayName(UCOMIBindCtx pbc, UCOMIMoniker pmkToLeft, String pszDisplayName, Int32& pchEaten, UCOMIMoniker& ppmkOut)
at Rp33miUMIGbqXYpali.lvF6UlmL50Nw9ZUXPA.scapxQaT9t(String )
at Rp33miUMIGbqXYpali.lvF6UlmL50Nw9ZUXPA..ctor(String )
at EZ_B.Camera.StartCamera(ValuePair videoCaptureDevice, Control processedPreviewControl, Control realtimePreviewControl, Int32 captureWidth, Int32 captureHeight). Resolution: 640x480
Let me know if there's anything you can suggest me from there.
Thanks.
What settings do you change to get the camera to start working? Hardware errors are nearly impossible to debug when we didn't make the hardware.
Alan
I'll see what I can do on the hardware side when I'm back home.
Thanks.
The driver is not returning successfully and the name of the camera cannot be parsed yet. What is happening is one of two things...
1) Another program is attempting to use the camera device
2) The camera device driver is not fully loaded yet. Meaning, the USB cable was plugged in, but the driver hasn't completed loading. Most likely not providing enough time between connecting the cable and loading the camera control
3) The usb port or cable is damaged and the camera is not making a reliable connection
4) The camera driver is not 100% compatible with your OS version
5) The camera hardware is buggy
6) The camera device driver is buggy
Which ever the reason - there is little that ez-robot can do if the Windows Operating System is not providing the driver information.
In your post, you mention
Do you mean ARC or the EZ-B? Because the EZ-B has no relationship with the 3rd party camera being used. Please clarify
If you are always using the URL of the IP cam, the error of parsing the device name would never occur.
From what i read in the responses, sometimes you use IP URL and sometimes you specify a driver. Is this correct?
I require clarification to understand where the error resides. If you are stating that you always 100% using the IP URL and absolutely never ever use a physical device, let me know. That will be useful.
Anyway, regarding the camera yes both ip or alax.info driver. having also all sorts of trouble with ezboard constantly disconnecting but there are many possible causes that I can find in my network infrastructure and all these scripts not perfectly synchronized.
I'll work on all this and I'll come back if it doesn't change.
Another super super hugely needed feature : being able to see a script running without losing the hand on all other features. When I need to see how two or three scripts interact... Well it's almost impossible to do so without just guessing sometimes.
A separate window specific to script errors only another one for prints only, would also be useful.
Also, why I can't get the color coded display of the scripts? I have it on my laptop but on my desktop computer, even after reinstalling it doesn't activate.
Also can I export the variables ' list?
That's all!
Having the Bluetooth as a backup mean of connection, mainly for power management, is really great.
Maybe coming up with a mini Bluetooth ezb dedicated to remote rovers power redundancies and reboot possibilities?
The top of the ton would be a ezb with two separate chips and power connectivity automatically switching in case of failure. Two everything : 2 wifi, two processors but the same d and adc and etc ports... Just meditating lost in the middle of the Catskills --- it looks like Canada here.
Now, however, I can't get to access my camera, as I lately used to do, using the script command :
Code:
Here is how it looks :
Code:
and the variable $Rover prints out this address :
http://192.168.10.179:80/video.cgi?rate=0&user=XXXX&pwd=XXXXXXX
if I don't use the variable but type the url directly, same issue.
It's frustrating because I had finally got to access my camera without using Alax.info filter and now, for some reason, it doesn't work any longer.
I get the JPGStream Read Error.
Same camera, nothing changed. Maybe I'm forgetting something regarding the url, but no idea... probably this little thing that I'm not thinking about... of course. But I'm sure of one thing, I had been using the url access to the camera for weeks before I had this bug.
@Dj, I know this is only a temporary fix, but have you implemented yet a "refresh" command in an upcoming new version of ARC ? This is the only thing that allows me to script a reboot of the camera. This is another issue than the one I was just talking about. I still need to press refresh before I can see the camera feed again, using Alax.info filter.
Thanks a lot everybody.
Ok, now I see a little bit more clearly in this.
I just did a test : If I run the camera (using alax.info driver) using the command :
Code:
I get the same error message as before, the one that you said was hardware related.
But if I manually select the camera in the list and run press the start button or run the following command :
Code:
that is to say, without specifying the driver or any item whatsoever, then it works.
Any idea on what can make that happen ? Can it still be just hardware related ?
Thanks.