ros2 / rmw_iceoryx

rmw implementation for iceoryx
Apache License 2.0
144 stars 27 forks source link

Issues running iRobot performance test #29

Closed mauropasse closed 4 years ago

mauropasse commented 4 years ago

Hello, I took some time to run some ROS2 multi-process benchmarks with the iRobot performance framework using rmw_iceoryx and I run into a couple of issues. The idea is testing the shared memory capabilities for multi-processes runing in the same machine.

The basic system is based on 2 processes: Process 1: Node 1:

Process 2: Node 2:

Where topic could be any message type.

Issue 1 When the "topic" is a stamped_vector message, I get

terminate called after throwing an instance of 'std::runtime_error'
what(): failed to compare gids: rmw_iceoryx_cpp does not support gids., at /root/iceoryx_ws/src/rmw_iceoryx/rmw_iceoryx_cpp/src/rmw_compare_guids_equal.cpp:33
Aborted (core dumped)

So the first question is, are you planning to implement the rmw_compare_guids_equal anytime soon?

Issue 2 When the "topic" is other than stamped_vector message, I get

terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 7)
Aborted (core dumped)

I don't have any of this problems when using the other existing ROS2 middlewares

The topologies I used are: Issue 1 Process 1

{
  "nodes": [
      {
        "node_name": "publisher_node",
        "publishers": [
              {"topic_name": "topic", "msg_type": "stamped_vector","msg_size":1000, "freq_hz": 10}
            ],
        "subscribers": [
              {"topic_name": "topic", "msg_type": "stamped_vector"}
            ]
      }
    ]
}

Process 2

{
  "nodes": [
      {
        "node_name": "subscriber_node",
        "subscribers": [
              {"topic_name": "topic", "msg_type": "stamped_vector"}
            ]
      }
    ]
}

Issue 2

Process 1

{
  "nodes": [
      {
        "node_name": "publisher_node",
        "publishers": [
              {"topic_name": "topic", "msg_type": "stamped10kb", "freq_hz": 10}
            ],
        "subscribers": [
              {"topic_name": "topic", "msg_type": "stamped10kb"}
            ]
      }
    ]
}

Process 2

{
  "nodes": [
      {
        "node_name": "subscriber_node",
        "subscribers": [
              {"topic_name": "topic", "msg_type": "stamped10kb"}
            ]
      }
    ]
}

Thanks for your time!

mauropasse commented 4 years ago

For issue 1, just read that: ..in order to enable a true zero copy data transport we have to limit ourselves to fixed size data structures. For issue 2, it looks more an issue of the performance framework than something related to rmw_iceoryx Closing this now

budrus commented 4 years ago

Regarding issue 1: This could be implemented quickly. There is already a unique ID in iceoryx. So far I had no ROS example where the compare guid was used. So I was wondering if this is currently needed.

For doing true zero-copy there is this fixed size data constraint. But if it is not fixed size rmw_iceoryx should serialize the data. So it does a copy but the goal is that all data types are supported