当前位置 博文首页 > bug】rospy.init_node() has already been called with differen

    bug】rospy.init_node() has already been called with differen

    作者:[db:作者] 时间:2021-08-12 11:55

    1. Bug

    rospy.init_node() has already been called with different arguments
    

    2. 原因

    一个 python 文件中只能初始化一个节点。
    我在一个 python 文件中导入了另一个 module,在另一个 module 中的类的初始化函数中存在一个:

    rospy.init_node()
    

    在调用这个类时,这与 main 函数所在的 python 文件中的 rospy.init_node() 冲突。

    3. 解决方法

    我删除了 module 中的 rospy.init_node(),成功!

    cs