ApexAI / performance_test

**This project is deprecated** Go to https://gitlab.com/ApexAI/performance_test
64 stars 41 forks source link

Failed to run peer-to-peer with dashing #66

Open LanderU opened 5 years ago

LanderU commented 5 years ago

Hello!

We're facing some issues after the update of the code for dashing. We're not able to run the code using the instructions of the README.md:

ros2 run performance_test perf_test -c ROS2 -t Array1k --roundtrip_mode Main #One machine
ros2 run performance_test perf_test -c ROS2 -t Array1k --roundtrip_mode Relay #Second machine

Error log:

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'Unknown QoS Liveliness policy, at /home/erle/ros2_ws_dashing/src/ros2/rmw_fastrtps/rmw_fastrtps_shared_cpp/src/qos.cpp:127'

with this new error message:

  'failed to get datawriter qos, at /home/erle/ros2_ws_dashing/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  could not create publisher: failed to get datawriter qos, at /home/erle/ros2_ws_dashing/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_publisher.cpp:163, at /home/erle/ros2_ws_dashing/src/ros2/rcl/rcl/src/rcl/publisher.c:171

We think the error is here:

Looking as example of demos:

Let me know if this make sense for you, or we're doing something wrong.

Thanks in advance!

esteve commented 5 years ago

@LanderU thanks for the report. Do you happen to have a regression test for this issue? If not, it's ok, I'll write one, it's just for not duplicating work.

LanderU commented 5 years ago

Do you happen to have a regression test for this issue?

No, we don't have any test. We just compile against dashing and run the performance_test as we did with crystal.

esteve commented 5 years ago

No, we don't have any test. We just compile against dashing and run the performance_test as we did with crystal.

No problem, I'll add one to have it run by the CI.

abilbaotm commented 5 years ago

Hey, I have just reproduce this issue and I have the same issue. Any update?

esteve commented 5 years ago

@abilbaotm no updates, I just got back from traveling. I'll be working on a test soon.

deeplearningrobotics commented 5 years ago

@esteve: Do you need help with this?

esteve commented 5 years ago

@deeplearningrobotics could you have a look at https://github.com/ApexAI/performance_test/pull/68 and figure out how to get launch_testing running for performance_test? I'd like the CI to show the error and ensure we don't have a regression once it's all fixed.

I'm currently focused on Autoware and don't have time for performance_test.

Thanks.

dejanpan commented 5 years ago

@pbaughman could you help @esteve here write the integration test?

@MiguelCompany you would know why we get the Unknown QoS Liveliness policy, no?

MiguelCompany commented 5 years ago

@MiguelCompany you would know why we get the Unknown QoS Liveliness policy, no?

I think that, as @LanderU pointed out, the issue may be in https://github.com/ApexAI/performance_test/blob/master/performance_test/src/communication_abstractions/ros2_callback_communicator.hpp#L46

As there new fields were added on dashing for that struct, they may get randomly initialized. I think the issue may be solved by changing that line to rmw_qos_profile_t ros_qos = rmw_qos_profile_default;

pbaughman commented 5 years ago

@dejanpan are you talking about PR #68? The issue is almost certainly that there are no 'active' tests that run. The launch description is going to be shut down as soon as its launched because no tests are set to run concurrently with the launched processes - possibly before either of the processes under test finish starting up.

A good fix would be to add an 'active' test that uses one of the 'wait' assertions to make sure whatever is supposed to happen happens. Maybe some stdout, or monitor a ROS topic or wait for a process to terminate or something else.