Trigger service call crashes ros_tcp_endpoint Node

未关闭
#390 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, python, unity
领域
api, backend

调研方向

Start by reproducing the ROS2 std_srvs/srv/Trigger call using the reported default_server_endpoint setup. Inspect ros_tcp_endpoint/client.py and service.py around service_call_thread and deserialize_message, then verify that the Trigger service executes successfully without the reported invalid data size error.

由索引模型根据 Issue 内容生成。

描述

Describe the bug
Calling a ROS2 service of type std_srvs/srv/Trigger will crash the default_server_endpoint Node

To Reproduce
Steps to reproduce the behavior:

  1. Start a ROS2 Node that has a service of type std_srvs/srv/Trigger alongside the default_server_endpoint Node.
  2. Register & call said service from a Unity script.

Console logs / stack traces

servo_1  | [default_server_endpoint-4] Exception in thread Thread-4:
servo_1  | [default_server_endpoint-4] Traceback (most recent call last):
servo_1  | [default_server_endpoint-4]   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
servo_1  | [default_server_endpoint-4]     self.run()
servo_1  | [default_server_endpoint-4]   File "/usr/lib/python3.8/threading.py", line 870, in run
servo_1  | [default_server_endpoint-4]     self._target(*self._args, **self._kwargs)
servo_1  | [default_server_endpoint-4]   File "/home/dev_ws/install/ros_tcp_endpoint/lib/python3.8/site-packages/ros_tcp_endpoint/client.py", line 163, in service_call_thread
servo_1  | [default_server_endpoint-4]     response = ros_communicator.send(data)
servo_1  | [default_server_endpoint-4]   File "/home/dev_ws/install/ros_tcp_endpoint/lib/python3.8/site-packages/ros_tcp_endpoint/service.py", line 55, in send
servo_1  | [default_server_endpoint-4]     message = deserialize_message(data, message_type)
servo_1  | [default_server_endpoint-4]   File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/serialization.py", line 42, in deserialize_message
servo_1  | [default_server_endpoint-4]     return _rclpy.rclpy_deserialize(serialized_message, message_type)
servo_1  | [default_server_endpoint-4] rclpy._rclpy_pybind11.RMWError: failed to deserialize ROS message: rmw_serialize: invalid data size, at /tmp/binarydeb/ros-galactic-rmw-cyclonedds-cpp-0.22.6/src/rmw_node.cpp:1536

Expected behavior
The service call executes successfully.

Screenshots
N/A

Environment (please complete the following information, where applicable):

  • Unity Version: Unity 2020.3.18f1
  • Unity machine OS + version: Windows 11
  • ROS machine OS + version: Ubuntu 20.04, ROS2 Galactic (Also fails on Foxy)
  • ROS–Unity communication: Docker
  • Branch or version: ROS2v0.7.0

Additional context
Services of other types work as expected. The ROS2 Node I am using in this example is a MoveIt Servo Node. The service I am trying to call is /servo_node/start_servo.

主要语言
C#
星标
2.6k
派生
473
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Unity-Technologies/Unity-Robotics-Hub 的其他 Issue

查看 Unity-Technologies/Unity-Robotics-Hub 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。