ros2 / rmw_fastrtps

Implementation of the ROS Middleware (rmw) Interface using eProsima's Fast RTPS.
Apache License 2.0
157 stars 117 forks source link

Use DataWriter Qos to configure max_blocking_time on rmw_send_response #704

Closed MiguelCompany closed 1 year ago

MiguelCompany commented 1 year ago

This PR enables using the XML profiles to set the maximum time to wait for the client response reader to be ready when sending a response from the service.

It will use the value from the max_blocking_time tag, for which the default value is 100ms.

The following XML would set the timeout to 1 second for all services:

<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
    <profiles>
        <publisher profile_name="service">
            <qos>
                <reliability>
                    <max_blocking_time>
                        <sec>1</sec>
                    </max_blocking_time>
                </reliability>
            </qos>
        </publisher>
    </profiles>
</dds>
fujitatomoya commented 1 year ago

If i understand correctly, this could be work-around to suppress the following issues.

CC: @MiguelCompany

MiguelCompany commented 1 year ago

If i understand correctly, this could be work-around to suppress the following issues.

@fujitatomoya Correct. Nonetheless, we still think the timeout should be handled in the upper layers.

lgtm

I just pushed a commit fixing the linters, so this is ready for a CI

fujitatomoya commented 1 year ago

@MiguelCompany @EduPonz can we backport this to iron and humble? that would be really useful.

fujitatomoya commented 1 year ago

CI:

MiguelCompany commented 1 year ago

can we backport this to iron and humble? that would be really useful.

@fujitatomoya Sure.

fujitatomoya commented 1 year ago

https://ci.ros2.org/job/ci_windows/20001/ is not related to this PR.

fujitatomoya commented 1 year ago

either @Barry-Xu-2018 or @iuhilnehc-ynos can you review this? i would like to have the another review for this.

fujitatomoya commented 1 year ago

@Barry-Xu-2018 @iuhilnehc-ynos friendly ping.

Barry-Xu-2018 commented 1 year ago

LGTM

fujitatomoya commented 1 year ago

@Mergifyio backport humble iron

mergify[bot] commented 1 year ago

backport humble iron

✅ Backports have been created

* [#707 Use DataWriter Qos to configure max_blocking_time on rmw_send_response (backport #704)](https://github.com/ros2/rmw_fastrtps/pull/707) has been created for branch `humble` * [#708 Use DataWriter Qos to configure max_blocking_time on rmw_send_response (backport #704)](https://github.com/ros2/rmw_fastrtps/pull/708) has been created for branch `iron`
ros-discourse commented 2 days ago

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/need-help-with-client-will-not-receive-response/40849/1