Realsense driver installation
Native environment
Native environment: Ubuntu18.04+ROS Melodic
Install Realsense-SDK
1. Download realsense-lib
git clone https://github.com/IntelRealSense/librealsense
cd librealsense
2. Install realsense dependencies
sudo apt-get install libudev-dev pkg-config libgtk-3-dev libusb-1.0-0-dev pkg-config libglfw3-dev libssl-dev
3. Install permission script
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
4. Compile and install
mkdir build
cd build
cmake ../ -DBUILD_EXAMPLES=true
make -j8
sudo make install
Note: The parameters of make -j8 can be changed according to the number of cores in your computer. The larger the value, the faster the compilation. Also note that I stepped on a pit myself and followed other tutorials to run patch-realsense-ubuntu-lts.sh to compile the kernel and let me download a big thing, but I still hang the agent at 20KB/S. This led me to give up directly, and later found that this step does not need to be executed and has no effect.
5. Test
cd to the librealsense/build/examples/capture directory to execute:
./rs_capture
You can view the effect.
Install Realsense-ROS
1. Create a new workspace
mkdir -p ~/catkin_realsense/src
cd ~/catkin_realsense/src
catkin_init_workspace
cd ..
catkin_make
2. Download the Realsense-ROS feature pack
cd ~/catkin_realsense/src
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ..
catkin_make
source devel/setup.bash
After compiling and adding environment variables, run the following command to open the camera test:
roslaunch realsense2_camera demo_pointcloud.launch
At this time, the camera is opened, and then open a terminal, run rostopic list to view related topics