Skip to content

micro-ROS publisher always printing "dat:0" on ROS2 echo instead of the updated values #423

@PrakruthiJP

Description

@PrakruthiJP

MAIN.C 6.txt

I am working on a micro-ROS example on a TRAVEO™ T2G MCU using a custom UART transport. The code is based on the "data

MAIN.C 6.txt

" style micro-ROS publisher/subscriber example, but I have modified it slightly.

Here is the situation:

  1. I have a publisher that is supposed to send an integer value (std_msgs/msg/Int32) periodically using a ROS timer.

  2. I am running ros2 topic echo /traveo_publisher on the host PC to see the published messages this will give value never changes to from 0 . it is publishing periodically but within same incorrect value.

  3. I am successfully connecting to the ROS 2 agent (no connection error), and I do see messages being published.

  4. However, the message always shows data: 0 instead of the value I expect (for example 123 or incrementing numbers).

  5. The value does not update continuously as I move around in my code or directory — it just stays the same in ROS 2 echo output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions