instruction for solving issue with this error : " AttributeError: module 'em' has no attribute 'BUFFERED_OPT' when building firmware for esp32 on udp transfering

Aperta
#232 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia con il fallimento segnalato di ros2 run micro_ros_setup build_firmware.sh e con l’ambiente Python di ESP32 in firmware/toolchain/espressif/python_env/idf4.1_py3.8_env. Verifica l’errore em.BUFFERED_OPT e i passaggi di installazione di Empy elencati, quindi determina dove dovrebbe essere documentata questa soluzione alternativa; il lavoro è completato quando le istruzioni per la compilazione del firmware coprono chiaramente l’errore e il ripristino.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Issue template

  • Hardware description: esp32
  • RTOS: freeRtos
  • Installation type: micro_ros_setup
  • Version or commit hash: version of micro-ROS used: galactic for Ubuntu 20.04
Steps to reproduce the issue

Assuming you have already setup the firmware using ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32 and after proper wifi configuration, when you try to build the firmware for udp transferring using ros2 run micro_ros_setup build_firmware.sh you will most likely get an error which related to the Python environment and the em (Empy) module. The specific error is:

   AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
To resolve this issue, follow these steps:
  1. First, deactivate any active Python virtual environments:
   deactivate

To install empy in the specific Python environment used by the build process, you should use the pip associated with that Python installation. Here's the command to install empy version 3.3.4 in that environment:

~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/pip3 install empy==3.3.4
  1. After that, verify the installation:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/python3 -c "import em; print(em.__file__)"
  1. Update setuptools and wheel:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/pip3 install --upgrade setuptools wheel
  1. Clean your micro-ROS workspace:
cd ~/microros_ws
rm -rf build install log
  1. Rebuild the workspace:
colcon build --symlink-install
  1. Source the setup file:
source install/local_setup.bash
  1. Try building the firmware again:
ros2 run micro_ros_setup build_firmware.sh
Lingua principale
C++
Stelle
201
Fork
111
Merge medio
1g 6h
PR unite (30g)
10

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di micro-ROS/micro-ROS-Agent

Tutte le issue di micro-ROS/micro-ROS-Agent

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.