Follow https://www.vultr.com/docs/install-mosquitto-mqtt-broker-on-ubuntu-20-04-server/
Make IP open for everyone
$ cd /etc/mosquitto
$ vim mosquitto.conf
# 修改完後,重起服務
$ sudo systemctl status mosquitto
For Linux : $ sudo apt-get install docker.io
For Rpi : $ curl -fsSL https://get.docker.com/ | sh
# 打完下面這行要logout
$ sudo usermod -aG docker ${使用者名稱}
$ cd
# download repo for docker usage
$ git clone https://github.com/leeandy0822/ncrl_mqtt.git
$ cd ncrl_mqtt
# run docker
$ source docker_run.sh
#catkin_make and load env parameters
$ source env.sh
$ roscd mqtt_client
$ cd launch
$ vim params.yaml
$ roslaunch mqtt_client standalone.launch
ROS Input | MQTT | ROS_Output |
---|---|---|
/ping/ros | /pingpong/ros | /pong/ros |
/ping/primitive | /pingpong/primitive | /pong/primitive |
$ cd /etc/mosquito
# 新增一個 password file
$ sudo mosquitto_passwd -c <password file name> <name>
# example
$ sudo mosquitto_passwd -c password ncqq
# 打密碼和確認密碼(這裡設定ee405423)
$ vim password
# username:log
$ sudo service mosquitto restart
$ cd ws/src/mqtt_client/launch
$ vim params.yaml
# 在 broker 下面新增 user: 和 pass:
# 帳號密碼要與上面password file 一致
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing