test_recipe_handler.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:openag_brain 作者: OpenAgInitiative 项目源码 文件源码
def call_service(service_name, result_msg, result_value, *args):
        # Add leading slash to service_name. ROS qualifies all services with a
        # leading slash.
        # Find the class that ROS autogenerates from srv files that is associated
        # with this service.
        ServiceClass = rosservice.get_service_class_by_name(service_name)
        rospy.wait_for_service(service_name, 1)
        service_proxy = rospy.ServiceProxy(service_name, ServiceClass)
        res = service_proxy(*args)
        print(service_name)
        print("-----------######-------------")
        print(res)
        assert getattr(res, "success", result_value)
        #assert res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号