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

dgerod's profile - activity

2020-11-01 00:50:52 -0500 received badge  Critic (source)
2020-10-31 10:22:42 -0500 answered a question get a gazebo topic and publish in a ros topic

For my understanding you would like to republish a topic in Gazebo to ROS. If this is what you are trying to do, see thi

2020-05-14 13:21:59 -0500 received badge  Famous Question (source)
2020-03-12 21:32:45 -0500 received badge  Nice Answer (source)
2019-05-20 02:18:35 -0500 marked best answer Get information from 'mongo_store' using partial information of '_meta.name' field

I am working with 'ROSPlan' and 'rosplan_interface' packages, and I am trying to get an object of the 'mongodb_store' using only its name, that is stored in an predefined field named 'name'. Please, see below the Mongo DB.

image description

Although in 'name' is written 'waypoint_p1', the name is only 'p1' while 'waypoint' is the type. So, I would like to obtain all the information of the object passing only 'p1' to the query method. I have tried several approaches to achieve what I want but no one works.

In below code the query works but it is not what I wanted as I am already specifying the type, I only want to specify the name of the object. 'kbi.db' is an instance of 'MessageStoreProxy' from 'mongodb_store.message_store'.

p1 = kbi.db.query_named('waypoint__p1', Pose._type)
print "db.query 1\n", p1

meta = {}
meta['name'] = 'waypoint__p1'
p1 = kbi.db.query(Pose._type, {}, meta, True, [], {}, 0)
print "db.query\n", p1

This code is same as execute the following command in Mongo DB using RoboMongo:

db.getCollection('message_store').find({'_meta.name': 'waypoint__p1'})

Following one is returning an empty result. What I am trying is to pass a regular expression that will be used by Mongo DB to obtain the information I am requesting, this information means all names that contain 'p1'.

meta = {}
meta['name'] = '{$regex: /p1/}'
p1 = kbi.db.query(Pose._type, {}, meta, True, [], {}, 0)
print "db.query\n", p1

The command executed in RoboMongo for doing the query I want is:

db.getCollection('message_store').find({'_meta.name': {$regex: /p1/}})

Do you know what I am doing wrong? Or do you have a way to solve my problem? Thanks.

2019-01-13 02:11:25 -0500 received badge  Enthusiast
2018-07-27 06:07:32 -0500 received badge  Notable Question (source)
2017-10-28 10:21:41 -0500 received badge  Popular Question (source)
2017-09-10 02:54:39 -0500 edited answer Get information from 'mongo_store' using partial information of '_meta.name' field

I have found a workaround for my problem, so I am answering my own question. Maybe this workaround could be useful to so

2017-09-10 02:40:36 -0500 edited answer Get information from 'mongo_store' using partial information of '_meta.name' field

I have found a workaround for my problem, so I am answering my own question. Maybe this workaround could be useful to so

2017-09-10 02:38:23 -0500 answered a question Get information from 'mongo_store' using partial information of '_meta.name' field

I have found a workaround for my problem, so I am answering my own question. Maybe this workaround could be useful to so

2017-09-09 11:52:08 -0500 received badge  Famous Question (source)
2017-09-09 06:16:00 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 06:14:56 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 06:09:32 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 06:09:15 -0500 received badge  Associate Editor (source)
2017-09-09 06:09:15 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 06:08:43 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 06:08:19 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

Get information from 'mongo_store' using partial information of '_meta.name' field I am working with 'ROSPlan' and 'rosp

2017-09-09 04:27:27 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-09-09 04:26:29 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-09-09 04:25:24 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-09-09 04:23:42 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-09-09 04:23:15 -0500 edited question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-09-09 04:22:41 -0500 asked a question Get information from 'mongo_store' using partial information of '_meta.name' field

How to get information from mongo_store using "_meta.name" I am working with 'ROSPlan' and 'rosplan_interface' packages,

2017-04-09 08:34:22 -0500 received badge  Notable Question (source)
2017-04-05 06:07:17 -0500 answered a question Assign value of a rosparam to a node param in a launch file

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" />
    <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>
2017-04-05 06:01:20 -0500 commented question Assign value of a rosparam to a node param in a launch file

Thanks for your answer.

Yes, but I don't know how to remove them. Therefore, I following a workaround, I map the parameters using a python script that I call inside my launch file.

2017-04-05 04:06:28 -0500 received badge  Popular Question (source)
2017-04-02 06:10:31 -0500 asked a question Assign value of a rosparam to a node param in a launch file

I would like to configure the "mongodb_store" as it uses for database_path a directory path that it is stored in a parameter of the ROS server.

The path is stored as "/rosplan/database_path", see below.

<launch>
    <param name="/rosplan/domain_path" value="$(find pepito_organizes_boxes)/configuration/domain.pddl" />
    <param name="/rosplan/database_path" value="$(find pepito_organizes_boxes)/common/mongoDB" />
</launch>

To achieve this I am calling "rosparama get /rosplan/data_path" in the "command" keyword of "database_path" param" required by "mongodb_store".

<launch>    
    <!-- load configuration -->
    <include file="$(find pepito_organizes_boxes)/launch/load_system_config.launch" />

    <!-- 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" >
        <param name="database_path" command="/bin/bash -c 'rosparam get /rosplan/database_path' -- " />
    </node>
    <node name="rosplan_scene_message_store" pkg="mongodb_store" type="message_store_node.py" respawn="false" output="log" />
 </launch>

It does not work, and output of the console is:

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosplan/data_path: /home/dieesrod/Wo...
 * /rosplan/database_path: /home/dieesrod/Wo...
 * /rosplan/domain_path: /home/dieesrod/Wo...
 * /rosplan/planner_path: /home/dieesrod/Wo...
 * /rosplan/problem_path: /home/dieesrod/Wo...
 * /rosplan/strl_file_path: /home/dieesrod/Wo...
 * /rosplan_scene_database/database_path: /home/dieesrod/Wo...
 * /rosversion: 1.11.20

process[rosplan_knowledge_base-1]: started with pid [6332]
process[rosplan_scene_database-2]: started with pid [6333]
process[rosplan_scene_message_store-3]: started with pid [6341]
[INFO] [WallTime: 1491130707.159727] Mongo server address: localhost:27017
[INFO] [WallTime: 1491130707.171976] Found MongoDB version 2.4.9
[ERROR] [WallTime: 1491130707.172236] Can't find database at supplied path /home/dieesrod/Workspaces/ROS/indigo/anchoring/src/anchoring_system/experiments/pepito_organize_boxes/common/mongoDB
. If this is a new DB, create it as an empty directory.
[rosplan_scene_database-2] process has died [pid 6333, exit code 1, cmd /opt/ros/indigo/lib/mongodb_store/mongodb_server.py __name:=rosplan_scene_database __log:=/home/dieesrod/.ros/log/17adeaa4-1765-11e7-b57a-a4c49440ffa1/rosplan_scene_database-2.log].
log file: /home/dieesrod/.ros/log/17adeaa4-1765-11e7-b57a-a4c49440ffa1/rosplan_scene_database-2*.log
[ERROR] [WallTime: 1491130717.404485] Can't connect to MongoDB server. Make sure mongodb_store/mongodb_server.py node is started.

In fact, when I get the information of "/rosplan/database_path" and "/rosplan_scene_database/database_path" there are some extra spaces in the second one.

$ rosparam get /rosplan/database_path
/home/dieesrod/Workspaces/ROS/indigo/anchoring/src/anchoring_system/experiments/pepito_organize_boxes/common/mongoDB

$ rosparam get /rosplan_scene_database/database_path
'/home/dieesrod/Workspaces/ROS/indigo/anchoring/src/anchoring_system/experiments/pepito_organize_boxes/common/mongoDB

  '

Do you know why this is happening? And how I could solve this situation? I am using ROS Indigo running on Ubuntu 14.04 LTS.

Thanks in advance.

2016-03-11 08:33:27 -0500 received badge  Good Question (source)
2014-01-28 17:30:42 -0500 marked best answer ROS over QNX

Has anyone tried to use ROS over QNX?

I would like to use ROS topics to export data (i.e. joints) from an existing system that runs over QNX.

2014-01-28 17:28:12 -0500 marked best answer How to - simple process module in CRAM

I am learning about CRAM designators and process modules. At this moment I am trying to create a stupid process module to check if I understand how the system works.

I am following http://ros.org/wiki/cram_process_modules (this tutorial) but I have not succeeded.

When I execute the following code:

CPL> (def-process-module navigation (input-designator)
          (let ((goal-pose (reference input-designator)))
            (or (execute-navigation-action goal-pose)
                (fail 'navigation-failed))))

An error is raised in SLIME:

The variable NAVIGATION is unbound.
    [Condition of type UNBOUND-VARIABLE]

I don't understand why this is happening. "Navigation" is the name of the process module I am trying to define, am I right? Therefore, I can understand an error raised because "execute-navigation-action" is not defined but not in "navigation". What I am missing?

Thanks in advance.

2014-01-28 17:27:26 -0500 marked best answer Designators in CRAM framework

I have just finished reading CRAM core and KnowRob, and I have an overview of the system at this moment.

I have read the following information:

However, I still do not understand "designators" in CRAM. How they work? Do you know where I can find more information about them? "Designators" are the module most interesting for me. Thanks.

2013-08-01 04:13:33 -0500 received badge  Famous Question (source)