micro-ROS / micro-ROS/micro_ros_platformio

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

Ouverte
#120 15 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Python
Étoiles
334
Forks
111
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

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.

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par l’exemple examples/micro-ros_publisher et comparez les deux environnements platformio.ini décrits dans l’issue. Reproduisez le comportement du timer avec la carte nodemcu-32s et espressif32@2.0.0, puis déterminez si le callback du timer s’exécute ; c’est terminé lorsque les timers publient comme avec la configuration esp32dev.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
arduino
Domaine
embedded-iot, robotics
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.