FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

The camera affects the response time of our Joysticks

Our operators can see/feel that the robot will “lag” behind their movements of the Joysticks.

We have unplugged the Ethernet cable from the camera to the cRIO and the response was a lot better.

We repeated the plug/unplug test just to confirm our observations.

Someone remembered reading a similar difficulty and the suggestions were to reduce the size of the image and maybe even go to black and white.

We have not touched the camera code yet.  And no one here knows anything about the camera code.  I went to the Begin.vi and saw that it is already using the smallest image size.

Can someone offer some suggestions?

Thanks,

Mike

0 Kudos
Message 1 of 4
(4,987 Views)

There is an "Enable Vision" switch in the default code.  If you turn that off, does it have the same effect as unplugging the camera?

0 Kudos
Message 2 of 4
(2,871 Views)

Hi Robot215,

The smallest image size should be 160x120. If you think the image processing time is the cause of the lag, you can also try changing the compression ratio of the image to a higher value. By default, the value is 5 but you can increase it up to 100 if you like.

compression.jpg

However, keep in mind that if you have a high compression ratio, the Find Target algorithm may not run as well because there isn't as much information in the image to use.

~Olivia

NI FIRST Support

0 Kudos
Message 3 of 4
(2,871 Views)

Also, in general, turning off auto error logging may help your loop timing. Check out this post to turn off auto error logging.

0 Kudos
Message 4 of 4
(2,871 Views)