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
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 201
- Forks
- 111
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 10
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el fallo notificado de ros2 run micro_ros_setup build_firmware.sh y el entorno de Python de ESP32 en firmware/toolchain/espressif/python_env/idf4.1_py3.8_env. Verifica el error em.BUFFERED_OPT y los pasos de instalación de Empy indicados, y determina después dónde debería documentarse esta solución alternativa; se considera terminado cuando las instrucciones de compilación del firmware cubren claramente el error y la recuperación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system, embedded-iot
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100