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

Revision history [back]

click to hide/show revision 1
initial version

Hello, I used this code to have the access to the CMVISION's Blobs, I remind you that Blobs is a type of the message that includes another message called Blob, And also in my code I just used the FIRST Blob (which is the bigger one in size) , so you can modify as you want.

This is your callback function.

if (msg1->blob_count > 0){
    // If you want to access to ALL Blobs
    //for (int i = 0; i < msg1->blob_count; i++){

    //This is for the case that you want to catch a Blob with some size limitation.
    //if(msg1->blobs[i].right - msg1->blobs[i].left > 7 || msg1->blobs[i].top - msg1->blobs[i].bottom > 7   )
    //{
        X = msg1->blobs[0].x ;
        Y = msg1->blobs[0].y ;
    //}

    //}

}