---
# System prepended metadata

title: Common Troubleshooting
tags: [troubleshooting]

---

###### tags: `troubleshooting`
[TOC]
# Common Troubleshooting

### SSH 
::: warning 
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
:::

```$ ssh-keygen -R <trouble_IP>```

### cakin_make problem
::: warning
``` =bash
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PythonInterp: Found unsuitable version "1.4", but required
  is at least "2" (found /home/pi2/test_catkin_ws/build/python3)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindPythonInterp.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /opt/ros/melodic/share/catkin/cmake/python.cmake:4 (find_package)
  /opt/ros/melodic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:56 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi2/test_catkin_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed
```
:::

1. 將 workspace 底下的 `devel` `build` 資料夾刪掉
2. 用`catkin_make` 別用 `catkin_make -DPYTHON_EXECUTABLE=python3`

### ROS 互相連線連不上
#### 確保連到同一個網域底下
1. IP 可以透過輸入 ifconfig 去查看
2. 同網域代表開頭都會是 192.168.X.X
3. 也可以嘗試去終端機輸入 ``` $ ping 別人的IP``` 看看收不收的到
#### 修改環境變數
1. ```$ vim ~/.bashrc```
2. **到最下面加上這三句**
```
$ export ROS_MASTER_URI=http:// **有開roscore電腦的IP**:11311
$ export ROS_HOSTNAME=**自己的IP**
$ export ROS_IP=**自己的IP**   
```
