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

未关闭
#232 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
python

调研方向

从报告的 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 内容生成。

描述

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
主要语言
C++
星标
201
派生
111
平均合并
1 天 6 小时
30 天内合并 PR
10

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

micro-ROS/micro-ROS-Agent 的其他 Issue

查看 micro-ROS/micro-ROS-Agent 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。