The micro_ros_agent does not relay topic messages

Open
#175 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, docker

Research direction

Reproduce both ordering scenarios with the galactic micro-ROS Agent Docker command, teleop_twist_keyboard, and the micro_ros_subscriber_twist.ino and micro_ros_publisher.ino examples. Start by comparing agent behavior and logs when the MCU program starts before or after publishing; done means the expected messages are reliably delivered in both documented scenarios, or the expected limitation is clearly documented.

Written by the indexing model from the issue text.

Description

Describe the bug

Hi, I tried this example micro-ros_subscriber_twist using UDP on STM32F407 (Ethernet), but the micro_ros_agent only relays the message to MCU if

[Normal]
Step 1: Start the agent
Step 2: Start the program on MCU
Step 3: Publish the twist message (keep publishing)

Twist messages received.

If I exchange step 2 with step 3, I cannot receive the message on MCU:

[BUG]
Step 1: Start the agent
Step 2: Publish the twist message (keep publishing)
Step 3: Start the program on MCU

No Twist messages.

I'm wondering is this an expected behavior or a BUG?

Besides, the micro-ros_publisher.ino example cannot receive the int32 message under both scenarios.

To Reproduce

Scenario 1 (BUG):

$ Step 1: Start the agent
$ docker run -it -p 9999:9999/udp --privileged microros/micro-ros-agent:galactic udp4 -p 9999 -v 6

$ Step 2: Publish the twist message
$ docker container -it sleepy_rubin /bin/bash
$ # Inside the container
$ ros2 run teleop_twist_keyboard teleop_twist_keyboard 

$ Step 3: Start the program on MCU
$ micro_ros_sub twist

# No twist message on MCU

Scenario 1 (Normal):

$ Step 1: Start the agent
$ docker run -it -p 9999:9999/udp --privileged microros/micro-ros-agent:galactic udp4 -p 9999 -v 6

$ Step 2: Start the program on MCU
$ micro_ros_sub twist

$ Step 3: Publish the twist message
$ docker container -it sleepy_rubin /bin/bash
$ # Inside the container
$ ros2 run teleop_twist_keyboard teleop_twist_keyboard 

# Normal twist message on MCU
Dominant language
C++
Stars
201
Forks
111
Avg merge
1d 6h
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micro-ROS/micro-ROS-Agent

All issues in micro-ROS/micro-ROS-Agent

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.