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
還沒有人認領這個 Issue。
- 主要語言
- C++
- 星號
- 201
- 分支
- 111
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 10
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從回報的 ros2 run micro_ros_setup build_firmware.sh 失敗以及位於 firmware/toolchain/espressif/python_env/idf4.1_py3.8_env 的 ESP32 Python 環境開始。確認 em.BUFFERED_OPT 錯誤和列出的 Empy 安裝步驟,然後判斷應在哪裡記錄此替代方案;完成的標準是韌體建置說明清楚涵蓋該錯誤及復原方法。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- build-system, embedded-iot
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100