在Windows上使用ROS软件包

# 1.二进制安装

如果有ROS软件包的二进制发行版,可以使用Chocolatey安装

choco install ros-melodic-<package_name>

ROS软件包查询

https://index.ros.org/

Windows下是否已有移植查询

https://roswin.azurewebsites.net/

 

 

# 2.源码安装

首先测试源码是否可在windows系统上编译运行

 

:: activate the ROS environment

c:\opt\ros\melodic\x64\setup.bat

 

:: create a empty workspace

mkdir c:\catkin_ws\src

cd c:\catkin_ws

 

:: generate the released package sources list and its ROS dependencies

:: you can customize the command line to checkout the sources from different channels

:: see the tips section for more details

rosinstall_generator <package_name> --deps --exclude RPP --tar --flat > pkg.rosinstall

 

:: you can manually edit the pkg.rosinstall for more customizations.

:: see the tips section for more details

 

:: checkout the sources for real

wstool init src

wstool merge -r -y -t src pkg.rosinstall

wstool update -t src

 

:: attempt to acquire the external dependencies

rosdep update

rosdep install --from-paths src --ignore-src -r -y

 

:: now catkin make to build the workspace

catkin_make

 

 

如果编译成功,就可以激活软件包相关开发环境,然后使用软件包

:: activate the development space

devel\setup.bat

 

:: test the new package is discoverable

rospack find <package_name>

 

 

源码安装Tips

如果编译失败,可尝试以下步骤:

  1. 如果尚未发布Windows端口,则可以重复上述源码安装步骤,但是这次请rosinstall_generator使用development分支。

:: use the development branch

rosinstall_generator <package> --upstream-development --deps --exclude RPP > pkg.rosinstall

 

  1. 如果使用上游开发分支没有帮助,则可以编辑pkg.rosinstall,将损坏的软件包的版本:切换到其他分支,例如Windows或init_windows(如果存在)。

 

  1. 除了使用上游存储库之外,您还可以检查Microsoft的ms-iot Github组织是否具有该项目的分支并正在使用端口。 如果是这样,您可以编辑pkg.rosinstall以将uri:指向另一个fork。
  2. 对于未注册到ROS发行版的软件包,您可以手动创建.rosinstall文件以维护要使用的存储库列表。
  3. ROS WikiROS Index也是搜索程序包存储库的良好资源。

 

如果以上方法都解决不了,可以考虑 移植ROS软件包到windows环境中。

 

 

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值