Created
December 8, 2018 13:37
-
-
Save TheProjectsGuy/fbdc61c8d7ced7df0b9dfdd0b10e1ff7 to your computer and use it in GitHub Desktop.
Debugger node made using Python which prints all message levels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
if __name__ == "__main__": | |
# Initialize the node | |
rospy.init_node("Debugger_Python", anonymous=True) | |
# Rate of 2 times a second (2 Hz) | |
rateHandler = rospy.Rate(2) | |
while (not rospy.is_shutdown()): | |
# Print all kinds of debugger messages | |
rospy.logdebug("This is a debug message") | |
rospy.loginfo("This is an info message") | |
rospy.logwarn("This is a warning message") | |
rospy.logerr("This is an error message") | |
rospy.logfatal("This is a fatal message") | |
# Cause the delay to satisfy rate | |
rateHandler.sleep() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment