Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rospy.core.is_initialized() is False after rospy.init_node() #2334

Open
kosei1515 opened this issue Jun 29, 2023 · 0 comments
Open

rospy.core.is_initialized() is False after rospy.init_node() #2334

kosei1515 opened this issue Jun 29, 2023 · 0 comments

Comments

@kosei1515
Copy link

kosei1515 commented Jun 29, 2023

I found that after rospy.init_node(), rospy.core.is_initialized() still returns False.
However, in the function rospy.init_node, there is the process of rospy.core.set_initialized(True) here
I'm not sure why this problem is happening. Please use the following test code to check this error.

from mock import patch
from nose.tools import eq_
import rospy

@patch('rospy.init_node')
def test_rospy_core_is_initialized(init_mock):
    """Test rospy.core.is_initialized()"""    
    eq_(rospy.core.is_initialized(), False)    
    rospy.init_node("test_node")
    eq_(rospy.core.is_initialized(), True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant