crash when sending custom array from websocket to ros2
tal-grossman opened this issue · 1 comments
Issue Description:
I am able to send any msg type including custom srtuct with array (sequence accroding to yaml) from ros2 to websocket but integration service crashes when sending from websocket to ros2.
How To reproduce:
- setup ros2 and websocket environment according to https://integration-service.docs.eprosima.com/en/latest/examples/different_protocols/pubsub/ros2-websocket.html
- build custom msg and create mix file using
colcon build --cmake-args -DMIX_ROS2_PACKAGES="client_interface_msgs"
- create custom struct accorting to yaml_config guide and self exploration and try and error. see yaml configuration below.
- run
integration-service RoboxClientInterface.yaml
- use node-red as websocket client and publish to (localhost) ros2 same custom msg.
Expected Result:
receiving custom struct as ros2 msg from websocket client.
Actual Result:
integration service crashers with this terminal msg:
[Integration Service][INFO] [is::sh::WebSocket::Server] Sent publication on topic 'robox_to_client': [[ {"msg":{"request":"test","theta":"","values":[{"key":"test_key","value":"test_value"},{"key":"test_kekey2","value":"test_value2"}],"x":"","y":""},"op":"publish","topic":"robox_to_client"} ]] [Integration Service][INFO] [is::sh::WebSocket::Server] Handle TCP message from connection '1': [[ {"op":"publish","topic":"robox_to_client","msg":{"request":"test","theta":"","values":[{"key":"test_key","value":"test_value"},{"key":"test_kekey2","value":"test_value2"}],"x":"","y":""}} ]] terminate called after throwing an instance of 'eprosima::is::json_xtypes::UnsupportedType' what(): Aborted (core dumped)
Yaml file (RoboxClientInterface.yaml): yaml_file
ros2 custom msg package (cient_interface_msgs): client_interface_msgs_package
Additional Information
- when sending same msg from ros2 termial to websocket client (node-red in my case), its working. example:
ros2 topic pub /robox_to_client client_interface_msgs/msg/RoboxClientInterface '{request: "test", values: [{key: "test_key", value: "test_value"}, {key: "test_kekey2", value: "test_value2"}]}'
and from node-red side got:
{"msg":{"request":"test","theta":"","values":[{"key":"test_key","value":"test_value"},{"key":"test_kekey2","value":"test_value2"}],"x":"","y":""},"op":"publish","topic":"robox_to_client"} - Versions:
Integration service: 812b14e
ROS-SH: 8f6e0e1ed1a20e2ee6f20c56e29bd8d325f7048b
Websocket-SH: 436c8ddf52768f49b5f8a74a3453a437c962bbb0
libwebsocketpp-dev: 0.8.1-7
Im using on my local enviorment
Good morning, I am closing this since it is duplicated. From now on, all the issues will be opened just in this main repository, to make it easier for us to track and solve them. Thanks!