windows上安装运动规划库MPlib

MPlib 是一个用于运动规划的轻量级 python 包, 它与ROS解耦,易于设置。只需几行 python 代码,就可以实现机器人操作中的大部分运动规划功能。
但是官方仅支持Linux,本教程是探索其在Windows(x86-64)上的安装与使用。主要由于其依赖配置较为繁琐,故大部分借助vcpkg。在成功安装到python环境中后,vcpkg可删除。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-dEw96Aik-1722528052192)(https://i-blog.csdnimg.cn/direct/ba0834c2ede8485da40e198f64b684c8.png)]

1. 准备工作、

  • VS2022,VS installer里面提前安装英文语言包。
  • git(用于克隆项目,运行bash脚本)
  • 打开powershell运行
    git clone https://github.com/microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.bat
    

2. 安装基础依赖

./vcpkg.exe install assimp:x64-windows
./vcpkg.exe install boost:x64-windows
./vcpkg.exe install Eigen3:x64-windows
./vcpkg.exe install fcl:x64-windows
./vcpkg.exe install ompl:x64-windows
./vcpkg.exe install orocos-kdl:x64-windows
./vcpkg.exe install urdfdom:x64-windows

3. 安装hpp-fcl-2.4.3

打开x64 Native Tools Command Prompt for VS 2022,运行:

git clone https://github.com/humanoid-path-planner/hpp-fcl.git -b v2.4.3 hpp-fcl-2.4.3
cd hpp-fcl-2.4.3
git submodule update --init
cmake -B build -S . ^
  -DCMAKE_DEBUG_POSTFIX=d ^
  -DCMAKE_INSTALL_PREFIX="install_" ^
  -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake ^
  -DBUILD_PYTHON_INTERFACE=OFF ^
  -DBUILD_TESTING=OFF ^
  -DBUILD_SHARED_LIBS=OFF

cmake --build ./build --config Release --target ALL_BUILD
cmake --build ./build --config Release --target INSTALL

其中/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake改为自己的路径

4. 安装pinocchio-2.7.1

打开x64 Native Tools Command Prompt for VS 20XX

git clone https://github.com/stack-of-tasks/pinocchio.git -b v2.7.1 pinocchio-2.7.1
cd pinocchio-2.7.1
git submodule update --init
cmake -B build -S . ^
-DCMAKE_DEBUG_POSTFIX=d ^
-DCMAKE_INSTALL_PREFIX="install" ^
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DBUILD_PYTHON_INTERFACE=OFF ^
-DBUILD_WITH_URDF_SUPPORT=ON ^
-DBUILD_WITH_COLLISION_SUPPORT=ON ^
-Dhpp-fcl_DIR="E:/ENVs/hpp-fcl-2.4.3/install_/lib/cmake/hpp-fcl" ^
-DBUILD_TESTING=OFF ^
-DBUILD_SHARED_LIBS=OFF

cmake --build ./build --
  • 14
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值