使用move_group时在自定义的节点对应的launch文件中不要使用group 否则会构造不成功move_group

<launch>
  <!-- By default, we are not in debug mode -->
  <arg name="debug" default="false" />

  <!-- GDB Debug Option -->
  <arg unless="$(arg debug)" name="launch_prefix" value="" />
  <arg     if="$(arg debug)" name="launch_prefix"
     value="gdb -x $(find mara_moveit_config)/launch/gdb_settings.gdb --ex run --args" />     
    <arg name ="cfg_dir" value = "/home/xxx/src/cfg"/>
    <arg name ="moveit_config_dir" value = "/home/xxx/src/$(arg product_type)/$(arg product_type)_moveit_config"/>
    <arg name ="robot_urdf_dir" value = "/home/xxx/src/$(arg product_type)/$(arg product_type)_description"/>
  
    <!--group ns="cmd_executor_manager"-->
        <node name="node" pkg="cmd_executor_manager" type="cmd_executor_manager_node" respawn="true" output="screen" />
        <param name="port" type="str" value="6341"/>
        <param name="file_path" value="$(arg cfg_dir)/ros_cfg/products/$(arg product_type)/cmd_executor_manager.json"/>
        <param name="robot_type" value="$(arg robot_type)"/>
        <param name="robot_urdf_path" value="$(arg robot_urdf_dir)/urdf/$(arg product_type).urdf"/>
        <param name="planning_plugin" value="ompl_interface/OMPLPlanner"/>
        <rosparam command="load" file="$(arg moveit_config_dir)/config/kinematics.yaml"/>
        <rosparam command="load" file="$(arg moveit_config_dir)/config/ompl_planning.yaml"/>
    
    <!--/group-->
</launch>

上述代码中如果加入


  
    <group ns="cmd_executor_manager">
    
    </group>

那么

代码中的moveit::planning_interface::MoveGroupInterface move_group("manipulator")就会执行不成功。

所以在ROS中构造moveit::planning_interface::MoveGroupInterface的时候在lanunch中不能使用<group ns>和</group>重命名节点

没有group启动节点之后

有group启动节点之后:

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值