loading
 
Using webcams and simulated webcams in MSRS together with RoboRealm
Anonymous
16 year
Hi,

I'm using MSRS together with RoboRealm. I have two webcams and two or more simulated webcams I want to process images from. The results (variables) from each camera image needs to be feed back to MSRS.

1. Is it possible to process all these camera feeds with one instance of RR or can I start multiple instances and how can that be done? If only one instance is used, how do I know which result corresponds to which camera image?

2. If I want to use the webcam and simulatedwebcam services in MSRS together with RR, what possiblities are there? Do I have to query or capture a frame and then use _realmPort.SetFrame(newFrame) to feed the images to RR or can I set the camera in RR to either the MSRS webcam or simulated webcam?

3. I aslo have a question about the RoboRealmSimulation example (where the NXT robot follows a yellow cone). After starting the service, frames from the simulated webcam are sent to RR but they don't get processed. First when I highlight the RR window the images get processed. Why doesn't RR start processing the images until I highlight the RR window?

Anders
About question 3
Anonymous
16 year
Some more details about question 3 above.

If I start the RoboRealmSimulation in MSRS without having started RR, the images from the simulated webcam get processed in RR directely. But, if I've already started RR the images from the simulated webcam doesn't get processed until I highlight the RR window. Why is that?

Anders
If you have any idea about my questions please let me know.
Anonymous
16 year
If you have any idea about my questions please let me know.

Anders
Anonymous 16 year
Anders,

Sorry for the lack of response ... we're still looking into your issues. We'll try to get the answers posted by next week.

Thanks,
STeven.
Anonymous 16 year
Anders,

We've fixed a couple issues that you noticed with the MSRS interface into RoboRealm. Please download RR 1.8.2.2 to get those fixes.

1. I think you figured out how to run more than on RR instance ... you check the checkbox in the options dialog->Other to allow for this. Note that you could also transmit more than one image to RR as markers (i.e. call the image something) that would then allow you to access all the images using one instance.

2. In order to use the webcam and siumlated webcam you would have to use the _realmPort.SetFrame(newFrame) to feed the images into RR. Unless of course the webcam is an actual webcam that RR can access directly. You may also try using the RR virtual webcam which would allow RR to get a copy of the image and then pass on the image to the MSRS webcam (the MSRS webcam would attach to the virtual RR webcam). The virtual webcam functionality was recently released.

3. We fixed the problem with the lack of processing frames on startup. The reason is that the default behaviour of the RR MSRS interface is to grab images. The very first thing it does is issue a wait_image command to RR which had an infinite timeout. Thus RR was sitting and waiting for an image which if no webcam is currently running would never come. We changed that timeout from inifinite to 5 seconds. If you want you can also modify the RR MSRS interface to not send out that initial wait image by stopping the image capturing by commenting out

            _frameGrabber.StartCapture();

inside the Interface.cs file. This should even prevent the initial 5 second delay prior to processing start.

Note that we also sped up the acquisition of images from the MSRS interface by ignoring past frames if RR becomes too slow to process all images. This keeps the next image as close as possible to realtime which improves the overall performance. Thus when the simulator sees the cone RR should also.

Note that you only need to download RR again and NOT the MSRS interface as no changes were made to that code.

Let us know how it goes.

STeven.

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