What does marker.lifetime = rospy.Duration() do?
Simple question :
What effect does marker.lifetime = rospy.Duration()
have to a marker?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Simple question :
What effect does marker.lifetime = rospy.Duration()
have to a marker?
As it is stated in the msg definition:
"How long the object should last before being automatically deleted. 0 means forever"
Basically is the amount of time the marker will last.
Consider the following piece of code -
ros::Publisher vis_pub = nh.advertise<visualization_msgs::Marker>( "visualization_markers", 10 );
vis_pub.publish(marker);
Since the above mentioned bit of code is not inside a while
loop ( while (ros::ok()) { .... publish ... } )
, the publisher
would publish
just once on the topic viualisation_markers
.
Assume that the marker
object has the lifetime
attribute set to 0
. Would that mean that Rviz
would continue to display the marker?
@skpro19 Indeed, One thing is the publishing time and another thing is the life time of the marker displayed on Rviz. Basically, in the hypothetical case you proposed, even if the marker is published once, Rviz will continue displaying the same marker with the same state, until you force a marker deletion, GUI Reset or clean the topic (by enabling/disabling the topic with the check mark), in that cases the marker item will be recycled by Rviz by deleting it from screen.
Asked: 2020-02-22 07:22:20 -0500
Seen: 1,669 times
Last updated: Feb 22 '20
Setting octomap resolution doesn't work
Wheels have no transform to base_link - Real robot
Display pose in RViz with custom pose msg
Sending waypoints to navigation stack
How to Visualize the turtlebot path?
Import .obj .mtl and .png into Gazebo [closed]
Ackermann Steering and Arduino Servo Control
difference between execute_cb and goalcb?