ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The reason is if one of the value of x,y,z if is NAN than all other markers becomes invisible also, so u should first check the values of x,y,z it should not be NAN than u can easily send any number of marker as u want as in this example:

if(!isnan(x[i].data) && !isnan(y[i].data) && !isnan(z[i].data)) {
p.x = x[i].data; p.y=y[i].data; p.z=z[i].data; std::cout<<i&lt;<std::endl; points.points.push_back(p);="" marker_pub.publish(points);="" <="" p="">

The reason is if one of the value of x,y,z if is NAN than all other markers becomes invisible also, so u should first check the values of x,y,z it should not be NAN than u can easily send any number of marker as u want as in this example:

 if(!isnan(x[i].data) && !isnan(y[i].data) && !isnan(z[i].data))  { 
p.x = x[i].data; p.y=y[i].data; p.z=z[i].data; std::cout<<i&lt;<std::endl; points.points.push_back(p);="" marker_pub.publish(points);="" <="" p="">

std::cout<<i<<std::endl; points.points.push_back(p); marker_pub.publish(points);