スキップしてメイン コンテンツに移動

SC-A-LOAM install (ROS noetic)

#SC-A-LOAM
https://github.com/gisbi-kim/SC-A-LOAM

hpc@hpc-ubuntu:~$ mkdir -p ~/catkin_sc_a_loam/src
hpc@hpc-ubuntu:~/catkin_sc_a_loam$ cd ~/catkin_sc_a_loam/src/
hpc@hpc-ubuntu:~/catkin_sc_a_loam/src$ git clone https://github.com/gisbi-kim/SC-A-LOAM
Cloning into 'SC-A-LOAM'...
remote: Enumerating objects: 239, done.
remote: Total 239 (delta 0), reused 0 (delta 0), pack-reused 239
Receiving objects: 100% (239/239), 46.07 MiB | 13.42 MiB/s, done.
Resolving deltas: 100% (88/88), done.
hpc@hpc-ubuntu:~/catkin_sc_a_loam/src$ cd ../
hpc@hpc-ubuntu:~/catkin_sc_a_loam$ catkin_make

 /home/hpc/catkin_sc_a_loam/src/SC-A-LOAM/src/scanRegistration.cpp:44:10: fatal error: opencv/cv.h: No such file or directory
   44 | #include <opencv/cv.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

/home/hpc/catkin_sc_a_loam/src/SC-A-LOAM/src/kittiHelper.cpp:91:64: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
   91 |         cv::Mat left_image = cv::imread(left_image_path.str(), CV_LOAD_IMAGE_GRAYSCALE);
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~

make: *** [Makefile:141: all] Error 2
Invoking "make -j14 -l14" failed


reference: https://wenda.ncnynl.com/question/116482

src/kittiHelper.cpp:91-95

//cv::Mat left_image = cv::imread(left_image_path.str(), CV_LOAD_IMAGE_GRAYSCALE);
cv::Mat left_image = cv::imread(left_image_path.str(), cv::IMREAD_GRAYSCALE);
right_image_path << dataset_folder << "sequences/" + sequence_number + "/image_1/" << std::setfill('0') << std::setw(6) << line_num << ".png";
//cv::Mat right_image = cv::imread(left_image_path.str(), CV_LOAD_IMAGE_GRAYSCALE);
cv::Mat right_image = cv::imread(left_image_path.str(), cv::IMREAD_GRAYSCALE);


reference: https://github.com/ethz-asl/image_undistort/issues/68

src/scanRegistration.cpp:44

//#include <opencv/cv.h>
#include <opencv2/core.hpp>

 

 [100%] Linking CXX executable /home/hpc/catkin_sc_a_loam/devel/lib/aloam_velodyne/kittiHelper
[100%] Built target kittiHelper


hpc@hpc-ubuntu:~/catkin_sc_a_loam$ source devel/setup.bash
hpc@hpc-ubuntu:~/catkin_sc_a_loam$ roslaunch aloam_velodyne aloam_custom.launch 

rm: cannot remove '/Scans/': No such file or directory
mkdir: cannot create directory ‘/Scans/’: Permission denied
rm: cannot remove '/SCDs/': No such file or directory
mkdir: cannot create directory ‘/SCDs/’: Permission denied
Initialization finished
[ WARN] [1664158342.481403106]: time Map corner and surf num are not enough
posegraph prior node 0 added
terminate called after throwing an instance of 'pcl::IOException'
  what():  : [pcl::PCDWriter::writeBinary] Error during open!

[alaserPGO-4] process has died [pid 37974, exit code -6, cmd /home/hpc/catkin_sc_a_loam/devel/lib/aloam_velodyne/alaserPGO /velodyne_points:=/velodyne_points __name:=alaserPGO __log:=/home/hpc/.ros/log/a5801d3c-3d40-11ed-b53e-2dc9e9051f41/alaserPGO-4.log].
log file: /home/hpc/.ros/log/a5801d3c-3d40-11ed-b53e-2dc9e9051f41/alaserPGO-4*.log
[alaserMapping-3] process has died [pid 37969, exit code -11, cmd /home/hpc/catkin_sc_a_loam/devel/lib/aloam_velodyne/alaserMapping /velodyne_points:=/velodyne_points __name:=alaserMapping __log:=/home/hpc/.ros/log/a5801d3c-3d40-11ed-b53e-2dc9e9051f41/alaserMapping-3.log].
log file: /home/hpc/.ros/log/a5801d3c-3d40-11ed-b53e-2dc9e9051f41/alaserMapping-3*.log

hpc@hpc-ubuntu:~$ rqt





コメント

このブログの人気の投稿

[참고] ROS kinetic에서 WebCam 사용하기 (Ubuntu 16.04)

Reference: 1. https://github.com/bosch-ros-pkg/usb_cam/issues/53  2. http://zumashi.blogspot.jp/2016/12/ros-kinetic-usb-cam.html  3. http://cafe.naver.com/openrt/5963 위의 사이트들을 참고하여 ROS Kinetic에서 Logitech WebCam C270의 동작을 확인했습니다. $ cd ~/catkin_ws/src $ git clone https://github.com/bosch-ros-pkg/usb-cam.git $ cd .. $ catkin_make WebCam test $ roscore $ rosrun usb_cam usb_cam_node $ rosrun image_view image_view image:=/usb_cam/image_raw $ rosrun rviz rviz 1) By display type>rviz>image 2) Image topic: /usb_cam/image_raw --> 왼쪽 하단과 같이 WebCam이 잘 동작하는 것을 확인했습니다.

[vscode] TImeout waiting for debugger connection

이제까지 잘 동작하던 비주얼 스튜디오 코드가 위와 같은 에러 메세지를 내면서 갑자기 디버깅이 안되서 인터넷을 검색한 결과.. vscode의 User Setting에서 검색창에 python.terminal.activateEnvironment을 입력하여 true로 설정되어 있는 값을 false로 변환하면 된다. 

Anaconda을 이용하여 ROS + Tensorflow 함께 사용하기

-- CUDA, cuDNN 버전확인 https://stackoverflow.com/questions/41714757/how-to-find-cuda-version-in-ubuntu/42122965 $ nvcc --version cuda8.0, cudnn6.0 -- 아나콘다 python2.7 버전 인스톨 https://www.anaconda.com/download/#linux python3.x이랑 ROS 같이 써보려고 했는데, 아직 실력이 부족해서 그런지 실패.. $ bash Anaconda2-5.3.0-Linux-x86_64.sh $ source ~/.bashrc $ python -V Python 2.7.15 :: Anaconda, Inc. $ conda create -n tf14 pip python=2.7 $ source activate tf14 -- ROS 관련 패키지 인스톨 (tf14) $ pip install --upgrade pip (tf14) $ pip install -U rosinstall msgpack empy defusedxml netifaces --CUDA, cuDNN, CPU/GPU을 사양에 맞춰서 tensorflow download https://github.com/mind/wheels#mkl (tf14) $ pip install tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl 잘 설치가 되었는지 Hello, tensorflow 실행 (tf14) $ python Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> i