# Husky Gazebo in ROS melodic ###### tags: `husky` ## ROS install Husky ==setup== ```bash= cd ~/catkin_ws/src ***% comment your catkin workspace name here is mine is (catkin_ws)*** git clone https://github.com/husky/husky.git git checkout melodic-devel cd .. catkin_make sudo apt-get install ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-ros-control sudo apt-get install ros-melodic-multimaster-launch sudo apt-get install ros-melodic-lms1xx rosdep install --from-path src --ignore-src catkin_make source devel/setup.bash rosrun husky_bringup install ``` ==setting priority for port== ```bash= sudo chmod 777 /dev/ttyUSB0 sudo usermod -a -G dialout [username] ``` ## install NCRL_lio ### Prerequisites 1.ceres 2.PCL ### 安裝ceres 注意 須下載1.14.0版本,可在官方github切換版本。 官網:http://ceres-solver.org/installation.html ```bash= git clone https://ceres-solver.googlesource.com/ceres-solver git checkout 1.14.0 # CMake sudo apt-get install cmake # google-glog + gflags sudo apt-get install libgoogle-glog-dev libgflags-dev # BLAS & LAPACK sudo apt-get install libatlas-base-dev # Eigen3 sudo apt-get install libeigen3-dev # SuiteSparse and CXSparse (optional) sudo apt-get install libsuitesparse-dev mkdir ceres-bin cd ceres-bin cmake ../ceres-solver make -j3 sudo make test # Optionally install Ceres, it can also be exported using CMake which # allows Ceres to be used without requiring installation, see the documentation # for the EXPORT_BUILD_DIR option for more information. sudo make install ``` ### 安裝PCL 注意 須下載1.8.1版本以上,可在官方github切換版本。 ```bash= git clone https://github.com/PointCloudLibrary/pcl.git git checkout pcl-1.8.1 #安裝以下第三方程式 sudo apt-get update sudo apt-get install git build-essential linux-libc-dev sudo apt-get install cmake cmake-gui sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev sudo apt-get install mpi-default-dev openmpi-bin openmpi-common sudo apt-get install libflann1.8 libflann-dev sudo apt-get install libeigen3-dev sudo apt-get install libboost-all-dev sudo apt-get install libvtk6-dev sudo apt-get install libqhull* libgtest-dev sudo apt-get install freeglut3-dev pkg-config sudo apt-get install libxmu-dev libxi-dev sudo apt-get install mono-complete sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre sudo apt-get install libflann-dev #進行編譯 cd pcl mkdir release cd release cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_GPU=ON-DBUILD_apps=ON -DBUILD_examples=ON \ -DCMAKE_INSTALL_PREFIX=/usr .. make -j6 sudo make install ``` ### install ncrl_lio ```bash= cd catkin_ws/src git clone https://github.com/SLAM-NCRL/ncrl_lio.git catkin_make ``` * 修改ncrl_lio/config/run.yaml 將31到33行參數,修改內容為IMU到Lidar的x,y,z距離 * 修改ncrl_lio/launch/run.launch 將第6行<param name="use_sim_time" value="true"/> 更改為<param name="use_sim_time" value="false"/> ### husky environment zip file https://drive.google.com/file/d/1ZRI-Iw7IH_lxUSuEQClzHniOZuDOWwtR/view?usp=share_link ## Lidar CBF https://drive.google.com/drive/folders/1ZDg2DRIfGyazI1B08HJ-O5g57nBw-2iS?usp=share_link ### run CBF ```bash= cd catkin_ws/src rosrun Lidar-CBF cbf.py ```