ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

See the rospy logging overview page for more details.

You can use

number = 5
rospy.loginfo("%d", number)
rospy.logwarn("%d", number)

If you run your Python node from a launch file you need to put output="screen" inside the node tag to see info messages.