设置碰撞检测物体的参数
示例
moveit_msgs::CollisionObject cylinder;
cylinder.id="Cylinder";
shape_msg::SolidPrimitive primitive;//用于设置基本形状和属性
primitve.type=primitive.CYLINDER;
primitive.dimensions.resize(3);
primitive.dimensions[0]=0.6;
primitive.dimensions[1]=0.2;
primitive.dimensions[2]=0.2;
geometry_msgs::Pose pose; //设置物体的位置
pose.position.x = 0 ;
pose.position.y = 0.4;
pose.position.z = 0.5;
cylinder.primitives.push_back(primitive);
cylinder.primitives_poses.push_back(pose);
cylinder.operation = cylinder.ADD;