|
|
(7 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| | | |
− | ==OpenNI traker==
| |
− | ===Intalación===
| |
− |
| |
− | Lo primero que vamos a decir es como configurar el entorno para poder trabajar con la librería skeleton tracking, para ello vamos a trabajar con ROS, la versión fuerte, para instalarlo:
| |
− |
| |
− | <syntaxhighlight>sudo apt-get install ros-fuerte-desktop-full</syntaxhighlight>
| |
− |
| |
− |
| |
− | Después de eso, para poder trabajar con la kinect, debemos instalar los drivers de openni, recordar que estamos trabajando con la versión fuerte de ros:
| |
− |
| |
− | <syntaxhighlight>sudo apt-get install ros-fuerte-openni-camera ros-fuerte-openni-launch</syntaxhighlight>
| |
− |
| |
− |
| |
− | La librería skeleton tracking, que es la que vamos a utilizar se encuentra en el paquete NITE, que puedes encontrar en el siguiente enlace: [http://www.openni.org/openni-sdk/openni-sdk-history-2/], debemos descargarnos la versión 1.5, ya que a partir de la versión 2.0 da problemas de compatibilidad y no conseguiremos hacer funcionar la librería skeleton tracking.
| |
− |
| |
− | Una vez descargado lo descomprimimos y ejecutamos el fichero ''install.sh''.
| |
− |
| |
− | <syntaxhighlight>sudo ./install.sh</syntaxhighlight>
| |
− |
| |
− | Debemos obtener lo siguiente:
| |
− |
| |
− | <syntaxhighlight>Installing NITE
| |
− | ***************
| |
− |
| |
− | Copying shared libraries... OK
| |
− | Copying includes... OK
| |
− | Installing java bindings... OK
| |
− | Installing module 'Features_1_3_0'...
| |
− | Registering module 'libXnVFeatures_1_3_0.so'... OK
| |
− | Installing module 'Features_1_3_1'...
| |
− | Registering module 'libXnVFeatures_1_3_1.so'... OK
| |
− | Installing module 'Features_1_4_1'...
| |
− | Registering module 'libXnVFeatures_1_4_1.so'... OK
| |
− | Installing module 'Features_1_4_2'...
| |
− | Registering module 'libXnVFeatures_1_4_2.so'... OK
| |
− | Installing module 'Features_1_5_2'...
| |
− | Registering module 'libXnVFeatures_1_5_2.so'... OK
| |
− | Copying XnVSceneServer... OK
| |
− | Installing module 'Features_1_5_2'
| |
− | registering module 'libXnVHandGenerator_1_3_0.so'...OK
| |
− | Installing module 'Features_1_5_2'
| |
− | registering module 'libXnVHandGenerator_1_3_1.so'...OK
| |
− | Installing module 'Features_1_5_2'
| |
− | registering module 'libXnVHandGenerator_1_4_1.so'...OK
| |
− | Installing module 'Features_1_5_2'
| |
− | registering module 'libXnVHandGenerator_1_4_2.so'...OK
| |
− | Installing module 'Features_1_5_2'
| |
− | registering module 'libXnVHandGenerator_1_5_2.so'...OK
| |
− | Adding license.. OK
| |
− |
| |
− | *** DONE ***
| |
− | </syntaxhighlight>
| |
− |
| |
− | Por último, solo nos falta instalar el paquete en cuestión ''openni_tracker ''.
| |
− |
| |
− | <syntaxhighlight>sudo apt-get install ros-fuerte-openni-tracker</syntaxhighlight>
| |
− |
| |
− |
| |
− | ===Ejecutando Skeleton Tracking===
| |
− |
| |
− | Debemos abrir 3 terminales diferentes:
| |
− |
| |
− | * En el primero, ejecutaremos ROS, para ello escribimos en linea de comandos:
| |
− | <syntaxhighlight>roscore</syntaxhighlight>
| |
− | y nos debe aparecer algo como esto:
| |
− | <syntaxhighlight>... logging to /home/aitana/.ros/log/f3ff128e-5c2a-11e3-8ee4-0c6076187d47/roslaunch-aitana-laptop-3492.log
| |
− | Checking log directory for disk usage. This may take awhile.
| |
− | Press Ctrl-C to interrupt
| |
− | Done checking log file disk usage. Usage is <1GB.
| |
− |
| |
− | started roslaunch server http://aitana-laptop:60613/
| |
− | ros_comm version 1.8.11
| |
− |
| |
− |
| |
− | SUMMARY
| |
− | ========
| |
− |
| |
− | PARAMETERS
| |
− | * /rosdistro
| |
− | * /rosversion
| |
− |
| |
− | NODES
| |
− |
| |
− | auto-starting new master
| |
− | process[master]: started with pid [3508]
| |
− | ROS_MASTER_URI=http://aitana-laptop:11311/
| |
− |
| |
− | setting /run_id to f3ff128e-5c2a-11e3-8ee4-0c6076187d47
| |
− | process[rosout-1]: started with pid [3521]
| |
− | started core service [/rosout]
| |
− | </syntaxhighlight>
| |
− |
| |
− | Lo dejamos corriendo en segundo plano.
| |
− | * En el segundo terminal, debemos lanzar los drivers openni para la kinect
| |
− |
| |
− | <syntaxhighlight>roslaunch openni_launch openni.launch</syntaxhighlight>
| |
− |
| |
− | Y una vez más, nos debe aparecer algo como lo que se muestra a continuación:
| |
− |
| |
− | <syntaxhighlight>... logging to /home/aitana/.ros/log/f3ff128e-5c2a-11e3-8ee4-0c6076187d47/roslaunch-aitana-laptop-3614.log
| |
− | Checking log directory for disk usage. This may take awhile.
| |
− | Press Ctrl-C to interrupt
| |
− | Done checking log file disk usage. Usage is <1GB.
| |
− |
| |
− | started roslaunch server http://aitana-laptop:58367/
| |
− |
| |
− | SUMMARY
| |
− | ========
| |
− |
| |
− | PARAMETERS
| |
− | * /camera/depth/rectify_depth/interpolation
| |
− | * /camera/depth_registered/rectify_depth/interpolation
| |
− | * /camera/disparity_depth/max_range
| |
− | * /camera/disparity_depth/min_range
| |
− | * /camera/disparity_depth_registered/max_range
| |
− | * /camera/disparity_depth_registered/min_range
| |
− | * /camera/driver/depth_camera_info_url
| |
− | * /camera/driver/depth_frame_id
| |
− | * /camera/driver/depth_registration
| |
− | * /camera/driver/device_id
| |
− | * /camera/driver/rgb_camera_info_url
| |
− | * /camera/driver/rgb_frame_id
| |
− | * /rosdistro
| |
− | * /rosversion
| |
− |
| |
− | NODES
| |
− | /camera/depth/
| |
− | metric (nodelet/nodelet)
| |
− | metric_rect (nodelet/nodelet)
| |
− | points (nodelet/nodelet)
| |
− | rectify_depth (nodelet/nodelet)
| |
− | /camera/rgb/
| |
− | debayer (nodelet/nodelet)
| |
− | rectify_color (nodelet/nodelet)
| |
− | rectify_mono (nodelet/nodelet)
| |
− | /
| |
− | camera_base_link (tf/static_transform_publisher)
| |
− | camera_base_link1 (tf/static_transform_publisher)
| |
− | camera_base_link2 (tf/static_transform_publisher)
| |
− | camera_base_link3 (tf/static_transform_publisher)
| |
− | camera_nodelet_manager (nodelet/nodelet)
| |
− | /camera/
| |
− | disparity_depth (nodelet/nodelet)
| |
− | disparity_depth_registered (nodelet/nodelet)
| |
− | driver (nodelet/nodelet)
| |
− | points_xyzrgb_depth_rgb (nodelet/nodelet)
| |
− | register_depth_rgb (nodelet/nodelet)
| |
− | /camera/ir/
| |
− | rectify_ir (nodelet/nodelet)
| |
− | /camera/depth_registered/
| |
− | metric (nodelet/nodelet)
| |
− | metric_rect (nodelet/nodelet)
| |
− | rectify_depth (nodelet/nodelet)
| |
− |
| |
− | ROS_MASTER_URI=http://localhost:11311
| |
− |
| |
− | core service [/rosout] found
| |
− | process[camera_nodelet_manager-1]: started with pid [3634]
| |
− | process[camera/driver-2]: started with pid [3635]
| |
− | process[camera/rgb/debayer-3]: started with pid [3636]
| |
− | process[camera/rgb/rectify_mono-4]: started with pid [3637]
| |
− | process[camera/rgb/rectify_color-5]: started with pid [3677]
| |
− | process[camera/ir/rectify_ir-6]: started with pid [3700]
| |
− | process[camera/depth/rectify_depth-7]: started with pid [3726]
| |
− | process[camera/depth/metric_rect-8]: started with pid [3754]
| |
− | process[camera/depth/metric-9]: started with pid [3793]
| |
− | process[camera/depth/points-10]: started with pid [3830]
| |
− | process[camera/register_depth_rgb-11]: started with pid [3868]
| |
− | process[camera/depth_registered/rectify_depth-12]: started with pid [3913]
| |
− | process[camera/depth_registered/metric_rect-13]: started with pid [3953]
| |
− | process[camera/depth_registered/metric-14]: started with pid [4002]
| |
− | process[camera/points_xyzrgb_depth_rgb-15]: started with pid [4055]
| |
− | process[camera/disparity_depth-16]: started with pid [4106]
| |
− | process[camera/disparity_depth_registered-17]: started with pid [4151]
| |
− | process[camera_base_link-18]: started with pid [4281]
| |
− | process[camera_base_link1-19]: started with pid [4344]
| |
− | process[camera_base_link2-20]: started with pid [4396]
| |
− | process[camera_base_link3-21]: started with pid [4434]
| |
− | [ INFO] [1386082671.833888617]: Initializing nodelet with 2 worker threads.
| |
− | [ERROR] [1386082676.174882681]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressedDepth/set_parameters]
| |
− | [ERROR] [1386082676.193015430]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]
| |
− | [ERROR] [1386082676.216452698]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]
| |
− | [ INFO] [1386082676.733259757]: No devices connected.... waiting for devices to be connected
| |
− | [ INFO] [1386082679.743069110]: No devices connected.... waiting for devices to be connected
| |
− | [ INFO] [1386082682.752573950]: No devices connected.... waiting for devices to be connected
| |
− | [ INFO] [1386082685.762060351]: No devices connected.... waiting for devices to be connected
| |
− | </syntaxhighlight>
| |
− |
| |
− | Y que no cunda en pánico, que el error es normal.
| |
− |
| |
− | * Por último, abrimos un nuevo terminal y en este ejecutamos por fin:
| |
− |
| |
− | <syntaxhighlight>rosrun openni_tracker openni_tracker</syntaxhighlight>
| |
− |
| |
− | Una vez que se está ejecutando, nos pondremos enfrente de la kinect en Psi Pose[[File:PsiPose.gif]], de esta forma nos aparecerán los siguientes mensajes.
| |