Deadlock / missed messages in launch test.

Đang mở
#648 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện trường hợp TestRobotConductor được cung cấp bằng colcon test và pytest, sau đó so sánh với việc chạy test dưới dạng script. Theo dõi việc chờ của executor.spin_until_future_complete và các lệnh gọi service trong conductor.collect_calibration_data; được xem là hoàn tất khi launch test không còn bị deadlock hoặc bỏ lỡ message và future hoàn tất một cách đáng tin cậy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04.1 LTS
  • Installation type:
    • Binaries
  • Version or commit hash:
    • ros:humble-ros-core-jammy docker image
  • DDS implementation:
    • Fast DDS.
  • Client library (if applicable):
    • rclpy
Steps to reproduce issue

Below is the test I am tying to run. I also have a generate_test_description section which spins up 4 other nodes. When I run my test with colcon test and pytest, the test runs for a while but eventually fails when a future does not finish (using executor.spin_until_future_complete). However, if I bring up all the other nodes manually and then run the below test as a script, everything always works as expected. As far as I can tell, the conductor.collect_calibration_data function below, which makes a bunch of service calls, sends a request that is never received by the server, or never receives a response from the server that appear to have been sent.

class TestRobotConductor(unittest.TestCase):
    def setUp(self):
        rclpy.init()
        self.node = rclpy.create_node("test_robot_conductor")
        self.executor = rclpy.executors.MultiThreadedExecutor()
        self.executor.add_node(self.node)
        self.executor_thread = threading.Thread(target=self.executor.spin, daemon=True)
        self.executor_thread.start()
        self.cam_cal_client = CamCalClient(self.node, self.executor)

    def tearDown(self):
        self.node.destroy_node()
        self.executor.shutdown()
        rclpy.shutdown()

    def test_robot_conductor(self):
        self.cam_cal_client.wait_for_services(timeout_sec=5.0)
        conductor = RobotConductor(self.cam_cal_client)
        conductor.collect_calibration_data()
        response = conductor.execute_cal()
Ngôn ngữ chính
Python
Star
156
Fork
200
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ros2/launch

Tất cả issue của ros2/launch

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.