Tutorial 1 mongodb port

60 views
Skip to first unread message

Stephen Balakirsky

unread,
Jul 19, 2018, 1:45:42 PM7/19/18
to ROSPlan
Dear All,
To get demo 1 to work, I needed to add the parameter "port" with a value of 27017 to the mongodb_store.launch include. Has anyone else had this issue?

Stephen Balakirsky

unread,
Jul 19, 2018, 2:11:55 PM7/19/18
to ROSPlan
Additional changes:
In interfaced_planning_system.launch, I added port argument with a default of 27017. I then passed this argument to the mongodb_store.launch file.

Oscar Lima

unread,
Jul 19, 2018, 5:26:34 PM7/19/18
to ROSPlan
it is mentioned on the wiki that you need to kill mongodb linux default database:


however i prefer to just change the port, here i put my launch file for KB:

<?xml version="1.0"?>
<launch>

    <!-- the full path for the domain.pddl -->
    <arg name="domain_path" default="$(find pddl_learning)/common/pddl/domain.pddl" />

    <!-- select a problem.pddl to be parsed and uploaded as initial state to KB -->
    <arg name="problem_path" default="$(find pddl_learning)/common/pddl/problems/water_plant.pddl" />

    <!-- the place in which mongoDB will store runtime files -->
    <arg name="database_path" default="$(find pddl_learning)/common/mongoDB" />

    <!-- the desired ROS namespace -->
    <arg name="namespace" default="task_planning" />

    <!-- mongoDB related parameters -->
    <arg name="mongodb_host" default="localhost" />
    <arg name="mongodb_port" default="27019" />    <!-- Do not use ubuntu default mongodb port : 27017-->

    <!-- scene database (MongoDB) -->
    <node pkg="mongodb_store" type="mongodb_server.py" name="mongodb_server"
          output="screen" ns="$(arg namespace)" >
        <param name="master" value="false"/>
        <param name="host" value="$(arg mongodb_host)" />
        <param name="port" value="$(arg mongodb_port)" />
        <param name="database_path" value="$(arg database_path)" />
    </node>

    <!-- scene database messages (MongoDB) -->
    <param name="$(arg namespace)/mongodb_host" type="str" value="$(arg mongodb_host)" />
    <param name="$(arg namespace)/mongodb_port" type="int" value="$(arg mongodb_port)" />
    <node pkg="mongodb_store" type="message_store_node.py" name="message_store_node"
          output="screen" ns="$(arg namespace)" />

    <!-- rosplan knowledge base node-->
    <node pkg="rosplan_knowledge_base" type="knowledgeBase" name="rosplan_knowledge_base"
          output="log" required="true" ns="$(arg namespace)" >
        <param name="domain_path" value="$(arg domain_path)" />
        <param name="problem_path" value="$(arg problem_path)" />
    </node>

</launch>
Reply all
Reply to author
Forward
0 new messages