Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 2.58 KB

File metadata and controls

68 lines (50 loc) · 2.58 KB

Camera Configuration

Installing the packages:

  • Register the server's public key:
sudo mkdir -p /etc/apt/keyrings
curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null
  • Make sure apt HTTPS support is installed: sudo apt-get install apt-transport-https

  • Add the server to the list of repositories:

echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] https://librealsense.intel.com/Debian/apt-repo `lsb_release -cs` main" | \
sudo tee /etc/apt/sources.list.d/librealsense.list
sudo apt-get update
  • Install the libraries (see section below if upgrading packages):
    sudo apt-get install librealsense2-dkms
    sudo apt-get install librealsense2-utils
    The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.

  • Optionally install the developer and debug packages:
    sudo apt-get install librealsense2-dev
    sudo apt-get install librealsense2-dbg
    With dev package installed, you can compile an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2 or an IDE of your choice.

Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.

Verify that the kernel is updated :
modinfo uvcvideo | grep "version:" should include realsense string

echo "source ~/camera/devel/setup.bash" >> ~/.bashrc

Camera Calibration

# package ws_d435i 
$ roslaunch camera_calibration camera_calibration.launch
$ rosrun camera_calibration cameracalibrator.py --size 7x6 --square 0.01 image:=/camera/rgb/image_raw camera:=/camera/rgb # 新建终端并不要source
$ rosrun camera_calibration camera_calibration 
# 结果在/tmp 文件夹下

Test Camera

# package ws_d435i 
$ roslaunch realsense2_description view_d435_model_rviz_gazebo.launch
$ roslaunch mrobot_teleop mrobot_teleop.launch # 小车控制
# 显示目标检测结果,与预测框中心点距离(realsense2_description下脚本)
$ python3 test.py # 结束时用ctrl+z并用kill -9 [pid]清除内存

$ rostopic echo /camera/color/image_raw --noarr
  • 目前深度图与颜色图的配准由直接修改颜色图视角广度完成
  • 所有图的分辨率均为1280 X 720