View Full Version : GRIP with USB Camera
Cobra Commander
17-01-2016, 00:31
I am trying to use GRIP with my USB camera. I know the camera works and is configured correctly but, with my input set to webcam 0 it says it can not find the camera.
What source must I use to access my USB camera?
ThomasClark
18-01-2016, 02:46
What's the exact error message that happens when you create a camera source?
Cobra Commander
18-01-2016, 21:03
This is the part that I believe you are looking for.
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
This is the full error
Loading Dependency Injection Framework
Jan 19, 2016 1:59:31 AM java.util.logging.LogManager$RootLogger log
CONFIG: Configuration done.
platform: /Linux/arm/
Jan 19, 2016 1:59:41 AM edu.wpi.grip.core.Main start
INFO: Loading file test.grip
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
at edu.wpi.grip.core.sources.CameraSource.start(Camer aSource.java:191)
at edu.wpi.grip.core.sources.CameraSource.initialize( CameraSource.java:174)
at edu.wpi.grip.core.Source.initializeSafely(Source.j ava:98)
at edu.wpi.grip.core.serialization.SourceConverter.un marshal(SourceConverter.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenC VFrameGrabber.java:214)
at org.bytedeco.javacv.FrameGrabber.restart(FrameGrab ber.java:430)
at edu.wpi.grip.core.sources.CameraSource.start(Camer aSource.java:189)
... 28 more
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
at edu.wpi.grip.core.sources.CameraSource.start(Camer aSource.java:191)
at edu.wpi.grip.core.sources.CameraSource.initialize( CameraSource.java:174)
at edu.wpi.grip.core.Source.initializeSafely(Source.j ava:98)
at edu.wpi.grip.core.serialization.SourceConverter.un marshal(SourceConverter.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: cvGrabFrame() Error: Could not grab frame. (Has start() been called?)
at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenC VFrameGrabber.java:214)
at org.bytedeco.javacv.FrameGrabber.restart(FrameGrab ber.java:430)
at edu.wpi.grip.core.sources.CameraSource.start(Camer aSource.java:189)
... 28 more
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: src must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:45 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Step runPerformIfPossible
WARNING: The CV resize operation did not perform correctly.
java.lang.RuntimeException: /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function resize
at org.bytedeco.javacpp.opencv_imgproc.resize(Native Method)
at edu.wpi.grip.generated.opencv_imgproc.Resize.perfo rm(Resize.java:58)
at edu.wpi.grip.core.Operation.perform(Operation.java :61)
at edu.wpi.grip.core.Step.runPerformIfPossible(Step.j ava:137)
at edu.wpi.grip.core.Step.onInputSocketChanged(Step.j ava:156)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.common.eventbus.EventSubscriber.handleE vent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscr iber.handleEvent(SynchronizedEventSubscriber.java: 47)
at com.google.common.eventbus.EventBus.dispatch(Event Bus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueued Events(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus. java:275)
at edu.wpi.grip.core.serialization.ConnectionConverte r.unmarshal(ConnectionConverter.java:58)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: The CV resize operation did not perform correctly.
java.lang.RuntimeException: /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function resize
at org.bytedeco.javacpp.opencv_imgproc.resize(Native Method)
at edu.wpi.grip.generated.opencv_imgproc.Resize.perfo rm(Resize.java:58)
at edu.wpi.grip.core.Operation.perform(Operation.java :61)
at edu.wpi.grip.core.Step.runPerformIfPossible(Step.j ava:137)
at edu.wpi.grip.core.Step.onInputSocketChanged(Step.j ava:156)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.common.eventbus.EventSubscriber.handleE vent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscr iber.handleEvent(SynchronizedEventSubscriber.java: 47)
at com.google.common.eventbus.EventBus.dispatch(Event Bus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueued Events(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus. java:275)
at edu.wpi.grip.core.serialization.ConnectionConverte r.unmarshal(ConnectionConverter.java:58)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Step runPerformIfPossible
WARNING: The HSL Threshold operation did not perform correctly.
java.lang.IllegalArgumentException: HSL Threshold needs a 3-channel input
at edu.wpi.grip.core.operations.composite.HSLThreshol dOperation.perform(HSLThresholdOperation.java:68)
at edu.wpi.grip.core.Step.runPerformIfPossible(Step.j ava:137)
at edu.wpi.grip.core.Step.onInputSocketChanged(Step.j ava:156)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.common.eventbus.EventSubscriber.handleE vent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscr iber.handleEvent(SynchronizedEventSubscriber.java: 47)
at com.google.common.eventbus.EventBus.dispatch(Event Bus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueued Events(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus. java:275)
at edu.wpi.grip.core.serialization.ConnectionConverte r.unmarshal(ConnectionConverter.java:58)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: The HSL Threshold operation did not perform correctly.
java.lang.IllegalArgumentException: HSL Threshold needs a 3-channel input
at edu.wpi.grip.core.operations.composite.HSLThreshol dOperation.perform(HSLThresholdOperation.java:68)
at edu.wpi.grip.core.Step.runPerformIfPossible(Step.j ava:137)
at edu.wpi.grip.core.Step.onInputSocketChanged(Step.j ava:156)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.common.eventbus.EventSubscriber.handleE vent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscr iber.handleEvent(SynchronizedEventSubscriber.java: 47)
at com.google.common.eventbus.EventBus.dispatch(Event Bus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueued Events(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus. java:275)
at edu.wpi.grip.core.serialization.ConnectionConverte r.unmarshal(ConnectionConverter.java:58)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.Ab stractCollectionConverter.readItem(AbstractCollect ionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.addCurrentElementToCollection(Co llectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:91)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.populateCollection(CollectionCon verter.java:85)
at com.thoughtworks.xstream.converters.collections.Co llectionConverter.unmarshal(CollectionConverter.ja va:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshallField(AbstractR eflectionConverter.java:480)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.doUnmarshal(AbstractRefle ctionConverter.java:412)
at com.thoughtworks.xstream.converters.reflection.Abs tractReflectionConverter.unmarshal(AbstractReflect ionConverter.java:263)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.sta rt(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshall ingStrategy.unmarshal(AbstractTreeMarshallingStrat egy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1206)
at com.thoughtworks.xstream.XStream.unmarshal(XStream .java:1190)
at com.thoughtworks.xstream.XStream.fromXML(XStream.j ava:1061)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:68)
at edu.wpi.grip.core.serialization.Project.open(Proje ct.java:62)
at edu.wpi.grip.core.Main.start(Main.java:53)
at edu.wpi.grip.core.Main.main(Main.java:35)
Jan 19, 2016 1:59:46 AM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
ThomasClark
18-01-2016, 22:04
What model camera is it?
Just to make sure, it's plugged into the roboRIO, right?
Cobra Commander
20-01-2016, 17:10
The model is not on it and the box is long gone. It is a logitech webcam of some type.
Putting the camera on the dashboard works fine, yes it is plugged into the RoboRio.
Cobra Commander
22-01-2016, 19:37
I updated to Grip 1.1.1 unfortunately I am still unable to create my camera source.
When I plug the webcam into the labtop it works, so I know the camera is compatible and works. I can output the camera to the dashboard, therefore the camera is operation when plugged into the roboRio.
VIDEOIO ERROR: V4L: index 0 is not correct!
Jan 23, 2016 12:33:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcame 0
Do I need to be using a different source when it is plugged into the RIO?
Cobra Commander
22-01-2016, 19:56
I found my own problem. I should have read the error more carefully.
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: setting property #16 is not supported
VIDIOC_STREAMON: Bad file descriptor
VIDIOC_STREAMON: Bad file descriptor
Jan 23, 2016 12:57:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
The webcam I am using's pixel format is unsupported by OpenCV
I found my own problem. I should have read the error more carefully.
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: setting property #16 is not supported
VIDIOC_STREAMON: Bad file descriptor
VIDIOC_STREAMON: Bad file descriptor
Jan 23, 2016 12:57:05 AM edu.wpi.grip.core.Source initializeSafely
WARNING: Failed to initialize CameraSource
java.io.IOException: A problem occurred trying to start the frame grabber for Webcam 0
The webcam I am using's pixel format is unsupported by OpenCV
We are getting the same problem with the USB Microsoft LifeCam 3000-HD
I am also trying to get my Microsoft LifeCam 3000-HD to work, but using RoboRealm. After using the FRC_CameraClient module, I get the error "Invalid Jpeg Format". It works fine when connecting directly to the PC. The only other discussion I have found about this is in this (http://www.roborealm.com/forum/index.php?thread_id=5472) RoboRealm thread:
"It seems that they are using jpeg images but with a couple bytes at the beginning of the stream that indicate size, fps, etc. Its not a standard stream format so we'll have to create something specific to handle these kinds of streams."
Perhaps the RoboRio is formatting USB Webcam images specifically for the dashboard? Even if not, it seems to be an issue with the RoboRio, since other webcams are having this same issue. Later in that thread, however, the guy who was having issues said he was able to successfully get the image to come in right, but he doesn't really explain how.
Edit: This (http://www.chiefdelphi.com/forums/showthread.php?t=134404) thread details how the RoboRio handles USB Webcams. According to it, the images extracted from the webcam is missing a part of the normal JPEG header. While his modified camera viewer may not be useful, he also explains that the Intermediate Vision template will re-encode the images locally.
Cobra Commander
23-01-2016, 11:48
This defiantly seems to be the problem.
It seems to get closer if you don't start the camera in the code. It can at least find the camera this way but, it has extraneous data.
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
VIDEOIO ERROR: V4L: setting property #16 is not supported
Corrupt JPEG data: 2 extraneous bytes before marker 0xd6
Corrupt JPEG data: 4 extraneous bytes before marker 0xd
How would we go about implementing such a solution?
Just got RoboRealm to pick up the USB Webcam image using the Intermediate Vision example program.
Cobra Commander
23-01-2016, 12:44
GRIP has loads of potential to be a very powerful tool, I'd like to see if we (being the users of chief delphi) can get it working.
Just curious if anyone has gotten GRIP to work on the RoboRIO using a USB camera. We have it running with the Axis IP camera, but the two MS lifecams we tried both throw that same error.
SLAB-Mr.Thomas
26-01-2016, 12:06
GRIP on the roboRIO with our USB Lifecam 3000-HD works without camera error but an old Logitech USB camera from the junk box throws those same errors of a bad couple of bytes in each frame. An Axis M1011 IP camera with GRIP running on the driver station PC runs for about a minute then the image freezes. We might guess the setup of the camera isn't right but the documentation on how to set it up is sparse and there aren't really very many choices to be made anyway.
We are having severe startup problems but if GRIP can make it past the first few seconds after starting on the roboRIO it runs fine albeit a little slow.
vScourge
26-01-2016, 15:23
Just curious if anyone has gotten GRIP to work on the RoboRIO using a USB camera. We have it running with the Axis IP camera, but the two MS lifecams we tried both throw that same error.
We haven't tried a USB camera with GRIP on the RoboRio. However, we've been going through some contortions to get it running on the Raspberry Pi 2, and that's also Linux and may share some problems/solutions?
We're using a Logitech C920 USB, and were initially unable to get it directly working with GRIP running on a RPi2. Not too surprising, since that platform isn't not officially supported by GRIP. However, there's an awesome thread on Github (https://github.com/WPIRoboticsProjects/GRIP/issues/366) with a lot of great community activity getting GRIP onto RPi2.
With the info in that thread we were able to get that USB camera's feed published as an IP camera using mjpeg-streamer (http://sourceforge.net/projects/mjpg-streamer/), which GRIP was then able to find and use on the RPi2, running Linux Arm. Might be something to try on the RoboRio?
We haven't yet verified GRIP is publishing stuff to NetworkTables, we hope to verify that tonight.
Cobra Commander
26-01-2016, 20:18
GRIP on the roboRIO with our USB Lifecam 3000-HD works without camera error...
Do I still initialize the camera server when trying to use it with grip?
CameraServer server = CameraServer.getInstance();
server.setQuality(50);
server.startAutomaticCapture("cam1");
ThomasClark
26-01-2016, 20:36
If you initialize the cameraserver in your robot program GRIP probably won't be able to access it. Usually only one application can access a camera at a time on Linux.
To get similar functionality as CameraServer, you can use the "Publish Video" operation in GRIP.
Cobra Commander
26-01-2016, 20:52
I think we are really close to getting this working!
What is setting property #16?
We are getting this error on our deploy:
Jan 27, 2016 1:53:36 AM edu.wpi.grip.core.Main start
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
VIDEOIO ERROR: V4L: setting property #16 is not supported
Jan 27, 2016 1:53:40 AM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
ThomasClark
27-01-2016, 00:54
I think we are really close to getting this working!
What is setting property #16?
We are getting this error on our deploy:
Jan 27, 2016 1:53:36 AM edu.wpi.grip.core.Main start
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
VIDEOIO ERROR: V4L: setting property #16 is not supported
Jan 27, 2016 1:53:40 AM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
Looking at the OpenCV source code, it seems like it has a lot of video capture properties available for V4L (the Linux video capture API), but most of them are only supported with V4L 2. If you're using V4L 1 and you try to set any property besides the few that are supported, OpenCV prints an error message (https://github.com/Itseez/opencv/blob/master/modules/videoio/src/cap_libv4l.cpp#L1770)
This is completely harmless. Since we don't do anything to manually configure camera settings in GRIP, any properties that get set are just by OpenCV trying to set up some defaults.
Is the project working otherwise? I noticed you have a SUCCESS message and no exceptions.
Cobra Commander
27-01-2016, 22:55
Yes! Everything appears to be working. I saw the error an I guess I panicked.
Everything appears to be operational, network tables and all.
Should I be concerned about this error? Everything seems to still work but, maybe.
Loading Dependency Injection Framework
Jan 28, 2016 3:48:21 AM java.util.logging.LogManager$RootLogger log
CONFIG: Configuration done.
Jan 28, 2016 3:48:22 AM java.util.logging.LogManager$RootLogger log
CONFIG: GRIP Version: 1.1.1
platform: /Linux/arm/
Jan 28, 2016 3:48:28 AM edu.wpi.grip.core.Main start
INFO: Loading file /home/lvuser/project.grip
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
VIDEOIO ERROR: V4L: setting property #16 is not supported
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Input must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionEvent
SEVERE: Value must have a value to run this step.
Jan 28, 2016 3:48:32 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 28, 2016 3:48:33 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 28, 2016 3:48:33 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 28, 2016 3:48:33 AM edu.wpi.grip.core.Main onExceptionClearedEvent
INFO: Exception Cleared Event
Jan 28, 2016 3:48:33 AM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
It says the image must have a value but, it appears to be getting an image from something.
ThomasClark
27-01-2016, 22:57
While the project is loading, the steps start running before the camera is ready. This isn't really concerning, and it should be fixed in the next release.
joeojazz
28-01-2016, 08:15
Hi Thomas I am still not able to get my camera (Microsoft 3000 USB) to be found in version 1.1.1. Every time I enter 0 the error pops up "A problem occurred trying to start the frame grabber for Webcam 0". I know this camera works do testing it on the robot and on other computers that have the older version of Grip on them.
Sincerely,
Joe
ThomasClark
28-01-2016, 10:25
Can you try it on the other computers with a newer GRIP? AFAIK nothing has changed with USB cameras between the last few versions of GRIP, so it may be a driver issue.
Crossle86
28-01-2016, 12:20
If you initialize the cameraserver in your robot program GRIP probably won't be able to access it. Usually only one application can access a camera at a time on Linux.
To get similar functionality as CameraServer, you can use the "Publish Video" operation in GRIP.
We did this but the feed to the DS was very slow, too slow to be useful.
Also, we have code that uses the NI camera support to switch the DS feed between multiple USB cameras...but we can't use it if GRIP is running. Is there some way or could a way be added for the robot code to feed images to GRIP instead of GRIP commandeering the camera? We are interested in GRIP but do not want to give up our existing camera server code.
joeojazz
28-01-2016, 16:14
Figured it out that the drivers of the camera had not been fully downloaded. Thanks for your help.
pluto7443
30-01-2016, 11:20
Hey, so we are having some issues with getting the network tables to work. I was wondering if you guys who got it working could elaborate on how you got that side of things working? We're using C++.
Thanks!
s-taylor
21-02-2016, 19:59
Hi, all.
My problem is similar to others in the thread, but not quite the same.
I can get GRIP 1.2.0 running just fine on my laptop, using the MS Lifecam 3000 USB. it publishes to NetworkTables on the RIO, and then the DS is able to act upon it to control the robot as expected.
So far, so good.
But when trying to deploy the GRIP to the robot (so it can run headless on the RIO), I get this error:
/usr/local/frc/JRE//bin/java -Xmx50m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -jar '/home/lvuser/grip.jar' '/home/lvuser/project.grip'
Loading Dependency Injection Framework
Jun 05, 2015 8:40:12 PM java.util.logging.LogManager$RootLogger log
CONFIG: Configuration done.
Jun 05, 2015 8:40:12 PM java.util.logging.LogManager$RootLogger log
CONFIG: GRIP Version: 1.2.0
platform: /Linux/arm/
Jun 05, 2015 8:40:17 PM edu.wpi.grip.core.Main start
INFO: Loading file /home/lvuser/project.grip
Jun 05, 2015 8:40:19 PM edu.wpi.grip.core.Main start
INFO: SUCCESS! The project is running in headless mode!
Jun 05, 2015 8:40:19 PM edu.wpi.grip.core.PipelineRunner$1 startUp
INFO: Pipeline Starting
OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp, line 3208
VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
Jun 05, 2015 8:40:19 PM edu.wpi.grip.core.Step runPerformIfPossible
WARNING: The CV resize operation did not perform correctly.
java.lang.RuntimeException: /home/javacpp-presets/opencv/cppbuild/linux-frc/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3208: error: (-215) ssize.area() > 0 in function resize
at org.bytedeco.javacpp.opencv_imgproc.resize(Native Method)
at edu.wpi.grip.generated.opencv_imgproc.Resize.perfo rm(Resize.java:58)
at edu.wpi.grip.core.Operation.perform(Operation.java :61)
at edu.wpi.grip.core.Step.runPerformIfPossible(Step.j ava:139)
at edu.wpi.grip.core.PipelineRunner.runPipeline(Pipel ineRunner.java:196)
at edu.wpi.grip.core.PipelineRunner.access$200(Pipeli neRunner.java:32)
at edu.wpi.grip.core.PipelineRunner$1.runOneIteration (PipelineRunner.java:76)
at com.google.common.util.concurrent.AbstractSchedule dService$ServiceDelegate$Task.run(AbstractSchedule dService.java:189)
at com.google.common.util.concurrent.Callables$3.run( Callables.java:100)
at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(Future Task.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(ScheduledThreadPoolE xecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Note no startup errors prior to the ssize.area() error.
I do start GRIP from RobotInit as specified:
/* Run GRIP in a new process */
try {
new ProcessBuilder("/home/lvuser/grip").inheritIO().start();
} catch (IOException e) {
e.printStackTrace();
}
I've tried rebooting the RIO prior to deploying, just in case some other instance of GRIP was already running.
I also made sure the CameraServer is not running.
I'm GUESSING that the camera isn't sending any images to the first pipeline stage (resize)... but there's insufficient debug info in the log to tell me what might be wrong.
I checked that the GRIP file is using device 0, and this matches what is in the RIO dashboard (which says "cam0").
Thoughts?
-Scott
ThomasClark
21-02-2016, 23:34
I'm GUESSING that the camera isn't sending any images to the first pipeline stage (resize)... but there's insufficient debug info in the log to tell me what might be wrong.
I would agree with that. The camera is sending "empty" 0x0 pixel, 0-channel images, probably because it didn't initialize correctly. A few other people have had basically the same problem, so we've been trying for the past week to reproduce this, but we haven't got it to happen with at least an actual error message about the camera.
One this I would recommend trying out is the v1.3 release candidate 1 (https://github.com/WPIRoboticsProjects/GRIP/releases). The only thing it changes about cameras is that they now try to restart if they don't work the first time. The problem might be as simple as cameras not connecting the first time because they're initializing or something weird.
Let me know if this helps.
1024Programming
22-02-2016, 08:55
I would agree with that. The camera is sending "empty" 0x0 pixel, 0-channel images, probably because it didn't initialize correctly. A few other people have had basically the same problem, so we've been trying for the past week to reproduce this, but we haven't got it to happen with at least an actual error message about the camera.
One this I would recommend trying out is the v1.3 release candidate 1 (https://github.com/WPIRoboticsProjects/GRIP/releases). The only thing it changes about cameras is that they now try to restart if they don't work the first time. The problem might be as simple as cameras not connecting the first time because they're initializing or something weird.
Let me know if this helps.
THANK YOU! Been waiting for command line arguments for a long time!
s-taylor
22-02-2016, 10:32
Thanks, Tom! I'll try installing that tonight.
BTW, we are finishing our build season in the WPI pits (since we don't have access to Burncoat HS during winter vacation)... so we will be on campus tonight from 6-10 if you happen to be around and want to see an instance of this issue "live". My email is s-taylor@att.net if you want to contact me outside of this thread.
s-taylor
22-02-2016, 11:21
Dumb question, but the only pre-built releases for 1.3.rc1 are x86_64b. What do I need to do differently on my laptop in order to deploy it to the RIO and its ARM processor? (32-bit/arm flags, for example)? or other special compile flags?
ThomasClark
22-02-2016, 19:35
Dumb question, but the only pre-built releases for 1.3.rc1 are x86_64b. What do I need to do differently on my laptop in order to deploy it to the RIO and its ARM processor? (32-bit/arm flags, for example)? or other special compile flags?
All of the builds actually include binaries for both the platform it runs on (ie: windows 64-bit) and the roboRIO. The deploy tool in GRIP should automatically copy everything you need over.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.