# Velodyne 相關紀錄與議題

## Connect to VLP-16 by ethenet

### 預設連接方式

1. 先點網路連線的符號
2. 編輯連線
3. 新增有線網路
4. 選擇裝置下拉，點選連接 VLP-16 的網卡MAC
5. 點選 IPv4 設定IP 改成手動
6. 新增地址： 192.168.1.77
7. 確定即新增完畢
8. 斷線再點選啟動新連線
9. Browser 打 192.168.1.201 即可進入

   **tips:如果LiDAR IP是192.168.0.1(範例),則電腦IP也需要設為192.168.0.X**

### **硬體設定注意事項**

![VLP-16 setting page](/files/-LXOJcHR8Z3fHxnQOm69)

Host IP Address 要對齊到電腦的網卡IP , 同時必須設定在跟Sensor **同網域之下 (192.168."0".X)**

Sensor 的 IP 可以隨意設定，但是Gateway 也要在**同網域之下**

### Velodyne 尋找連接 IP

1. 安裝 wireshark  `sudo apt-get install wireshark`
2. 啟用 wireshark，看封包資訊
3. 尋找封包資訊指定的目標 IP

## Velodyne 節點意義

參考資料： Ros wiki package: Velodyne (<http://wiki.ros.org/velodyne_pointcloud>)

### CloudNodelet

Subscribed Topics:   **velodyne\_packets(velodyne\_msgs/VelodyneScan)**

Published Topics: **velodyne\_points(sensor\_msgs/PointCloud2)**

## Subcriber vs Publisher 議題

### CMakeList.txt

#### ISSUE: undefined reference to \`pcl::console::print(pcl::console::VERBOSITY\_LEVEL, char const\*, ...)

```bash
# solution:
target_link_libraries(subSensorPC2_to_pubPCLPCXYZI ${PCL_LIBRARIES} ${catkin_LIBRARIES})
# 需要把 ${PCL_LIBRARIES} 放在最前面
```

#### 啟動 lidTopPub

```bash
roslaunch velodyne_pointclound hino_front_vlp32c.launch
rosrun lidar_grabber_hino lidTopPub
rosrun display_hino display_hino   #宗賢a視覺化
rosrun rviz rviz -f 
```

## Velodyne MAKE ISSUE

#### ISSUE:  No Package Call yaml-cpp, pcl-ros, tf, angles, jsk\_recognition-msgs....

```bash
#solution: install Velodyne code dependencies
sudo apt-get install -y libyaml-cpp-dev ros-kinetic-pcl-ros ros-kinetic-pcl-conversions ros-kinetic-angles ros-kinetic-tf ros-kinetic-diagnostic-updater ros-kinetic-jsk-recognition-msgs
```

#### ISSSUE: Can't Find PCL

```bash
#edit CMakeList and add below line.
# /opt/pcl/1.9.0/share/pcl-1.9/ should be the pcl installed path.
set(PCL_DIR "/opt/pcl/1.9.0/share/pcl-1.9/")
```

**ISSUE: /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to \`drmGetDevices2' ....**

**ref:** [**https://devtalk.nvidia.com/default/topic/1044109/jetson-agx-xavier/no-usr-lib-aarch64-linux-gnu-tegra-libgl-so-0-with-jetpack-4-4-1/**](https://devtalk.nvidia.com/default/topic/1044109/jetson-agx-xavier/no-usr-lib-aarch64-linux-gnu-tegra-libgl-so-0-with-jetpack-4-4-1/)

```bash
#not sure now
sudo rm /usr/lib/aarch64-linux-gnu/libdrm.so.2
sudo -H ln -s /usr/lib/aarch64-linux-gnu/libdrm.so /usr/lib/aarch64-linux-gnu/libdrm.so.2
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mikechan0731.gitbook.io/workspace/self_driving_lidar/velodyne-xiang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
