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
Service call invokes bad allocation when called from a separate docker container #2133
Comments
I think this is the same related to #1698. Have you tried the suggestions there? I see that you were on that discussion too. |
I do not think this is related because I can communicate with the containers. I had opened it when I used a Windows host but this is not the case now. With my setup I have communication between containers - I can see and echo all of the topics and I have some simple services (for example Trigger.srv http://docs.ros.org/en/melodic/api/std_srvs/html/srv/Trigger.html) that work fine. |
Some questions:
Also, make sure that you have |
Hello thanks for the answers but I have made it work without passing the strings. When switching to cyclone the strings are also passed properly. |
I also just noticed that there was some message type missmatch, and that may have caused the entire problem. |
I have created a service (custom) that receives a custom message and runs in a ros2 node using fast-DDS. The node is running in a docker container and every time I call the service from the same container it works fine. Whenever I call it from a different container the node crushes with std::bad_alloc.
System information
Custom messages and service:
Service: SendPath.srv
Message: AnnotatedPath.msg
Message: Node.msg
Message: Edge.msg
Container arguments:
From docker-compose:
If I call the service from within this container the message goes through and I get a response. This is how I construct the message:
I can also call it with adding the "edges" field:
docker run -it --rm --net host --pid host -v /dev/shm:/dev/shm my_container
This container has my custom interfaces:
and I can see it in the service list:
and then I call it in the same way and I get:
What I notice is inside
build/capra_ros_path_msgs/rosidl_typesupport_fastrtps_cpp/capra_ros_path_msgs/msg/detail/dds_fastrtpsannotated_path__type_support.cpp
inside the edges field of my custom message the size is overflowed. But when I call the service from the same container it is 0 (which is correct since I do not fill that field).
The text was updated successfully, but these errors were encountered: