You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Required Info:
I'm using microROS for my STM32 board and attempting to use services. The issue I'm getting on the MCU side is that deserializing the string type of a service request results in an error where the string length exceeds the capacity of the buffer, which is defaulting to 0 (erroring here).
I've verified that UDP traffic is working correctly. So I can only suspect that the host side is incorrectly converting service requests either in the RMW or the agent, not too sure how to confirm so input here would be great.
For my env, I use CycloneDDS and micro-ros-agent to handle bridging traffic between DDSes, but since the agent is built on top of FastDDS, service interoperability does not work directly. To workaround this, I send the raw data through a socket that pipes to a FastDDS node that communicates to the agent exclusively. This works perfectly for service requests that don't involve a string type in its request.
A good note to mention is that I've tried this in a rmw_fastrtps_cpp environment and the error persists, so it's not an interoperability issue.
Running my firmware through a debugger shows that it casts the appropriate service request typesupport onto the incoming ros_message once a service request is found, but capacity of the string type is always 0. Here's the generated typesupport code:
My understanding could be wrong, but udr_deserialize_sequence_char uses ros_message->data.capacity to copy the appropriate amount of the input buffer cdr to ros_message. Here, ros_message->data.capacity is 0, udr_deserialize_sequence_char fails, rv is false and therefore causes an executor error.
Viewing the cdr buffer, I can see that the string I pass through is correct, including its length (+ null terminator), but ros_message attributes are incorrect.
I'm lost on where the buffer capacity property is set, but I'm hoping this is a user error and not an error from RMW.
Operating System:
Ubuntu 20.04
Installation type:
binary
Version or commit hash:
humble
DDS implementation:
FastDDS -> MicroXRCE-DDS
Client library (if applicable):
rclpy (host), rclc (MCU)
Steps to reproduce issue
Make a service server on the MCU side, takes in a service request that has a string type
Start micro-ros-agent and connect to MCU
Call service from host
Expected behavior
The service server properly reads the request and handles appropriately
Actual behavior
Executor fails when deserializing the request
Additional information
Feature request
Feature description
Implementation considerations
The text was updated successfully, but these errors were encountered:
Bug report
Required Info:
I'm using microROS for my STM32 board and attempting to use services. The issue I'm getting on the MCU side is that deserializing the string type of a service request results in an error where the string length exceeds the capacity of the buffer, which is defaulting to 0 (erroring here).
I've verified that UDP traffic is working correctly. So I can only suspect that the host side is incorrectly converting service requests either in the RMW or the agent, not too sure how to confirm so input here would be great.
For my env, I use CycloneDDS and
micro-ros-agent
to handle bridging traffic between DDSes, but since the agent is built on top of FastDDS, service interoperability does not work directly. To workaround this, I send the raw data through a socket that pipes to a FastDDS node that communicates to the agent exclusively. This works perfectly for service requests that don't involve a string type in its request.A good note to mention is that I've tried this in a
rmw_fastrtps_cpp
environment and the error persists, so it's not an interoperability issue.Running my firmware through a debugger shows that it casts the appropriate service request typesupport onto the incoming ros_message once a service request is found, but capacity of the string type is always 0. Here's the generated typesupport code:
My understanding could be wrong, but
udr_deserialize_sequence_char
usesros_message->data.capacity
to copy the appropriate amount of the input buffercdr
toros_message
. Here,ros_message->data.capacity
is 0,udr_deserialize_sequence_char
fails,rv
is false and therefore causes an executor error.Viewing the cdr buffer, I can see that the string I pass through is correct, including its length (+ null terminator), but
ros_message
attributes are incorrect.I'm lost on where the buffer capacity property is set, but I'm hoping this is a user error and not an error from RMW.
Steps to reproduce issue
micro-ros-agent
and connect to MCUExpected behavior
The service server properly reads the request and handles appropriately
Actual behavior
Executor fails when deserializing the request
Additional information
Feature request
Feature description
Implementation considerations
The text was updated successfully, but these errors were encountered: