前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >机器人编程趣味实践18-他山之石(功能包)

机器人编程趣味实践18-他山之石(功能包)

作者头像
zhangrelay
发布2021-12-02 12:44:55
3730
发布2021-12-02 12:44:55
举报
文章被收录于专栏:机器人课程与技术

机器人操作系统功能包可以使用如下两种方式使用:

  1. sudo apt install xxx
  2. colcon build xxx

第一种是打包的安装文件,第二种是源代码编译。

如何自己编写功能包后续细说,本节介绍如何使用github下载的功能包源码编译使用。

先上一个思考题:

模型之简

模型之细

代码也是类似,有极简风,也有全家福

现在很多APP界面很精美,但其内核其实并不复杂,大量的工作放在了如何吸引用户的眼球上。

github下载速度?

  • git clone https://github.com/ros-planning/moveit2_tutorials.git
  • git clone https://github.com.cnpmjs.org/ros-planning/moveit2_tutorials.git

编译工具

colcon

代码语言:javascript
复制
zhangrelay@ros2fun:~$ colcon -h
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL]
              {build,extension-points,extensions,graph,info,list,metadata,test,test-result,version-check} ...

optional arguments:
  -h, --help            show this help message and exit
  --log-base LOG_BASE   The base path for all log directories (default: ./log, to disable: /dev/null)
  --log-level LOG_LEVEL
                        Set log level for the console output, either by numeric or string value (default: warning)

colcon verbs:
  build                 Build a set of packages
  extension-points      List extension points
  extensions            List extensions
  graph                 Generate a visual representation of the dependency graph
  info                  Package information
  list                  List packages, optionally in topological ordering
  metadata              Manage metadata of packages
  test                  Test a set of packages
  test-result           Show the test results generated when testing a set of
                        packages
  version-check         Compare local package versions with PyPI

  {build,extension-points,extensions,graph,info,list,metadata,test,test-result,version-check}
                        call `colcon VERB -h` for specific help

Environment variables:
  CMAKE_COMMAND         The full path to the CMake executable
  COLCON_ALL_SHELLS     Flag to enable all shell extensions
  COLCON_COMPLETION_LOGFILE
                        Set the logfile for completion time
  COLCON_DEFAULTS_FILE  Set path to the yaml file containing the default values
                        for the command line arguments (default:
                        $COLCON_HOME/defaults.yaml)
  COLCON_DEFAULT_EXECUTOR
                        Select the default executor extension
  COLCON_EXTENSION_BLOCKLIST
                        Block extensions which should not be used
  COLCON_HOME           Set the configuration directory (default: ~/.colcon)
  COLCON_LOG_LEVEL      Set the log level (debug|10, info|20, warn|30,
                        error|40, critical|50, or any other positive numeric
                        value)
  COLCON_WARNINGS       Set the warnings filter similar to PYTHONWARNINGS
                        except that the module entry is implicitly set to
                        'colcon.*'
  CTEST_COMMAND         The full path to the CTest executable
  POWERSHELL_COMMAND    The full path to the PowerShell executable

For more help and usage tips, see https://colcon.readthedocs.io

colcon build

完成后显示:

如果要使用自编译功能包中的程序,需要:

. install/local_setup.bash

运行

ros2 launch nav2_bringup tb3_simulation_launch.py slam:=True

好不好用呢?

非常稀烂!

特别容易挂

为何呢?是算法不行,还是参数不合适?换个地图试一试?

调参也是一门学问呢^_^

-End-

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021/06/16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 先上一个思考题:
    • 模型之简
      • 模型之细
      • github下载速度?
      • 编译工具
        • colcon
        • 运行
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档