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,863 times
Last updated: Feb 22 '20
Importing an STL file into Rviz
differential transmission with ros_canopen, HOW to?
keyboard key teleop not registering movement: Getting started
Building a Visual Robot Model with URDF from Scratch [closed]
how to display robot_pose_ekf/odom_combined in rviz
capturing 12-bit with pylon_camera
unable to open HDF5 filer in rviz