[Jderobot] Problemas al ejecutar diversos componentes de la rama stable
ILDEFONSO GONZALEZ SANCHEZ
i.gonzalezsan en alumnos.urjc.es
Mie Oct 30 00:09:21 CET 2013
Hola buenas noches,
en referencia este tema pero del componente cameraserver, yo tambi茅n estoy encontrando problemas, en mi caso si funciona el componente pero de forma err贸nea.
he revisado cap.isOpened en las lineas que comentas de cameraserver.cpp :
std::cout << "cap.isOpened"<< cap.isOpened() << std::endl;
if(cap.isOpened()){
replyTask = new ReplyTask(this);
replyTask->start(); // my own thread
}else{
exit(-1);
}
Y es necesario que cap.isOpened sea distinto de 0 para que entre dentro de la condici贸n if y contin煤e ejecutando.
Mi problema es que cuando lanzo mi componente para trabajar con cameraserver se actualiza la imagen cada mucho tiempo:
./cameraserver --Ice.Config=cameraserver.cfg
Constructor CameraI -> CameraSrv.Camera.0.
URI: 0
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
cap.isOpened1
safeThread
33
Y me da este error : HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP, este problema 驴puede ser algo que ocurre con Ice,?
Un saludo y gracias,
Ildefonso Gonz谩lez S谩nchez
________________________________
De: jde-developers-bounces en gsyc.es [jde-developers-bounces en gsyc.es] en nombre de Juan Navarro Bosgos [jnbosgos en gmail.com]
Enviado: lunes, 28 de octubre de 2013 16:43
Para: Desarrolladores Jderobot
Asunto: Re: [Jderobot] Problemas al ejecutar diversos componentes de la rama stable
Hola,
revisando esta incidencia que coment茅, he observado algunos cambios:
cameraserver ya no me lanza una "Violaci贸n de segmento", pero al ejecutarlo se me cierra ofreciendo la siguiente salida:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/cameraserver$ ./cameraserver --Ice.Config=cameraserver.cfg
Constructor CameraI -> CameraSrv.Camera.0.
URI: 0
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/cameraserver$
revisando el c贸digo de cameraserver.cpp he observado que el problema parec铆a ser que la condici贸n de la l铆nea 101 de dicha clase: "if(cap.isOpened())" devolv铆a cero; para comprobarlo he impreso el estado por pantalla antes de que entrase a la condici贸n y tras sus asignaci贸n en las l铆neas 96 a 99, mediante "std::cout << "cap.isOpened: " << cap.isOpened() << std::endl;", obteniendo:
cap.isOpened: 0
el fichero de configuraci贸n utilizado es el que est谩 en el repositorio; en el port谩til que lo ejecuto hay una webcam integrada, y en versiones anteriores de jderobot el componente me funcionaba utilizando como Uri '/dev/video0' (si utilizo dicha uri ahora me salta la Violaci贸n de segmento), se supone que el '0' que aparece en el fichero de configuraci贸n hace referencia a dicha ruta; entonces no s茅 c贸mo solucionarlo para que abra el capturador de video y no se termine la ejecuci贸n.
Luego con respecto a openniServer, como utilizo Kinect como sensor RGBD, no me pod铆a funcionar ya que OpenNI2 no lo soporta; as铆 que deb铆a utilizar openni1Server. Utilizando un kinect real, openni1Server lo detecta pero se produce un fallo por TimeOut mientras espera datos nuevos, y la mayor铆a de las veces termina la ejecuci贸n inesperadamente con una Violaci贸n de segmento, otras pocas se queda ejecutando pero lanzando avisos de timeouts de las distintas c谩maras:
Sin violaci贸n de segmento:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/openni1Server$ ./openni1Server --Ice.Config=openni1Server.cfg
-! 10/28/13 17:29:17.519 warning: found unknown properties for object adapter `openni1Server':
openni1Server.CameraDEPTH
openni1Server.CameraDEPTH.Format
openni1Server.CameraDEPTH.Name<http://openni1Server.CameraDEPTH.Name>
openni1Server.CameraDEPTH.fps
openni1Server.CameraRGB
openni1Server.CameraRGB.Format
openni1Server.CameraRGB.Name<http://openni1Server.CameraRGB.Name>
openni1Server.CameraRGB.fps
openni1Server.Fps
openni1Server.Height
openni1Server.KinectLedsActive
openni1Server.NCameras
openni1Server.PlayerDetection
openni1Server.Pose3DMotorsActive
openni1Server.Width
openni1Server.calibration
openni1Server.deviceId
openni1Server.pointCloud.Fps
openni1Server.pointCloudActive
Selected device: 0
NCAMERAS = 2
Found device: vendor PrimeSense name SensorKinect
Number of detected devices: 1
[Device 0] PrimeSense, SensorKinect, serial=A00365905701052A
Creating camera cameraA
openni1Server.CameraRGB.PlayerDetection
Starting thread for camera: cameraA
-------- openni1Server: Component: CameraRGB created successfully --------
Creating camera cameraB
Starting thread for camera: cameraB
-------- openni1Server: Component: CameraDEPTH created successfully --------
Creating pointcloud1 pointcloud1
-------- openni1Server: Component: PointCloud created successfully --------
CREADO
FPS: 10
------------------------------------------------------
Camera
Position: (X,Y,Z,H)=(1895.0,4983.0,857.0,1.0)
Focus of Attention: (x,y,z,h)=(4633.0,642.0,1088.0,1.0)
Focus DistanceX(vertical): 515.0 mm
Focus DistanceY(horizontal): 515.0 mm
Skew: 0.00000
Optical Center: (x,y)=(219.0,323.0)
K Matrix: | 515.0 0.0 219.0 0.0 |
| 0.0 515.0 323.0 0.0 |
| 0.0 0.0 1.0 0.0 |
R&T Matrix: | -0.0 0.0 1.0 -1000.2 |
| -0.8 -0.5 0.0 4261.1 |
| 0.5 -0.8 0.0 3162.0 |
| 0.0 0.0 0.0 1.0 |
------------------------------------------------------
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
-------- openni1Server: WARNING- DEPTH timeout-
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- RGB timeout-
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- DEPTH timeout-
-------- openni1Server: WARNING- RGB timeout-
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- DEPTH timeout-
-------- openni1Server: WARNING- RGB timeout-
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- DEPTH timeout-
-------- openni1Server: WARNING- RGB timeout-
-------- openni1Server: WARNING- RGB timeout-
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- DEPTH timeout-
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
-------- openni1Server: WARNING- POINTCLOUD timeout-
-------- openni1Server: WARNING- DEPTH timeout-
-------- openni1Server: WARNING- RGB timeout-
^C
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/openni1Server$
Con violaci贸n de segmento:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/openni1Server$ ./openni1Server --Ice.Config=openni1Server.cfg
-! 10/28/13 17:31:16.425 warning: found unknown properties for object adapter `openni1Server':
openni1Server.CameraDEPTH
openni1Server.CameraDEPTH.Format
openni1Server.CameraDEPTH.Name<http://openni1Server.CameraDEPTH.Name>
openni1Server.CameraDEPTH.fps
openni1Server.CameraRGB
openni1Server.CameraRGB.Format
openni1Server.CameraRGB.Name<http://openni1Server.CameraRGB.Name>
openni1Server.CameraRGB.fps
openni1Server.Fps
openni1Server.Height
openni1Server.KinectLedsActive
openni1Server.NCameras
openni1Server.PlayerDetection
openni1Server.Pose3DMotorsActive
openni1Server.Width
openni1Server.calibration
openni1Server.deviceId
openni1Server.pointCloud.Fps
openni1Server.pointCloudActive
Selected device: 0
NCAMERAS = 2
Found device: vendor PrimeSense name SensorKinect
Number of detected devices: 1
[Device 0] PrimeSense, SensorKinect, serial=A00365905701052A
Creating camera cameraA
openni1Server.CameraRGB.PlayerDetection
Starting thread for camera: cameraA
-------- openni1Server: Component: CameraRGB created successfully --------
Creating camera cameraB
Starting thread for camera: cameraB
-------- openni1Server: Component: CameraDEPTH created successfully --------
Creating pointcloud1 pointcloud1
-------- openni1Server: Component: PointCloud created successfully --------
FPS: 10
CREADO
------------------------------------------------------
Camera
Position: (X,Y,Z,H)=(1895.0,4983.0,857.0,1.0)
Focus of Attention: (x,y,z,h)=(4633.0,642.0,1088.0,1.0)
Focus DistanceX(vertical): 515.0 mm
Focus DistanceY(horizontal): 515.0 mm
Skew: 0.00000
Optical Center: (x,y)=(219.0,323.0)
K Matrix: | 515.0 0.0 219.0 0.0 |
| 0.0 515.0 323.0 0.0 |
| 0.0 0.0 1.0 0.0 |
R&T Matrix: | -0.0 0.0 1.0 -1000.2 |
| -0.8 -0.5 0.0 4261.1 |
| 0.5 -0.8 0.0 3162.0 |
| 0.0 0.0 0.0 1.0 |
------------------------------------------------------
WaitAnyUpdateAll() failed failed: A timeout has occurred when waiting for new data!
Violaci贸n de segmento (`core' generado)
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/openni1Server$
Si alguno sab茅is como solucionar alguno de los 2 problemas, o por d贸nde puede estar el fallo, os lo agradecer铆a.
Saludos,
Juan
2013/10/8 Juan Navarro Bosgos <jnbosgos en gmail.com<mailto:jnbosgos en gmail.com>>
Hola,
tras el problema con basic_component al compilar todo jderobot [1], he utilizado el m茅todo de compilaci贸n por componentes para compilar todos menos ese (basic_component) y el make ha resultado bien.
Ahora el problema lo tengo al ejecutar los componentes, al menos los que he probado; y tras pegarme con ficheros de configuraci贸n, la wiki y mirar los c贸digos de los componentes, he decidido comentarlo a ver si alguien sabe por d贸nde puede estar el problema.
El 煤nico que consigo hacer funcionar es el plugin de kinect en gazebo 1.7.3. Los problemas los tengo con (los ficheros de las salidas en general son los del repositorio, aunque modific谩ndolos obtengo los mismos resultados):
cameraserver probado conectado a la webcam del portatil (tambi茅n he probado con un video d谩ndole la ruta, con los mismos resultados) :
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/cameraserver$ ./cameraserver --Ice.Config=cameraserver.cfg
Constructor CameraI -> CameraSrv.Camera.0.
URI: v4l2:///dev/video0
Violaci贸n de segmento (`core' generado)
openniServer con un kinect real:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/openniServer$ ./openniServer --Ice.Config=openniServer.cfg
-! 10/08/13 21:59:39.670 warning: found unknown properties for object adapter `openniServer':
openniServer.CameraDEPTH
openniServer.CameraDEPTH.Format
openniServer.CameraDEPTH.Mirror
openniServer.CameraDEPTH.Name<http://openniServer.CameraDEPTH.Name>
openniServer.CameraDEPTH.PlayerDetection
openniServer.CameraDEPTH.fps
openniServer.CameraIR
openniServer.CameraRGB
openniServer.CameraRGB.Format
openniServer.CameraRGB.Mirror
openniServer.CameraRGB.Name<http://openniServer.CameraRGB.Name>
openniServer.CameraRGB.PlayerDetection
openniServer.CameraRGB.fps
openniServer.ImageRegistration
openniServer.KinectLedsActive
openniServer.Mode
openniServer.NCameras
openniServer.PlayerDetection
openniServer.PointCloud.Name<http://openniServer.PointCloud.Name>
openniServer.Pose3DMotorsActive
openniServer.deviceId
openniServer.pointCloud.Fps
openniServer.pointCloudActive
Selected device: 0
NCAMERAS = 2
Missing devices
0 : Couldn't open device 锟斤拷锟斤拷1: DeviceOpen: Couldn't open device '锟斤拷锟斤拷1'
Violaci贸n de segmento (`core' generado)
recorder conectado a gazebo con el plugin de kinect:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/recorder$ ./recorder --Ice.Config=simulatedKinect.cfg
Outgoing.cpp:424: Ice::ObjectNotExistException:
object does not exist:
identity: `CameraI'
facet:
operation: ice_isA
0
kinectViewer conectado a gazebo con plugin de kinect:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/kinectViewer$ ./kinectViewer --Ice.Config=kinectViewer.cfg
Outgoing.cpp:424: Ice::ObjectNotExistException:
object does not exist:
identity: `CameraI'
facet:
operation: ice_isA
terminate called after throwing an instance of 'IceUtil::NullHandleException'
what(): /usr/include/IceUtil/Handle.h:46: IceUtil::NullHandleException
Abortado (`core' generado)
La salida de la ejecuci贸n de gazebo con el plugin de kinect al que conecto algunos de los componentes anteriores, por si puede ser de utilidad, es:
jnbosgos en teleko:~/pfc/jderobot/trunk/src/stable/components/gazeboserver/pluginsGazebo/kinect$ gazebo kinect.world
Gazebo multi-robot simulator, version 1.7.3
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Gazebo multi-robot simulator, version 1.7.3
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Msg Waiting for master.Warning [parser.cc:361] Converting a deprecated SDF source[/home/jnbosgos/pfc/jderobot/trunk/src/stable/components/gazeboserver/pluginsGazebo/kinect/kinect.world].
Warning [Converter.cc:58] Version[1.0] to Version[1.4]
Please use the gzsdf tool to update your SDF files.
$ gzsdf convert [sdf_file]
Warning [parser.cc:361] Converting a deprecated SDF source[/home/jnbosgos/.gazebo/models/ground_plane/model.sdf].
Warning [Converter.cc:58] Version[1.2] to Version[1.4]
Please use the gzsdf tool to update your SDF files.
$ gzsdf convert [sdf_file]
Warning [parser.cc:361] Converting a deprecated SDF source[/home/jnbosgos/.gazebo/models/sun/model.sdf].
Warning [Converter.cc:58] Version[1.2] to Version[1.4]
Please use the gzsdf tool to update your SDF files.
$ gzsdf convert [sdf_file]
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.108
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.108
Kinect Endpoints > default -h localhost -p 9998
Constructor CameraI
safeThread
Constructor CameraDepth
safeThread
adapter->add(object, ic->stringToIdentity(Kinect));
y el fichero de configuraci贸n de recorder 'simulatedKinect.cfg':
Recorder.FileName=datos.jde
Recorder.nCameras=1
Recorder.nDethSensors=1
Recorder.nLasers=0
Recorder.DepthSensor1.Proxy=CameraDepth:tcp -h localhost -p 9998
Recorder.Camera1.Proxy=CameraI:tcp -h localhost -p 9998
Recorder.GUI=1
Recorder.Hostname=localhost
Recorder.Port=9990
Recorder.Format=png
Recorder.PngCompression=0
#from 0 to 9. A higher value means a smaller size
Recorder.JpgQuality=80
# from 0 to 100 (the higher is the better)
Recorder.Laser.Samples=180
Recorder.Hz=10
Un saludo,
Juan
[1] [Jderobot] Problema con openniServer al hacer el make<http://jderobot-developer-list.2315034.n4.nabble.com/Jderobot-Problema-con-openniServer-al-hacer-el-make-tp4641664.html>
------------ pr髕ima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://gsyc.escet.urjc.es/pipermail/jde-developers/attachments/20131029/eb093207/attachment-0001.htm
More information about the Jde-developers
mailing list