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 -0600
Seen: 2,152 times
Last updated: Feb 22 '20
How to visualize surface normals as Marker::Arrow for each point in rviz?
Corrected Odometry from GMapping / Karto?
Visualizing continuous and revolute joint types in rviz
How to add Kinect sensor input to a URDF model?
Has there been progress for URDF transform jitter in RVIZ?
Starting rviz, failed to initialize ogre, cannot find RenderSystem_GL.so
rviz installation issues on 64bit snow-leopard using ROS Diamondback
pioneer 3dx simulation using rviz and stage
How can I visualize covariance data using ROS tools?
std_msgs/ColorRGBA[].displaying different color for each point