flexible-collision-library / fcl

Flexible Collision Library
https://flexible-collision-library.github.io/
Other
1.39k stars 417 forks source link

The use of FCL library in Windows #483

Open JianchengYang opened 4 years ago

JianchengYang commented 4 years ago

Use VCPKG to install FCL library, and then write the following program, but the program compilation appears the following error, may I ask what is the matter, is it a configuration problem? ` std::shared_ptr<fcl::Box> box1(new fcl::Box(10, 20, 30)); std::shared_ptr<fcl::Cylinder> cylinder0(new fcl::Cylinder(4, 10));

Eigen::Matrix3f R1;
R1.Identity();
Eigen::Vector3f T1;
T1 << 0, 0, 30;
fcl::CollisionObjectf* o1 = new fcl::CollisionObject<float>(cylinder0, R1, T1);

Eigen::Matrix3f R2;
R1.Identity();
Eigen::Vector3f T2;
T1 << 0, 0, 0;
fcl::CollisionObjectf* o2 = new fcl::CollisionObject<float>(box1, R2, T2);

fcl::CollisionRequest<float> request;
fcl::CollisionResult<float> result;

fcl::collide(o1, o2, request, result);

bool res = result.isCollision() ? 1 : 0;
if(res) {
    std::cout <<"y"<<std::endl;
}
else
{
    std::cout <<"n"<<std::endl;
}

` The program compile error is as follows 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C2760 语法错误: 意外标记 "标识符",应为 ";" test_fcl \192.168.25.192\vcpkg\installed\x64-windows\include\octomap\OcTreeBaseImpl.hxx 132 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C7510 “tree_iterator”: 类型 从属名称的使用必须以“typename”为前缀 test_fcl \192.168.25.192\vcpkg\installed\x64-windows\include\octomap\OcTreeBaseImpl.hxx 132