strands-project / mongodb_store

MongoDB tools for storing and analysing runs of ROS systems.
BSD 3-Clause "New" or "Revised" License
49 stars 72 forks source link

mongodb_store: Remove duplicated codes for projection #215

Closed furushchev closed 6 years ago

furushchev commented 6 years ago

Discussed in https://github.com/strands-project/mongodb_store/issues/211 Since current codes for querying with projection has almost the same as querying (without projection), this PR removes duplicated codes for projection. Also it looks like MongoQuerywithProjection.srv just added projection_query property compared to MongoQueryMsg.srv, I added this property also to MongoQueryMsg.srv so that we can use projection without using query_with_projection service especially. https://github.com/strands-project/mongodb_store/blob/kinetic-devel/mongodb_store_msgs/srv/MongoQueryMsg.srv https://github.com/strands-project/mongodb_store/blob/kinetic-devel/mongodb_store_msgs/srv/MongoQuerywithProjectionMsg.srv

And I sometimes see the test failing with KeyError on finding the rosparam mongodb_host. This problem occurs because message_store_node.py tries to get the param which is not yet set by mongodb_server.py. This PR also fixed the test file to use launch file for bringing up mongodb server nodes for avoiding this and ensure the parameter is set.

strands-jenkins commented 6 years ago

Can one of the STRANDS admins verify this patch? Post a comment containing "ok to test" to enable Jenkins builds for this pull request.

strands-jenkins commented 6 years ago

Merge build triggered.

hawesie commented 6 years ago

lgtm