marker causes rviz to be slower with time
Hi all,
Since I have upgraded to hydro in raring, I notice that rviz becomes slower for some marker types. I notice this specifically for CUBE_LIST and SPHERE_LIST. LINE_LIST does not have a problem. I am not sending more data over time. Rviz initially starts with 30fps and then slows down and hangs with time. I do not see any substantial memory leak. When I untick and tick the marker in rviz, the speed returns to 30fps and then slows down again with time.
Following is what I publish:
visualization_msgs::Marker marker;
marker.header.frame_id = "/planner_frame";
marker.header.stamp = ros::Time::now();
marker.ns = "path";
marker.type = visualization_msgs::Marker::SPHERE_LIST;
marker.action = visualization_msgs::Marker::ADD;
marker.scale.x = ROBOT_RADIUS*2.0;
marker.scale.y = ROBOT_RADIUS*2.0;
marker.scale.z = ROBOT_RADIUS*2.0;
geometry_msgs::Point pos;
std_msgs::ColorRGBA color;
for(unsigned int i=0; i<allRobots.size(); i++) {
pos.x=allRobots[i].pose.position.x; pos.y=allRobots[i].pose.position.y; pos.z=allRobots[i].pose.position.z;
marker.points.push_back(pos);
color.a=0.8; color.r=1.0f; color.g=0.0f; color.b=0.0f;
marker.colors.push_back(color);
}
pRobotMarker.publish(marker);
the publisher is declared as:
pDeadRobotMarker = n.advertise<visualization_msgs::Marker>("robot_marker", 1);