Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to invoque a service if MicroRos agent is compiled with -DRMW_UXRCE_CREATION_MODE=refs #1789

Open
jpgarduino opened this issue Jun 17, 2024 · 0 comments

Comments

@jpgarduino
Copy link

Hardware description: Portenta H7
Installation type:github,linux command line
Version or commit hash: humble

I use MicroRos to communicate a Portenta H7 with ROS2 Humble in a Ubuntu 22.04 PC. Portenta H7 has subscrivers and publisers and, also, request to services that are hosted in the PC.

If MicroRos Agent is compiled WITHOUT "-DRMW_UXRCE_CREATION_MODE=refs" option, system works as expected. But if agent is compiled WITH "-DRMW_UXRCE_CREATION_MODE=refs" option, Portenta is unable to perform request to any service. Publishers and subscribers work correctly in this scenerario.

Agent is launched with this command line:

ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 --middleware dds -v6 ROS_DOMAIN_ID=$ros_domain_id -r /root/TestServices/custom_qos_test.refs

The content of custom_qos_test.refs file is:

<profiles>
    <participant profile_name="participant_profile">
        <rtps>
            <name>default_xrce_participant</name>
        </rtps>
    </participant>

    <!-- QOS for TestInt32 (RELIABLE) -->
    <topic profile_name="TestInt32__t">
        <name>rt/TestInt32</name>
        <dataType>std_msgs::msg::dds_::Int32_</dataType>
        <historyQos>
          <kind>KEEP_LAST</kind>
          <depth>5</depth>
        </historyQos>
    </topic>

    <data_writer profile_name="TestInt32__dw">
        <historyMemoryPolicy>PREALLOCATED_WITH_REALLOC</historyMemoryPolicy>
        <qos>
          <reliability>
            <kind>RELIABLE</kind>
          </reliability>
          <durability>
            <kind>VOLATILE</kind>
          </durability>
        </qos>
        <topic>
            <kind>NO_KEY</kind>
            <name>rt/TestInt32</name>
            <dataType>std_msgs::msg::dds_::Int32_</dataType>
            <historyQos>
                <kind>KEEP_LAST</kind>
                <depth>5</depth>
            </historyQos>
        </topic>
    </data_writer>

    <requester profile_name="TestService_requester"
               service_name="/TestService"
               request_type="mss_types::srv::dds_::SetPose_Request_"
               reply_type="mss_types::srv::dds_::SetPose_Response_">
    </requester>


    <replier profile_name="TestService_replier"
             service_name="/TestService"
             request_type="mss_types::srv::dds_::SetPose_Request_"
             reply_type="mss_types::srv::dds_::SetPose_Response_">
    </replier>

</profiles>

The problem ocurrs as soon portenta tries to send the request of the service:

image

In fact, when the error occurs, the data of frame shown in the agent is the following:

image

Translating the hex code to ASCII, the result is:

�����r����d<dds><requester profile_name="0_7" service_name="/TestService" request_type="mss_types::srv::dds_::�

  • The name of the service is "TestService" and it is available:

image

  • The request type is "mss_types__srv__SetPose_Request" (mss_types::srv::SetPose)
  • The response type is "mss_types__srv__SetPose_Response" (mss_types::srv::SetPose)

I don't know if it is a problem with .refs file configuration, but the problem seems to be limited to the services:

  • How services must be configured in .refs file?
  • The frame shown in the agent seems to be incompleted (always 124 bytes len even if the name of the service changes), is this normal?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant