micropython-rosserial install on ESP32-CAM

Install micropython-rosserial on ESP32-CAM it is very easy.

The easy way is install it with upip. It requires internet access. So before we install the micropython-rosserial on ESP32-CAM, we need to connect it to the internet.

The full procedure is this one:

1 – Connect the computer to the ESP32-CAM via the FTDI USB-Serial interface.

2 – Access to the MicroPython console with a terminal software, or with the pyMakr vscode extension.

3 – Connect to the internet

On MicroPython console input the following commands

import network
wlan = network.WLAN(network.STA_IF)
wlan.connect('ssid', 'password')

The last statement only gets the ip config, and show us in the terminal. Ex:

>>> wlan.ifconfig()
('', '', '', '')

4 – Install the micropython-rosserial module and dependencies

import upip

The success message sample is something like the following one.

Installing to: /lib/
Warning: micropython.org SSL certificate is not validated
Installing micropython-rosserial 0.2.7 from https://files.pythonhosted.org/packages/39/ff/9f04ae38d6245d8c0d63b3c6fa052d87088038c2e12748c811e1196e56e4/micropython-rosserial-0.2.7.tar.gz
Installing micropython-genpy 0.0.6 from https://files.pythonhosted.org/packages/b0/eb/24c691b2cfb95c638da4c95585437b2009fb0baa0a3c8bca0791fdf34188/micropython-genpy-0.0.6.tar.gz
Installing micropython-rosserial-msgs 0.0.1 from https://files.pythonhosted.org/packages/e5/4d/cd3f085dab632d499bc256e0d50c2a180adf2c43ae008efabeaa1a292fa5/micropython-rosserial_msgs-0.0.1.tar.gz
Installing micropython-logging 0.3 from https://micropython.org/pi/logging/logging-0.3.tar.gz

After we may check the contents of the lib folder

import os
['logging.py', 'rosserial_msgs', 'ugenpy', 'uros']

The installation is done.

Lets explore it!