About AttachedCollisionObject
Hi everyone,
Just a quick question,
If you want add two or three attached objects into a scenery, You must to do this?:
arm_navigation_msgs::AttachedCollisionObject pieza1_object;
pieza1_object.link_name = "r_gripper_r_finger_tip_link";
...
pieza1_object.object.operation.operation = arm_navigation_msgs::CollisionObjectOperation::ADD;
...
pieza1_object.object.header.frame_id = "odom_combined"; //Referencia origen
pieza1_object.object.header.stamp = ros::Time::now();
...
pieza1_object.object.shapes.push_back(pieza1S);
pieza1_object.object.poses.push_back(pieza1P);
//
**att_object_in_map_pub_.publish(pieza1_object);** //ADD into scenary
//
pieza1_object.object.operation.operation = arm_navigation_msgs::CollisionObjectOperation::DETACH_AND_ADD_AS_OBJECT;
**att_object_in_map_pub_.publish(pieza1_object);** // Change the state
arm_navigation_msgs::AttachedCollisionObject pieza2_object;
pieza2_object.link_name = "r_gripper_r_finger_tip_link";
...
...
**att_object_in_map_pub_.publish(pieza1_object);** //ADD into scenary
//
pieza2_object.object.operation.operation = arm_navigation_msgs::CollisionObjectOperation::DETACH_AND_ADD_AS_OBJECT;
**att_object_in_map_pub_.publish(pieza2_object);** // Change the state
And following this question,
Is it necessary to do:
if(!get_planning_scene_client.call(planning_scene_req, planning_scene_res)) {
ROS_WARN("Can't get planning scene");
return -1;
}
After every object state modification?
Regards.