micro-ROS / micro-ROS/micro_ros_platformio

Micro-ROS timer not working on my esp32 board/toolchain

オープン
#120 コメント 15 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
334
フォーク
111
PR マージ指標
30日以内にマージされた PR はありません

説明

Hey! I have some issues getting the micro-ROS timers working on my ESP32, from the micro-ROS publisher example for platformIO: [https://github.com/micro-ROS/micro_ros_platformio/tree/main/examples/micro-ros_publisher](https://github.com/micro-ROS/micro_ros_platformio/tree/main/examples/micro-ros_publisher).

I understand that the supported boards for ESP32 are the `esp32dev` with the `espressif32` platform. Unfortunately, due to the drivers for the servos I am trying to run, I am forced to configure my platformIO environment with the `nodemcu-32s` board and the `espressif32@2.0.0` platform (I am unable to read or write to the bus servos without this). Hence, my environment setup in my platformio.ini file is the following:

```
[env:nodemcu-32s]
platform = espressif32@2.0.0
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
lib_deps =
madhephaestus/lx16a-servo@^0.9.3
https://github.com/micro-ROS/micro_ros_platformio
board_microros_distro = humble
board_microros_transport = serial
```

when it should be:
```
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
madhephaestus/lx16a-servo@^0.9.3
https://github.com/micro-ROS/micro_ros_platformio
board_microros_distro = humble
board_microros_transport = serial
```

I intend to use the timers to publish the servo positions at a set rate.

- Hardware description: ESP32dev board (ESP32 devkitC), Ubuntu 22.04 on WSL
- Installation type: ROS2 Humble Hawksbill installed using [https://docs.ros.org/en/humble/Installation.html](https://docs.ros.org/en/humble/Installation.html) and microROS installed as per [https://micro.ros.org/docs/tutorials/core/teensy_with_arduino/](https://micro.ros.org/docs/tutorials/core/teensy_with_arduino/).
- Version or commit hash: humble

I have been able to create regular publishers and subscribers that work, but I am unable to use the timers. When I run the ros agent with the platformIO setup as first shown, the timer publisher topic appears, but does not publish (it never enters the timer callback). However when I run the micro-ros agent with the environment set up as in the second instance, the publisher topic both appears and contents are published to the topic.

It appears as though it is an issue with the board setting i.e. `board = nodemcu-32s` or `board = esp32dev` in the .ini file, since when I alter the platform, without altering the board setting, the publisher still does not give the expected outcome. However, I am unable to use `board = esp32dev` since the toolchain/platform I require (espressif32@2.0.0) is not available for this board.

Is there something I can perhaps change in the header files, or at a lower level to get timer functionality working on the older board and platform?

Help would be greatly appreciated.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

examples/micro-ros_publisher の例から始め、issue に記載されている 2 つの platformio.ini 環境を比較します。nodemcu-32s ボードと espressif32@2.0.0 を使ってタイマーの動作を再現し、その後タイマーコールバックが実行されるかどうかを確認します。esp32dev 構成の場合と同じようにタイマーがパブリッシュすれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
arduino
領域
embedded-iot, robotics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。