micro-ROS publisher always printing "dat:0" on ROS2 echo instead of the updated values #784
Unanswered
PrakruthiJP
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a TRAVEO™ T2G MCU (Infineon) running micro-ROS with a custom UART transport layer.
I have a simple publisher node sending std_msgs/msg/Int32 messages to the ROS 2 agent over UART.
The ROS 2 agent is running on my PC and is connected to the MCU via a serial link.
Environment:
MCU: TRAVEO™ T2G
micro-ROS library: rcl, rclc, rmw_microros
Host: Ubuntu 22.04 with ROS 2 Humble
Transport: Custom UART (shared with printf for debug)
When I run:
ros2 topic echo /traveo_publisher
I do receive messages, but every message shows data: 0 instead of the expected value.
Example output:
data: 0
data: 0
data: 0
The messages are arriving periodically (so the publisher and transport are working).
The value never changes and is always 0.
3. What I Expected
I want to see the integer values that I set in my code, for example:
data: 123
data: 124
data: 125
...
so that the ROS 2 subscriber or ros2 topic echo shows live, updated values from my MCU.
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:
I have a publisher that is supposed to send an integer value (std_msgs/msg/Int32) periodically using a ROS timer.
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.
I am successfully connecting to the ROS 2 agent (no connection error), and I do see messages being published.
However, the message always shows data: 0 instead of the value I expect (for example 123 or incrementing numbers).
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.
Beta Was this translation helpful? Give feedback.
All reactions