pre-requisite is to install paho mqtt client like this: pip install paho-mqtt
- in ros2_mqtt/config/param.yaml file - replace 192.168.1.123 with ip address of where you are running mqtt broker [your computer]
- in esp32/boot.py - update SSID and PWD for your wifi
- in esp32/main.py - replace IP_ADDR_OF_MQTT_BROKER with your mqtt broker ip address [same as ####1]
colcon build
ros2 launch ros2_mqtt ros2_mqtt.launch.py
ros2 topic echo /cmd_vel
mosquitto_sub -v -t 'esp32/cmd_vel'
sudo systemctl stop snap.mosquitto.mosquitto.service sudo systemctl start snap.mosquitto.mosquitto.service