ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found a workaround for the problem.

I created a python script named as "set_components_config.py", it is responsible of mapping the global parameters to the parameters of each components.

#! /usr/bin/env python

import rospy

rospy.set_param("rosplan_scene_database/database_path",
    rospy.get_param("/rosplan/database_path"))

rospy.set_param("rosplan_planning_system/problem_path",
    rospy.get_param("/rosplan/problem_path"))
rospy.set_param("rosplan_planning_system/data_path",
    rospy.get_param("/rosplan/data_path"))
rospy.set_param("rosplan_planning_system/strl_file_path",
    rospy.get_param("/rosplan/strl_file_path"))

And this script is called by the launch file after loading the global parameters and before starting the nodes that use them.

<launch> <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch"/> <node name="update_config" pkg="pepito_organizes_boxes" type="set_components_config.py" output="screen"/>

<!-- knowledge base -->
    <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="log" />
    <node name="rosplan_scene_database" pkg="mongodb_store" type="mongodb_server.py" respawn="false" output="screen" />
<node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />

</launch>

I found a workaround for the problem.

I created a python script named as "set_components_config.py", it is responsible of mapping the global parameters to the parameters of each components. component (e.g. rosplan_scene_database).

#! /usr/bin/env python

import rospy

rospy.set_param("rosplan_scene_database/database_path",
    rospy.get_param("/rosplan/database_path"))

rospy.set_param("rosplan_planning_system/problem_path",
    rospy.get_param("/rosplan/problem_path"))
rospy.set_param("rosplan_planning_system/data_path",
    rospy.get_param("/rosplan/data_path"))
rospy.set_param("rosplan_planning_system/strl_file_path",
    rospy.get_param("/rosplan/strl_file_path"))

And this script is called by the launch file after loading the global parameters and before starting the nodes that use them.

<launch> <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch"/> <node name="update_config" pkg="pepito_organizes_boxes" type="set_components_config.py" output="screen"/>

<!-- knowledge base -->
    <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="log" />
    <node name="rosplan_scene_database" pkg="mongodb_store" type="mongodb_server.py" respawn="false" output="screen" />
<node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />

</launch>

I found a workaround for the problem.

I created a python script named as "set_components_config.py", it is responsible of mapping the global parameters to the parameters of each component (e.g. rosplan_scene_database).

#! /usr/bin/env python

import rospy

rospy.set_param("rosplan_scene_database/database_path",
    rospy.get_param("/rosplan/database_path"))

rospy.set_param("rosplan_planning_system/problem_path",
    rospy.get_param("/rosplan/problem_path"))
rospy.set_param("rosplan_planning_system/data_path",
    rospy.get_param("/rosplan/data_path"))
rospy.set_param("rosplan_planning_system/strl_file_path",
    rospy.get_param("/rosplan/strl_file_path"))

And this script is called by the launch file after loading the global parameters and before starting the nodes that use them.

<launch>
     <!-- load configuration -->
    <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch"/>
pepito_organizes_boxes)/launch/load_system_config.launch" />
        <node name="update_config" pkg="pepito_organizes_boxes" type="set_components_config.py" output="screen"/>

output="screen" />
<!-- knowledge base -->
    <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="log" />
    <node name="rosplan_scene_database" pkg="mongodb_store" type="mongodb_server.py" respawn="false" output="screen" />
<node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />

</launch>

I found a workaround for the problem.

I created a python script named as "set_components_config.py", it is responsible of mapping the global parameters to the parameters of each component (e.g. rosplan_scene_database).

#! /usr/bin/env python

import rospy

rospy.set_param("rosplan_scene_database/database_path",
    rospy.get_param("/rosplan/database_path"))

rospy.set_param("rosplan_planning_system/problem_path",
    rospy.get_param("/rosplan/problem_path"))
rospy.set_param("rosplan_planning_system/data_path",
    rospy.get_param("/rosplan/data_path"))
rospy.set_param("rosplan_planning_system/strl_file_path",
    rospy.get_param("/rosplan/strl_file_path"))

And this script is called by the launch file after loading the global parameters and before starting the nodes that use them.

<launch>

<launch>
    <!-- load configuration -->
    <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch" />
     <node name="update_config" pkg="pepito_organizes_boxes" type="set_components_config.py" output="screen" />

 <!-- knowledge base -->
    <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="log" />
    <node name="rosplan_scene_database" pkg="mongodb_store" type="mongodb_server.py" respawn="false" output="screen" />
 <node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />

</launch>

</launch>

I found a workaround for the problem.

I created a python script named as "set_components_config.py", it is responsible of mapping the global parameters to the parameters of each component (e.g. rosplan_scene_database).

#! /usr/bin/env python

import rospy

rospy.set_param("rosplan_scene_database/database_path",
    rospy.get_param("/rosplan/database_path"))

rospy.set_param("rosplan_planning_system/problem_path",
    rospy.get_param("/rosplan/problem_path"))
rospy.set_param("rosplan_planning_system/data_path",
    rospy.get_param("/rosplan/data_path"))
rospy.set_param("rosplan_planning_system/strl_file_path",
    rospy.get_param("/rosplan/strl_file_path"))

And this script is called by the launch file after loading the global parameters and before starting the nodes that use them.

<launch>

<launch>
    <!-- load configuration -->
    <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch" />
    <node name="update_config" pkg="pepito_organizes_boxes" type="set_components_config.py" output="screen" />

    <!-- knowledge base -->
    <node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="log" />
    <node name="rosplan_scene_database" pkg="mongodb_store" type="mongodb_server.py" respawn="false" output="screen" />
    <node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />
/>    
</launch>