Adding Simple Vision service to VPL Explorer sample
-
2 มีนาคม 2555 20:56
Hi,
I'm trying to add the Simple Vision service to the VPL Explorer sample, however without success.
Here's what I've done:
- Add the Simple Vision service to the demoscene Manifest, and refer to the existing simulatedwebcam definition
- Add the Simple Vision service to the VPL diagram, with the service configuration set to use SimpleVision in the demoscene manifest. I'm setting the SimpleVision initial configuration using SetObjectTrackingColor and a basic Data activity.
When running the VPL explorer after these changes, I observe the following behavior:
- The simulated robot does not move anymore
- If I'm adding a Simple Dashboard service to control the robot, the camera view in the Simple Vision form does not update.
I'm obviously doing something wrong. Can anyone help getting me on track?
Thanks,
Yann- แก้ไขโดย Yann KristoficMicrosoft 2 มีนาคม 2555 20:56
ตอบทั้งหมด
-
22 มีนาคม 2555 1:04เจ้าของ
I am investigating this issue now.
-
22 มีนาคม 2555 3:51เจ้าของ
I figured this out.
1) Why the robot is not moving.
When I update the manifest outside of VPL I had to delete the manifest called a "configuration" (from the project view on the right) and then re-associate it with the entities in the diagram. I had to do it for both the differential drive and the SimulatedLaserRangeFinder. If I did not do one of these, I saw errors and it would not move. When I did this, it started to drive again.2) Frames in the simple vision UI are not updating.
I looked at the code for the SimpleVisions service and found this in the "GetFrame" method...// When you using this service in simualtion environment, // if UpdateInterval of webcam(robocam) entity is 0(msec) in your simulation environment manifest, // you have to tell our simulated webcam to update its frame. // In PioneerSim.xml, UpdateInterval of robocam entity is set to 100(msec), so we don't need this UpdateFrame. // //_webCamPort.Post(new webcam.UpdateFrame());
If you uncomment that line, rebuild the service and modify the manifest to use the "(User) Simple Vision" instead of "Simple Vision" then it starts working as expected.
I suppose you could also find the way to change the UpdateInterval of the robocam entity, but I am not sure how to do that.
- แก้ไขโดย Gershon ParentOwner 22 มีนาคม 2555 19:09 New info added
- เสนอเป็นคำตอบโดย Gershon ParentOwner 22 มีนาคม 2555 19:09
- ทำเครื่องหมายเป็นคำตอบโดย Yann KristoficMicrosoft 27 มีนาคม 2555 17:05