Outils pour utilisateurs

Outils du site


intel_realsense

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
intel_realsense [2021/03/11 05:53] – [Installation de Cubemos] sergeintel_realsense [2022/03/22 14:12] (Version actuelle) – [Les pages sur la détection de squelette] Benjamin Labomedia
Ligne 1: Ligne 1:
-====== Intel Realsense ======+====== Intel Realsense====== 
 +<WRAP center round box 80% centeralign> 
 +**{{tagpage>skeleton camera3D|Les pages sur les caméras 3D et la détection de squelette}}**     **[[http://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fressources.labomedia.org%2Fintel_realsense|English Version]]** 
 +</WRAP>
  
-=====Installation=====+{{ :media_15:img_0005.jpg?600 |}} 
 +===== Ressources =====
  
-====Driver==== +  * **[[cameras_de_profondeur|Camera Realsense Installation]] Intel® RealSense™ Computer Vision - Depth and Tracking cameras**
-  https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md+
  
-  sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE +  * [[https://intelrealsense.github.io/librealsense/python_docs/_generated/pyrealsense2.html|API python]] 
-  sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u +  * [[https://pyrealsense.readthedocs.io/en/master/pyrealsense.html|pyrealsense.readthedocs.io]] 
-  sudo apt-get install librealsense2-dkms +  * [[https://github.com/IntelRealSense/librealsense/tree/development/wrappers/python/examples| Exemples python sur GitHub]] 
-  sudo apt-get install librealsense2-utils+ 
 +=====Installation du driver du Capteur D455===== 
 +  * **[[https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md|github.com librealsense doc linux]]** 
 + 
 +Validé sur Debian 11 Bullseye 
 + 
 +<code bash> 
 +sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE 
 +sudo apt install software-properties-common 
 +sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo focal main" -u 
 +</code> 
 + 
 +Puis\\ 
 +  sudo apt update 
 +  sudo apt install -librealsense2-dkms
  
 Tester avec: Tester avec:
 +  sudo apt install librealsense2-utils
   realsense-viewer   realsense-viewer
 +  
 +Voir si le module est bien chargé
 +  modinfo uvcvideo | grep "version:"            devrait inclure realsense
 +
 +{{ ::realsense_viewer.png?400 |}}
 +
 +===== Récupération des images avec OpenCV en python =====
 +====Installation de pyrealsense2====
 +  * https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#installation
 +
 +  python3 -m pip install pyrealsense2 --user
 +
 +====L'exemple de la doc librealsense====
 +  * [[https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/opencv_viewer_example.py|opencv_viewer_example.py]]
 +
 +{{ :media_14:realsense_opencv.png?800 |}}
 +
 +====Calibration de la caméra====
 +**Avec une calibration, la détction du squelette est beaucoup plus stable.**\\
 +Une copie du script de la doc se trouve dans le dossier rs-imu-calibration: [[https://github.com/sergeLabo/rs-opencv/blob/main/rs-imu-calibration/rs-imu-calibration.py|rs-imu-calibration.py]]\\
 +Suivre le script et le PDF [[https://github.com/sergeLabo/rs-opencv/blob/main/rs-imu-calibration/IMU_Calibration_Tool_for_Intel_RealSense-Depth_Cameras_Whitepaper.pdf|IMU_Calibration_Tool_for_Intel_RealSense-Depth_Cameras_Whitepaper.pdf]]
 +
 +Exemple d'une calibration
 +<code bash>
 +python3 rs-imu-calibration.py
 +waiting for realsense device...
 +  Device PID:  0B5C
 +  Device name:  Intel RealSense D455
 +  Serial number:  053422251581
 +  Product Line:  D400
 +  Firmware version:  05.12.11.00
 +Start interactive mode:
 +FOUND ACCEL with fps=63
 +FOUND GYRO with fps=200
 +-------------------------
 +*** Press ESC to Quit ***
 +-------------------------
 +
 +Align to direction:  [ 0. -1.  0.]   Mounting screw pointing down, device facing out
 + Status.collect_data[...................]]                                                
 +
 +Direction data collected.
 +Align to direction:  [1. 0. 0.]   Mounting screw pointing left, device facing out
 + Status.collect_dataWARNING: MOVING     ]]                                                
 + Status.collect_data[...................]]                                                
 +
 +Direction data collected.
 +Align to direction:  [0. 1. 0.]   Mounting screw pointing up, device facing out
 + Status.collect_data[...................]]                                                
 +
 +Direction data collected.
 +Align to direction:  [-1.  0.  0.]   Mounting screw pointing right, device facing out
 + Status.collect_dataWARNING: MOVING     ]]                                                
 + Status.collect_data[...................]]                                                
 +
 +Direction data collected.
 +Align to direction:  [ 0.  0. -1.]   Viewing direction facing down
 + Status.collect_data[...................]]                                                
 +
 +Direction data collected.
 +Align to direction:  [0. 0. 1.]   Viewing direction facing up
 + Status.collect_dataWARNING: MOVING     ]]                                                
 + Status.collect_data[...................]]                                                
  
-====Installation de Cubemos====+Direction data collected. 
 +Would you like to save the raw data? Enter footer for saving files (accel_<footer>.txt and gyro_<footer>.txt) 
 +Enter nothing to not save raw data to disk. >toto
  
-  sudo apt-get install ./cubemos-SkeletonTracking_*.deb 
-  cd /opt/cubemos/skeleton_tracking/scripts/ 
-  bash post_installation.sh 
-Installe entre autre ffmpeg, demande la license, installer les exemples 
-  POST INSTALLATION STEPS COMPLETED 
-  During the Linux installation the following environment variable is created 
-  $CUBEMOS_SKEL_SDK | /opt/cubemos/skeleton_tracking 
-=====Cubemos===== 
-  * https://www.cubemos.com/ S'inscrire pour récupérer la version de test valable 30 jours 
  
-L'installation avec le deb ne marche que sur (x)ubuntu 18.04: il faut libboost 1.65\\ +Writing files: 
-Debian 10 et Xubuntu 20.04 ont des versions plus récentes, et je suis trop maladroit pour réussir à l'installer à la mano.+accel_toto.txt 
 +gyro_toto.txt 
 +[ 5.22060069e-04  6.86921142e-05 -2.07340278e-03] 
 +[1000 1000 1000 1000 1000 1000] 
 +using 6000 measurements. 
 +[[ 1.01076975e+00  3.60727590e-02 -8.35014969e-03] 
 + [ 4.92538947e-04  1.01871131e+00 -8.72837958e-03] 
 + [-6.46373829e-03  1.24138802e-02  1.01959596e+00] 
 + [ 2.24575082e-01  1.56413994e-01  2.86333600e-01]] 
 +residuals: [  7.25572588   3.70199967 114.63373591] 
 +rank: 4 
 +singular: [441.23030094 430.20638248 424.20085017  77.26445512] 
 +norm (raw data  ): 9.655707 
 +norm (fixed data): 9.805557 A good calibration will be near 9.806650 
 +Would you like to write the results to the camera? (Y/N)Y 
 +Writing calibration to device. 
 +  Device PID:  0B5C 
 +  Device name:  Intel RealSense D455 
 +  Serial number:  053422251581 
 +  Firmware version:  05.12.11.00 
 +SUCCESS: saved calibration to camera. 
 +Done. 
 +</code> 
 +=====Les pages sur la détection de squelette===== 
 +  * [[skeleton_tracking_de_cubemos_logiciel_proprietaire|]] 
 +  * [[pose_estimation_avec_opencv]]
  
-====Tests en python==== 
-L’exécution des scripts se fait dans un environnement virtuel avec [[virtualenv|venv]]  
-  sudo apt install python3-pip python3-venv 
-  python3 -m venv ~/cubemos-samples/py_venv 
-  source ~/cubemos-samples/py_venv/bin/activate 
-  pip3 install wheel 
-  pip3 install opencv-python==4.1.* numpy>=1.18.2,<1.19 pyrealsense2>=2.39.0 
-  pip3 install --find-links="/home/labomedia/cubemos-samples/skeleton_tracking/wrappers/python/" --no-index cubemos.skeletontracking 
  
-{{tag>sb}}+{{tag> capteurs opencv python realsense sb skeleton camera3D ia}}
intel_realsense.1615442027.txt.gz · Dernière modification : 2021/03/11 05:53 de serge