🧊
Resources
Socials
  • 📙Welcome!
  • ⚙️ROS
    • Beginner's Guide to ROS
      • Prerequisites
        • 💻Ubuntu Setup - Windows Subsystem for Linux (WSL)
        • 💻Ubuntu Setup - Dual Booting (For Windows)
        • 💻Ubuntu Setup - VM on MacOS M1
      • ROS Installation
        • Installation Guide [ROS2 Humble]
      • ROS Concepts
      • ROS Tools/Utils
        • Working with ROS 1/2 Bags
      • Robotics Fundamentals
        • Domains of Robotics Software
          • Perception
          • Localisation
          • Navigation
          • Controls
          • Simulation
        • Fundamental Concepts
          • Rotations (and Quaternion)
          • Coordinate Frames
          • Rigid Body Transformations (3D)
          • Basic Control Theory
          • Image Processing (with OpenCV)
    • Perception
      • Camera
        • [WSL2] Enabling USB Camera Access
        • Image Common
        • Camera Driver
        • Camera Calibration
        • Stereo Vision Concept
        • Image Pipeline
          • Monocular Image Processing
          • Disparity and Depth Image for Stereo Vision
      • LiDAR
        • Working with PointCloud2 Data
Powered by GitBook
On this page
  1. ROS
  2. Perception
  3. Camera

[WSL2] Enabling USB Camera Access

PreviousCameraNextImage Common

Last updated 10 months ago

1) Get usbipd

2) Follow the video

Check your kernel version.

sudo apt update && sudo apt upgrade -y && sudo apt install -y build-essential flex bison libgtk2.0-dev libelf-dev libncurses-dev autoconf libudev-dev libtool zip unzip v4l-utils libssl-dev python3-pip cmake git iputils-ping net-tools dwarves bc
sudo mkdir /usr/src
cd /usr/src

VERSION=5.15.153.1
sudo git clone -b linux-msft-wsl-${VERSION} https://github.com/microsoft/WSL2-Linux-Kernel.git ${VERSION}-microsoft-standard && cd ${VERSION}-microsoft-standard

sudo cp /proc/config.gz config.gz
sudo gunzip config.gz
sudo mv config .config
sudo make menuconfig
sudo make -j$(nproc)
sudo make modules_install -j$(nproc)
sudo make install -j$(nproc)
sudo cp -rf vmlinux /mnt/c/Sources/

######################
# Record video in WSL
######################
sudo apt install v4l-utils guvcview
sudo guvcview

⚙️
https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-5.15.y
Connect USB devicesMicrosoftLearn
Logo