git clone https://github.com/gaoxiang12/ORBSLAM2_with_pointcloud_map.git
git clone https://github.com/wylnii/ORBSLAM2_with_pointcloud_map.git
替换原包中的ORB_SLAM2_modified文件夹下的所有文件
cd eigen-eigen-b9cd8366d4e8
mkdir build
cd build
cmake ..
make
sudo make install
cd g2o_with_orbslam2
mkdir build
cmake ..
make
sudo make install
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
make
sudo make install
cd ORB_SLAM2_modified/
rm -rf Thirdparty/DBoW2/build/
rm -rf Thirdparty/g2o/build/
find_package(OpenCV 3.0 QUIET)
# find_package(OpenCV 3.0 QUIET)
# if(NOT OpenCV_FOUND)
# find_package(OpenCV 2.4.3 QUIET)
# if(NOT OpenCV_FOUND)
# message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
# endif()
# endif()
echo "Configuring and building Thirdparty/DBoW2 ..."
cd Thirdparty/DBoW2
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
cd ../../g2o
echo "Configuring and building Thirdparty/g2o ..."
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
cd ../../../
echo "Uncompress vocabulary ..."
cd Vocabulary
tar -xf ORBvoc.txt.tar.gz
cd ..
echo "Configuring and building ORB_SLAM2 ..."
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
cd ..
echo "Converting vocabulary to binary"
./tools/bin_vocabulary
chmod +x build.sh
./build.sh
find_package(Pangolin REQUIRED)
find_package(PCL 1.7 REQUIRED)
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/../../../
${PROJECT_SOURCE_DIR}/../../../include
${Pangolin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
add_definitions(${PCL_DEFINITIONS})
link_directories(${PCL_LIBRARY_DIRS})
set(LIBS
${OpenCV_LIBS}
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PCL_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
-lboost_system
)
"/camera/color/image_raw";
"/camera/aligned_depth_to_color/image_raw";
echo "Building ROS nodes"
cd Examples/ROS/ORB_SLAM2
mkdir build
cd build
cmake .. -DROS_BUILD_TYPE=Release
make
gedit ~/.bashrc
在最下面添加
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/你的目录/ORB_SLAM2_modified/Examples/ROS
source ~/.bashrc
chmod +x build_ros.sh
./build_ros.sh
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver
Ubuntu 16 LTS:
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
sudo apt-get update
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
mkdir realsense
cd realsense
mkdir src
cd src
git https://github.com/intel-ros/realsense.git
cd ..
catkin_make
source devel/setup.bash
roslaunch realsense2_camera rs_rgbd.launch
rosrun ORB_SLAM2 RGBD Vocabulary/ORBvoc.bin Examples/RGB-D/TUM1.yaml
这里TUM1.yaml是我随便写的,请自行去ORB_SLAM2上下载realsense的yaml