• 6.20-Param reconfig讨论


    TOC

    参考

    ROS WIKI
    dynamic_reconfigure

    前言

    • 因为windows平台的ROS for LV 没有显式支持action,所以不能直接给move_base节点发送move_base/cancel (actionlib_msgs/GoalID),故在ROS端添加一个Proxy来代理解决
    • 该代理的功能还包括ROSARIA和move_base的reconfigure,所以要从命令行运行重新配置命令
    • 还修正一个ROSARIA发送的pose_msg内容为相对坐标的问题,改为发送相对于zsWorld坐标系的绝对坐标(在rosaria包中完成)
    • 以后还可以承担打开和关闭各个节点的任务!

    工作

    1. ROSARIA坐标修正,并制作一个reconfiguration_server(在rosaria包中完成)
    2. 接收上级节点发送的取消service_call,转发给move_base取消action_msg
    3. 接收来自上级节点的move_base reconfigure_msg,运行命令行进行重新配置
    4. 接收来自上级节点的rosaria reconfigure_msg,运行命令行进行重新配置
    5. 接收来及上级节点的重新定位的msg,运行命令行重新配置tf,主要是zsWorld与odom的坐标系转换关系
    6. 确认ROS for LV与ROS的连接关系
    7. 用rosaria_client进行测试

    步骤

    坐标修正

    • 建立一个包
    catkin_create_pkg zsProxy std_msgs roscpp
    • 修改vscode 配置文件c_cpp_properties.json
    subl ./.vscode/c_cpp_properties.json
    {
                "name": "Linux",
                "includePath": ["/usr/include",
                "/opt/ros/indigo/include",
                "${ROS_PACKAGE_PATH}",
                "/opt/ros/kinetic/include"]
    },
    • 修改 .gitignore,vscode的数据文件就不要上传了
    .vscode/

    学习dynamic config

    • 关于参数概念的详细讨论

      主要有两种访问参数的方法,一种是参数服务器,生命周期随roscore;另外一种就是动态重新配置参数,可以在程序运行时进行重新配置参数

    • 关于参数具体实现和模式的讨论

      In roslaunch files, tags are for setting a single parameter and tags are for setting groups or more complex structures of parameters.
      The value set by the tag may only be a string, int, bool, or double, which may be set through the xml attribute value, or by reading in from a text file, bin file, or the output of a command line command.
      The tag enables users to define a batch of related parameters simultaneously. These can be read from a YAML string which can either be put inline in the launchfile or can be loaded from a file (the rosparam dump command generates YAML output). Unlike the tag, the YAML specification allows nested structures of parameters and parameters with list values. While these data can be represented on the ROS parameter server, it is up to the various client libraries to support complex parameter access.
      A good example of the tag use in practice is the move_base package, where there are many, many parameters to be set, it's less cumbersome to just use the YAML format.

    dynamic reconfig具体技术

    Service Call-Based Re-configuration 实践

    • 使用上面所述第二种方法,使用命令行执行,可以在shell中执行,不过最好在C++中执行
    rosrun dynamic_reconfigure dynparam set /<node_name> <param> <value>
    system("rosrun dynamic_reconfigure dynparam set camera_synchronizer_node narrow_stereo_trig_mode 3");

    关于dynparam更详细的用法

  • 相关阅读:
    CSP2022 摆烂游记
    CF986C AND Graph(图论+二进制连边)
    P6144 [USACO20FEB]Help Yourself P(DP+线段树)
    CF1017G The Tree(统计+树剖)
    CF559E Gerald and Path(DP)
    CF1004F Sonya and Bitwise OR(线段树平衡复杂度+or 前缀性质)
    一些名言
    fatal: detected dubious ownership in repository 问题解决
    各种计划
    MOS选型
  • 原文地址:https://www.cnblogs.com/lizhensheng/p/11117575.html
Copyright © 2020-2023  润新知