T265 source code download and case experiment (this person successfully ran the pose routine in realsense to obtain location data!)

This person successfully ran the pose routine in realsense and got the position data!

Retrieved from: https://blog.csdn.net/qq_44465763/article/details/108617812

T265 learning road (2) ---T265 source code download and case experiment

BIU Survival Song ~ 2020-09-18 11:20:23 22 Collect

Category column: T265 learning road Article tags: linux ubuntu

copyright

1. T265 source download

After installing Realsense_viewer for testing, you need to read sensor data according to different needs. If you want to get started with T265, the interpretation and use of the source code is the fastest and most efficient learning method, so first download the source code from Github, and check the source code. Example for case study.

1. T265 source download

First, open the terminal and enter the download command to automatically link the source code on Github, but the following problems occurred during the next process.

git clone https://github.com/IntelRealSense/librealsense.git
  • 1

Download in Ubuntu terminal

1.1 Download
on the Window system. If you log in to the github under the window system to download the source code, there will be packet loss. Some files will be lost during the download process. The specific cause of this problem is currently unknown, but I feel it should be related to the network. Please friends After downloading the source code, I found that all files can be downloaded by using the external network over the wall.
1.2 Downloading
on Ubuntu system There are also problems with downloading through terminal on ubuntu system. The specific reason is not detailed. Therefore, for the T265 source code, I directly copied the data downloaded by a friend and used it under the Ubuntu system.
The problem with the Ubuntu download is as follows:
Source code download error
Re-download the source code in the terminal, and the download was successful this time. If the download fails for the first time , you can try to download again. The test is valid : The
The second download was successfuldownloaded T265 source code package is as follows:

T265 source code package

2. Compile the source code

The source code package is a CMake project, which is compiled by compiling the CMake project . Open the terminal and enter the command
in the source code package path :

mkdir build
  • 1
cd build
  • 1
cmake ..
  • 1
make
  • 1

The steps and process are as follows:
Insert picture description here
Insert picture description here
ps: If the case in the example cannot be run after compiling, you can delete the build file and create a new one and recompile

PS: If the source code package is placed in the src directory in the ROS workspace, it needs to be compiled separately from the ROS function package through the catkin_make_isolated command

2. T265 source code example implementation

There are many examples in the librealsense/build/examples folder. Take pose as an example:
first open the terminal** under the path **~/librealsense/build/examples/pose, and then enter the command in the terminal:

./rs-pose
  • 1

Then the terminal will input the X, Y, and Z coordinates of the current camera relative to the initial position.

Problem encountered:
no service connection is displayed after running the pose file

Solution:
1. Need to use USB3.0 cable and interface.

You can use the command lsusb to view the current Usb link situation

lsusb
  • 1

The result is as shown:
Insert picture description here

2. There is a problem with code compilation: re-create the build file, and then recompile, the problem is solved

The final result is as shown in the figure. The terminal will print out the position of the camera, but only the position data at the current time. Later, you can consider inputting the data collected at all times:
Insert picture description here

Summary: After working
for many days, the test equipment could not read the camera data. I finally succeeded today. However, there is a problem that some build/example cases cannot run, which may be caused by software problems; in addition, the cases in realsense/example Unable to run, the reason is still under investigation.

Thank you very much blogger jmaosheng for your patient answers during this process. Part of the steps are followed by this blogger’s blog. Thanks again! :) The
link is as follows:
jmaosheng blogger link

Guess you like

Origin blog.csdn.net/sinat_16643223/article/details/108892799