loading
 
My First Attemp
Andrew from Malaysia  [5 posts]
17 year
STeven,

Finally, I had time over the weekend to fiddle with RR, however it was not quite successful.

All I wanted to do with this first module is to make the camera tilt so the red ball is always at the centre as far as COG_Y is concerned.

In the VBScript window the value for CAM_MOTOR1 changes accordingly when the red blob moves accros the screen.

Also, in the NXT interface window I can see the slider for motor A moving to the left and right (118 and 138).

But somehow there is no movement on the actual motor itself.

I am using v1.7.9.4 (I think, getting mixed up with all the diff versions i downloaded - how do i check version? The version listed under Option doesnt seem to match). Robo file attached.

My screen size is 240x320. My NXT and camera is connected via a 1-to-4 USB mini-hub. Camera is Creative WebCam NX (VFW).

Another thing I noticed is, each time I close the RR program, a few seconds later Windows will report that "RoboRealm has encountered a problem and needs to close.  We are sorry for the inconvenience." and asked if report need to be send to MSoft. This error message appears with previous versions of RR as well.

Thanks in advance.
Andrew
program.robo
Anonymous 17 year
Andrew,

We checked out your script and it seems that the motor values are not significant enough to move the motors. If you listen carefully you should hear a whine when the motors are trying to move but don't have enough power to do so. If you change your script from +-10 to +-80 the motors should start moving. I.e. a difference of 10 is not significant enough to move the motors.

Note that we used the USB connection to test this out as it is quicker to setup than the Bluetooth and eliminates any communication issues between the NXT and the PC. The problem you have been having may also be due to a lack of communication between the NXT and the PC. Use the lego development environment to scan for the device and verify that the communication is correctly established before testing it with RoboRealm.

We did have some issues in the past with the COG calculation causing the crash on exiting RoboRealm. I think that should have been fixed but let us know if you continue to see it.

If you want to check the RoboRealm versions right click on the RoboRealm.exe , view properties and then select the version tab. The version in the Options Dialog did not get updated for the past couple of versions. This has also been corrected in the most recent version.

Thanks for the post and let us know if you get your NXT moving!

STeven.
+-100 tested earlier
Andrew from Malaysia  [5 posts]
17 year
STeven

Actually, I have already tested with values up to +-100, the problem persisted.

Have you/team ever tested with USB mini-hub?

I noticed that even though there is no control over the motor, I can still read the motor rotational and other sensors and batt values. So at least reading from the NXT seems to be fine.

Regards
Andrew
Woops!
Andrew from Malaysia  [5 posts]
17 year
STeven,

I loaded NXT Firmware 1.04 and it solved my communication problem. Now I can get the cam motor moving in the right direction

But is going bonkers trying to get the blob to the centre of the screen, I believe this is due to the low frame rate 3.x to 4.x and in conjunction with the tilt motor moving too fast.

So, I'm happy for the time being... I will redesign the cam tilt with gearing to slow down the movement and also tinker a bit to see if I can achieve higher FR.

Thanks for your support.

Andrew.
Anonymous 17 year
Andrew,

That's good news. Thanks for the tip that the firmware upgrade fixes that kind of problem.

What kind of setup are you using? Just curious what is causing the slow frame rate. You can also post your robo-file here and we can see if something in that configuration is causing the slow frame rate.

STeven.
FR
Anonymous
17 year
STeven,

The low FR I believe is because I'm using my 6 yo son's Toshiba Protege 3490CT Laptop, Pentium III 700MHz, 64MB.

If you remember BB Vision Platform, I needed something light since the NXT is carrying the notebook's weight. And this Toshiba notebook is much lighter than my Compaq duocore, but it has processing limitation, no bluetooth and only one USB (I needed one for NXT and one for camera), hence i deployed a mini USB hub.

As for the robo file, I already posted in the first entry, see above.

BTW, I have also gotten the pin-hole RF camera you featured in your NXT tutorial, and I have fitted it into my other NXT. This setup will run RR remotely from my duacore and via bluetooth to the NXT. I have yet to test this setup but i think with all you got going in your tutorial and forum, it should not be much of a problem.

Regards
Anonymous 17 year
Andrew,

Given the above robo-file and that laptop you should be able to get a higher frame rate. When you click the run button in the upper right corner of RR (i.e. to switch off processing) do you get a higher frame rate? This would be the rate the video subsystem (DirectX or VFW) is acquiring frames. That should be higher than 10fps.

If you're getting high frame rates without any processing switch processing back on and then selectively remove the modules to see which one is causing the slower frame rate. The Image Display is a good one to remove as it has to scale the source image down to a thumbnail. But before you do that you will have to remove the NXT module as the serial communication to the NXT is normally the slowest module due to serial speeds (but they should allow higher rates than 3-4 fps).

The other thing you may try is to simply cover the video image seen in RoboRealm by another application such that the video cannot be seen. This stops Windows from drawing the image at a high rate which can sometimes be the load issue. If you just cover the top part of the video and keep the fps visible you can check to see if that makes a difference.

STeven.
FR testing
Anonymous
17 year
STeven,

The FR is actually a little higher than I reported earlier.
Here's the results...

1. Rebooted the notebook and ensured nothing else is runnig

2. With RUN disabled, FR = 9.1 - 9.5
3. Covered the video window with Notepad, FR = 9.5


4. With RUN enabled, FR = 5.6
5. Covered the video window with Notepad, FR = 5.8 - 6.6

Closed Notepad

6. Deleted NXT, FR = 5.6
7. Deleted both Displays modules = 6.0
8. Deleted VBScript = 6.0
9. Deleted COG = 6.2 - 6.6
10. Deleted Mean Filter = 9.1 - 9.4
11. Deleted RGB = 9.4 - 9.5
nothing left to delete.

Regards
second step
Andrew from Malaysia  [5 posts]
17 year
STeven

BB Vision Platform (BBVP) can now tilt (motor A) and pan left and right (motor B and C) fairly well but a little slow. I modified BBVP to inlcude gearing for all three motors giving more power and granular movement, but losing speed.

I also reduced the filters to bare minimum to get a better fps.

Please see attached robo file which was used with 1.7.8.2
When I run the same file against 1.7.9.4, RR crashes.
I downloaded 1.7.9.5, again it crashed.

I also tried deleting working.robo; pressing CTRL when starting RR; and regedit to delete RR, it still the same.

Now, where did I go wrong?

Regards

program.robo
Anonymous 17 year
I just realize I sent you the wrong robo file. I will be attaching the correct one shortly...

Andrew
Anonymous 17 year
here's the file...
Anonymous 17 year
take two... :)
program.robo
Anonymous 17 year
Andrew,

Naturally the file works fine for us ... perhaps there is something in the registry that is causing RR to crash.

Can you try:

1. Go to START button, select run, type "regedit" without the quotes
2. Navigate to HKEY_CURRENT_USER\Software\RoboRealm
3. delete the RoboRealm key entry (and all its subtree children).
4. exit regedit

and try restarting RoboRealm. (This assumes that the CTRL and deleting any working.robo does not work).

Thanks for the above analysis. It looks like the mean filter was the largest CPU hog. You can probably do without it in the current scheme as you probably found out.

Are you using DirectX? A max of 9 fps seems a little slow and usually the frame rate when one is using VFW instead of DirectX.

Good luck!
STeven.
Anonymous 17 year
STeven,

Sorry been busy with work.

I'm using one of those entry level Creative webcam. I can see that it is VFW. How do I change this to DirectX?

Regards
Anonymous 17 year
Andrew,

you probably need to ensure that you have DirectX from Microsoft installed. You can check their website. I think the latest version is 9.0. Once this is installed (it is quite big) you should try the camera again. If still not check with Creative that you have the most recent drivers that support DirectX.

STeven.
Henk from Netherlands  [6 posts] 17 year
Hey Andrew and Steven.
I've got an frame rate 'issue' as well. Well I didn't thought it was an issue but more a limitation of the software. My framerate runs fine (even with run of the script and LEGO enabled), but when RR has to make a desision and take actions, the framerate drops tremendesly.

Will try to explain, my screen is divided in three cog_x's. When a red blob moves from (say) the left cog_x to the middle cog_x the framerate drops. In this transition the program has to set diferent motors.

The communication with the (in my case not a NXT) RCX is fine (the bleeps bleep right away if tested) And I'm running a P4HT@3.5Ghz with 1024 of RAM, and it's having no trouble with the processor load at all. Trying to set RR as the most important proces in task manager didn't affect the FR at all. The response of the (Creative WebCam NX Ultra (VFW)) camera is just fine, till it meats such a "cog_x" change value.

does anyone have an idea?

ps1. below is my robo file
ps2. I'm not trying to hijack your topic, but thought it would be handier to have these questions in the same topic (we both nearly have the same camera)


program.robo
Anonymous 17 year
HenXje,

Can you try disabling the motors by unchecking the checkbox next to the motors. When you move the red ball from one cog to the next do you now see the slowdown?

When the slowdown does occur does it ever recover? Or does it stay slow permanently?

The reason for the questions is that RR tries not to communicate with the RCX unless it needs to. This helps to keep the framerate high. If this fails for whatever reason the frame rate will drop to a very slow rate and stay there. The RCX comm is quite slow and thus will slow down the fps when communication is required.

STeven.
Henk from Netherlands  [6 posts] 17 year
Hey steven,
I wouldn't have thought that the (indeed slow for standards) infrared communication was a limiting factior for the webcam. Answering your questions: It does it's job fine when not having to set the motors, the frame rate drop was only temporary and would improve when it had set the motors.

I guess my next step is sending only 1 number for the infra red message, have it pick up by the rcx and making an internal program to respond on it. Guessing that sending "3" (which relates to turning left) is a shorter message than sending "motor0 = 5, motor2 = 0". Can someone confirm that?

Once angain thank you very much!
Henk

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index