ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The problem could be in this line:
h = rospy.Header()
Header
belongs to std_msgs, and it's already being imported in from std_msgs.msg import Header, Float32
. Try this instead:
h = Header()
h.stamp = rospy.Time.now()
2 | No.2 Revision |
The problem could be in this line:
line:h =
rospy.Header()rospy.Header()
Header
belongs to std_msgs, and it's already being imported in from std_msgs.msg import Header, Float32
. Try this instead:
h = Header()
h.stamp = rospy.Time.now()
3 | No.3 Revision |
The problem could be in this line: h = rospy.Header()
Header
belongs to std_msgs, and it's already being imported in from std_msgs.msg import Header, Float32
. Try this instead:
h = Header()
h.stamp = rospy.Time.now()
(check out the accepted answer to What is the proper way to create a Header with python?)