print python same std:cout
I want print in a console in a script of python, i not want use rospy.loginfo or warn. I want something like C ++ cout. Any idea?
Edit 1:
#!/usr/bin/env python
# Software License Agreement (BSD License)
import rospy
import roslib
import tf
import sys
import serial, string, math, time, calendar
if __name__ == '__main__':
rospy.init_node('Compass', anonymous=True)
try:
while not rospy.is_shutdown():
rospy.logwarn("Angulo yaw: %.1f", z_axis_direction * orientation_rad / math.pi * 180.)
print " Print "
sys.stdout.write("stdout")
rospy.loginfo("ros info")
pass
Rospy log warn prints in a console but like a warning message with yellow color. Print and stdout not do anything. And finally rospy log info print in a /rosout topic.
Edit 1: The launch
<!-- Compass nodo of Furuno PG-1000 -->
<launch>
<node name="compass1" pkg="nodos_creados" type="FurunoCompassNode.py" respawn="true">
</node>
</launch>
Are you launching the node using roslaunch? What does your launchfile look like?