# ECBF+LiDAR ###### tags: `ECBF` ## github github : https://github.com/WangMahua/ecbf_lidar.git author : 王盈驊 environment : Ubuntu18.04 / ros melodic branch : `$ git checkout qp_python_srv` ## previous work - PX4 + MAVROS安裝 https://hackmd.io/kNrweQwCTQWVQbYihZkGeg?view ## related package ### 請先下載下列函式庫 - osqp 下載網站(按照Build the binaries那邊開始下載): [https://osqp.org/docs/get_started/sources.html](https://) > 如果想直接使用此package請在home下創立/OSQP資料夾並將檔案 git clone在該資料夾 - open3d 下載命令: `pip install open3d` 遇到跟"egg.info"相關的錯可以輸入以下兩行: >`sudo python -m pip install --upgrade --force pip` >`sudo pip install setuptools==33.1.1` - cvxopt 下載命令: `sudo apt update` `sudo apt install python-cvxopt` - ros_numpy 下載命令: `sudo apt-get install ros-melodic-ros-numpy` ## run #### 1. simulation on px4+gazebo `roslaunch ecbf_lidar simulation.launch` #### 2. run on ncrl-flight control `roslaunch ecbf_lidar simulation.launch` ## problem shooting #### 1.roslaunch 後發現lidar周遭並沒有出現藍色圈 ![](https://i.imgur.com/KWrbPBX.png) ```! sol: 到PX4的檔案裡,在 Tools/sitl_gazebo/models/rplidar 中打開model.sdf,並將有gpu的字樣都刪除,如下圖所示: ``` ![](https://i.imgur.com/5v9XEVu.png=50%x) ```! 正確模擬狀況應如附圖: ``` ![](https://i.imgur.com/slu2paV.png=50%x) #### 2.time factor 低於1 ```! sol: 調整gazebo中,Physics的real time update為0,如下圖所示: ``` ![](https://i.imgur.com/CG6gsOG.png) #### 3.無法include ecbf_lidar/qp.h ```! source ~/<your_ws>/devel/setup.bash ```