Robotics StackExchange | Archived questions

ROS2 disables local shmem

Environment:

Reproduction:

Observation: Looking at the code of node.cpp:

  // forces local traffic to be sent over loopback,
  // even if a more efficient transport (such as shared memory) is installed
  // (in which case traffic will be sent over both transports)
  status = DDS::PropertyQosPolicyHelper::add_property(
    participant_qos.property,
    "dds.transport.UDPv4.builtin.ignore_loopback_interface",
    "0",
    DDS::BOOLEAN_FALSE);
  if (status != DDS::RETCODE_OK) {
    RMW_SET_ERROR_MSG("failed to add qos property");
    return NULL;
  }
  status = DDS::PropertyQosPolicyHelper::add_property(
    participant_qos.property,
    "dds.transport.use_510_compatible_locator_kinds",
    "1",
    DDS::BOOLEAN_FALSE);
  if (status != DDS::RETCODE_OK) {
    RMW_SET_ERROR_MSG("failed to add qos property");
    return NULL;
  }

It seems that the ROS2 codebase is intentionally disabling shmem according to the comment. In Admin console, I observe that the ROS2 participants are not considering shmem as an available defaultunicastlocator.

Side node: I'm able to relate the code above directly to the disabling of shmem, I only observe the comment and the bevahior...

Questions:

Asked by qootec on 2019-09-09 08:08:05 UTC

Comments

Answers