Skip to content

Cannot ping agent from client using Ethernet UDP transport #1072

@adityakamath

Description

@adityakamath

I've been trying to ping the micro-ROS agent from my Arduino Portenta over Ethernet using rmw_uros_ping_agent() as described here. Here's the code snippet:

rmw_ret_t ping_result = rmw_uros_ping_agent(timeout_ms, attempts);

if (RMW_RET_OK == ping_result)
{
    // micro-ROS Agent is reachable
    ...
}
else
{
    // micro-ROS Agent is not available
    ...
}

the ping_result is never OK and always enters the else condition. I only see this issue with the Ethernet (UDP) transport, it works as expected with Serial and Wifi (UDP) transports. Has anyone tried this with the Ethernet transport (with or without the Portenta)? I'm not sure if it is a SW issue or something wrong with my network configuration. Pub/Sub and services work over ethernet, just the ping does not.

  • Hardware description: Arduino Portenta H7
  • RTOS: -
  • Installation type: micro_ros_arduino, and this reconnection example
  • Version or commit hash: galactic

Steps to reproduce the issue

This Reconnection example. The set_microros_transports() in the setup is replaced with this:

byte arduino_mac[] = {0x01, 0xAB, 0x23, 0xCD, 0x45, 0xEF};
IPAddress arduino_ip(192, 168, 1, 109);
IPAddress agent_ip(192, 168, 1, 100);
set_microros_native_ethernet_udp_transports(arduino_mac, arduino_ip, agent_ip, 8888);

Expected behavior

Solid LED when the ping is successful to indicate that the agent is connected

Actual behavior

Flashing LED (error loop) as the ping function does not return OK

Additional information

I've been meaning to try this with the Teensy 4.1 + Ethernet to see if that works, but that transport is not officially tested/supported yet.
Update: With #1065 closed, I tried this on the Teensy 4.1 with Ethernet and it works.

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