zoukankan      html  css  js  c++  java
  • ROSPlan教程

    tutorial_01.launch

    <?xml version="1.0"?>
    <launch>
    
        <!-- arguments -->
        <arg name="domain_path"    default="$(find rosplan_demos)/common/domain_turtlebot.pddl" />
        <arg name="problem_path"    default="$(find rosplan_demos)/common/problem_turtlebot.pddl" />
    
        <!-- knowledge base -->
        <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="screen">
            <param name="domain_path" value="$(arg domain_path)" />
            <param name="problem_path" value="$(arg problem_path)" />
            <!-- conditional planning flags -->
            <param name="use_unknowns" value="false" />
        </node>
    
        <!-- problem generation -->
        <include file="$(find rosplan_planning_system)/launch/includes/problem_interface.launch">
            <arg name="knowledge_base"   value="rosplan_knowledge_base" />
            <arg name="domain_path"      value="$(arg domain_path)" />
            <arg name="problem_path"     value="$(find rosplan_demos)/common/problem.pddl" />
            <arg name="problem_topic"    value="problem_instance" />
        </include>
    </launch>

    tutorial_02.launch

    <?xml version="1.0"?>
    <launch>
    
        <!-- arguments -->
        <arg name="domain_path"    default="$(find rosplan_demos)/common/domain_turtlebot.pddl" />
        <arg name="problem_path"    default="$(find rosplan_demos)/common/problem_turtlebot.pddl" />
    
        <!-- knowledge base -->
        <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="screen">
            <param name="domain_path" value="$(arg domain_path)" />
            <param name="problem_path" value="$(arg problem_path)" />
            <!-- conditional planning flags -->
            <param name="use_unknowns" value="false" />
        </node>
    
        <!-- problem generation -->
        <include file="$(find rosplan_planning_system)/launch/includes/problem_interface.launch">
            <arg name="knowledge_base"   value="rosplan_knowledge_base" />
            <arg name="domain_path"      value="$(arg domain_path)" />
            <arg name="problem_path"     value="$(find rosplan_demos)/common/problem.pddl" />
            <arg name="problem_topic"    value="problem_instance" />
        </include>
        <!-- planner interface -->
        <include file="$(find rosplan_planning_system)/launch/includes/planner_interface.launch">
            <arg name="use_problem_topic"    value="true" />
            <arg name="problem_topic"        value="/rosplan_problem_interface/problem_instance" />
            <arg name="planner_topic"        value="planner_output" />
            <arg name="domain_path"          value="$(arg domain_path)" />
            <arg name="problem_path"         value="$(find rosplan_demos)/common/problem.pddl" />
            <arg name="data_path"            value="$(find rosplan_demos)/common/" />
            <arg name="planner_command"      value="timeout 10 $(find rosplan_planning_system)/common/bin/popf DOMAIN PROBLEM" />
        </include>
    </launch>

    tutorial_03.launch

    <?xml version="1.0"?>
    <launch>
    
        <!-- arguments -->
        <arg name="domain_path"    default="$(find rosplan_demos)/common/domain_turtlebot.pddl" />
        <arg name="problem_path"    default="$(find rosplan_demos)/common/problem_turtlebot.pddl" />
    
        <!-- knowledge base -->
        <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="screen">
            <param name="domain_path" value="$(arg domain_path)" />
            <param name="problem_path" value="$(arg problem_path)" />
            <!-- conditional planning flags -->
            <param name="use_unknowns" value="false" />
        </node>
        
        <!-- plan parsing -->
        <node name="rosplan_parsing_interface" pkg="rosplan_planning_system" type="pddl_simple_plan_parser" respawn="false" output="screen">
            <param name="knowledge_base" value="rosplan_knowledge_base" />
            <param name="planner_topic"  value="/rosplan_planner_interface/planner_output" />
            <param name="plan_topic"     value="complete_plan" />
        </node>
    
        <!-- plan dispatching -->
        <node name="rosplan_plan_dispatcher" pkg="rosplan_planning_system" type="pddl_simple_plan_dispatcher" respawn="false" output="screen">
            <param name="knowledge_base"        value="rosplan_knowledge_base" />
            <param name="plan_topic"            value="/rosplan_parsing_interface/complete_plan" />
            <param name="action_dispatch_topic" value="action_dispatch" />
            <param name="action_feedback_topic" value="action_feedback" />
        </node>
    
    </launch>

    plan_tutorial_03.pddl

      0.000: (undock kenny wp1)             [10.000]
     10.001: (localise kenny)               [60.000]
     70.002: (goto_waypoint kenny wp0 wp0)  [60.000]
    130.003: (goto_waypoint kenny wp0 wp1)  [60.000]
    190.004: (goto_waypoint kenny wp1 wp2)  [60.000]
    250.005: (goto_waypoint kenny wp2 wp3)  [60.000]
    310.006: (goto_waypoint kenny wp3 wp4)  [60.000]

    tutorial_04.launch

    <?xml version="1.0"?>
    <launch>
    
        <!-- ROSPlan -->
        <include file="$(find rosplan_planning_system)/launch/interfaced_planning_system.launch" >
            <arg name="domain_path"        value="$(find rosplan_demos)/common/domain_turtlebot.pddl" />
            <arg name="problem_path"    value="$(find rosplan_demos)/common/problem_turtlebot.pddl" />
        </include>
    
        <!-- sim actions -->
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="undock" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="dock" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="localise" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="goto_waypoint" />
        </include>
    </launch>

    tutorial_04.bash

    echo "Generating a Problem"
    rosservice call /rosplan_problem_interface/problem_generation_server
    
    echo "Planning"
    rosservice call /rosplan_planner_interface/planning_server
    
    echo "Executing the Plan"
    rosservice call /rosplan_parsing_interface/parse_plan
    rosservice call /rosplan_plan_dispatcher/dispatch_plan

    tutorial_05.launch

    <?xml version="1.0"?>
    <launch>
    
        <!-- ROSPlan -->
        <include file="$(find rosplan_planning_system)/launch/interfaced_planning_system.launch" >
            <arg name="domain_path"        value="$(find rosplan_demos)/common/domain_turtlebot.pddl" />
            <arg name="problem_path"    value="$(find rosplan_demos)/common/problem_turtlebot.pddl" />
        </include>
    
           <!-- sim actions -->
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="undock" />
            <arg name="action_duration" value="5" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="dock" />
            <arg name="action_duration" value="15" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="localise" />
            <arg name="action_duration" value="60" />
        </include>
        <include file="$(find rosplan_planning_system)/launch/includes/simulated_action.launch" >
            <arg name="pddl_action_name" value="goto_waypoint" />
            <arg name="action_duration" value="45" />
        </include>
    </launch>
    雪儿言
  • 相关阅读:
    代码改变世界,随手写了点代码解决了一个小学生级别的作业题,编程要从娃娃抓起
    智和信通实现信创国产化适配 助力信创生态智能运维体系建设
    智和信通赋能国产信创 建设IT智能监控运维体系
    北京智和信通智慧档案馆网络监控运维解决方案
    图书馆网络运维监控安全态势感知方案-智和信通
    广播电视网络运维安全态势感知解决方案
    北京智和信通荣膺2020智能运维星耀榜最具影响力企业
    直播新规出台!如何用技术管住乱打赏的「熊孩子」?
    是什么让你在赛博空间更好看?
    Niu Talk 数据科学系列论坛:明晚,我们聊聊大数据与开源
  • 原文地址:https://www.cnblogs.com/weixq351/p/14535848.html
Copyright © 2011-2022 走看看