micro-ROS/micro_ros_espidf_component

freertos_int32_publisher stops publishing after a few ros2 topic echo

Closed this issue · 2 comments

int32_publisher or freertos_int32_publisher stops publishing after a few ros2 topic echo

  • Hardware description: M5Core2
  • RTOS: FreeRTOS
  • Installation type: RTPS
  • Version or commit hash: a2bab46 (same with older versions)

Steps to reproduce the issue

  • On the ESP32, I run the publisher. It publishes (writes "publishing: xxx")
  • On the PC side (docker ros:humble, I use ros2 topic echo --no-daemon /freertos_int32_publisher (same with --no-daemon), let it run for a while, then kill it, then run, etc.

Expected behavior

  • we should be able to see the published data

Actual behavior

  • after a few kills, the topic does not exist anymore.
root@talos-dev3:/# ros2 topic list
/freertos_int32_publisher
/parameter_events
/rosout
root@talos-dev3:/# ros2 topic echo --no-daemon /freertos_int32_publisher
data: 35
---
data: 36
---
data: 37
---
data: 38
---
data: 39
---
data: 40
---
data: 41
---
data: 42
---
^Croot@talos-dev3:/# ros2 topic echo --no-daemon /freertos_int32_publisher
data: 41
---
data: 42
---
data: 43
---
data: 44
---
data: 45
---
data: 46
---
data: 47
---
data: 48
---
data: 49
---
data: 50
---
^Croot@talos-dev3:/# ros2 topic echo --no-daemon /freertos_int32_publisher
data: 44
---
data: 46
---
data: 47
---
data: 48
---
data: 49
---
data: 50
---
data: 51
---
data: 53
---
data: 54
---
^Croot@talos-dev3:/# ros2 topic echo --no-daemon /freertos_int32_publisher
data: 53
---
data: 54
---
data: 55
---
data: 56
---
data: 57
---
data: 58
---
data: 59
---
^Croot@talos-dev3:/# ros2 topic echo --no-daemon /freertos_int32_publisher
WARNING: topic [/freertos_int32_publisher] does not appear to be published yet
Could not determine the type for the passed topic

The ESP32 node continues to publish (it continues to write Publishing: xxx every second --- it is not crashed or stuck in a loop).

It works again after a reset of the ESP32.

Additional information

root@talos-dev3:/# ros2 topic info -v   /freertos_int32_publisher
Type: std_msgs/msg/Int32

Publisher count: 1

Node name: _CREATED_BY_BARE_DDS_APP_
Node namespace: _CREATED_BY_BARE_DDS_APP_
Topic type: std_msgs/msg/Int32
Endpoint type: PUBLISHER
GID: df.bf.2a.3f.0d.ce.89.48.ee.2d.31.00.00.00.01.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RELIABLE
  History (Depth): UNKNOWN
  Durability: TRANSIENT_LOCAL
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Subscription count: 0
root@talos-dev3:/# ros2 topic info -v --no-daemon  /freertos_int32_publisher
Unknown topic '/freertos_int32_publisher'

FYI, I do not get the same behavior with the XRCE_DDS middleware (but this requires an agent... so it's much less convenient: we need to dedicate a PC with wifi etc for the agent).

Hello @jbmouret , we are not providing active support on this feature because this middleware is experimentally integrated into micro-ROS. Maybe you can find more information and answers in the official repo of the middleware: https://github.com/embedded-software-laboratory/embeddedRTPS