ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The issue is on the following line from your original code:
self.robotMarker.lifetime = 0
If you look at the definition of a visualization_msgs/Marker message, you'll see that the lifetime
field is of type "duration" which is a built-in type that needs to be a rospy.Duration
instance in Python (see here). In the line of code above, you are setting the value to an integer which is incorrect. That is what causes the
AttributeError: 'int' object has no attribute 'secs'
line in your output log.
2 | No.2 Revision |
The issue is on the following line from your original code:
self.robotMarker.lifetime = 0
If you look at the definition of a visualization_msgs/Marker message, you'll see that the lifetime
field is of type "duration" which is a built-in type that needs to be a rospy.Duration
instance in Python (see here). In the line of code above, you are setting the value to an integer which is incorrect. That is what causes the
AttributeError: 'int' object has no attribute 'secs'
line in your output log.
Edit
You could change the line to something like
self.robotMarker.lifetime = rospy.Duration(0)