micro-ROS / micro-ROS/micro-ROS-Agent
instruction for solving issue with this error : " AttributeError: module 'em' has no attribute 'BUFFERED_OPT' when building firmware for esp32 on udp transfering
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 201
- Forks
- 111
- Merge moyen
- 1 j 6 h
- PR mergées (30 j)
- 10
Description
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:
- 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
- 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__)"
- Update setuptools and wheel:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/pip3 install --upgrade setuptools wheel
- Clean your micro-ROS workspace:
cd ~/microros_ws
rm -rf build install log
- Rebuild the workspace:
colcon build --symlink-install
- Source the setup file:
source install/local_setup.bash
- Try building the firmware again:
ros2 run micro_ros_setup build_firmware.sh
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par l’échec signalé de ros2 run micro_ros_setup build_firmware.sh et l’environnement Python d’ESP32 situé dans firmware/toolchain/espressif/python_env/idf4.1_py3.8_env. Vérifiez l’erreur em.BUFFERED_OPT et les étapes d’installation d’Empy indiquées, puis déterminez où cette solution de contournement devrait être documentée ; le travail est terminé lorsque les instructions de compilation du firmware couvrent clairement l’erreur et la récupération.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- build-system, embedded-iot
- Type d'issue
- Documentation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100