strands-project / mongodb_store

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

ros_datacentre Questions #55

Closed rmbennett closed 9 years ago

rmbennett commented 10 years ago

I have a few questions about ros_datacentre.

1) What kind of ROS data can be stored using ros_datacentre?

2) How is data queried using ros_datacentre - what kind of queries can be performed?

3) Is there any facility for playback of the stored data? (Akin to playback using ros bags)

Thanks in Advance.

hawesie commented 10 years ago

1) Anything that you can put in a ROS message can be stored using the datacentre. Here's an example of a Pose object stored via mongodb_log.py:

{
    "_id" : ObjectId("537c7b3054a6f711d31e51ea"),
    "position" : {
        "y" : -0.001857588670466997,
        "x" : 0.01276552360298784,
        "z" : -3.469446951953614e-18
    },
    "orientation" : {
        "y" : 0,
        "x" : 0,
        "z" : 8.560345123093117e-05,
        "w" : 0.9999999963360245
    },
    "_meta" : {
        "topic" : "/robot_pose",
        "stored_type" : "geometry_msgs/Pose",
        "stored_class" : "geometry_msgs.msg._Pose.Pose",
        "inserted_at" : ISODate("2014-05-21T10:08:48.214Z")
    }
}

2) As it's just Mongo DB under the hood you can perform any valid Mongo DB query on the datacentre. If you use the message_store you get a simplified API for querying on type and name.

3) Not yet, but this is the exact reason why we're working on the datacentre! Our aim is to be able to replay complete robot runs in simulated time. I hope that we can work on this over the summer some time.

We'd be very happy to have you use or contribute this code, so please let us know if there's anything we can do to help you. If you explain what problem you're trying to solve, that might help too.

rmbennett commented 10 years ago

The example application I'm looking at is something along the lines of -

"Leave a robot running all day constantly collecting data. Then at the end of the day we want to come and look at the data collected - however we just want to look at the "interesting" parts, (Maybe some one walks past the robot, asks it a question or just interacts with it in some way). So we need a way to easily pick out the interesting bits to look at and perhaps automatically classify these "interesting bits".

Are there any parts of this that ros_datacentre could do?

Depending on the current state of ros_datacentre I'd be happy to try to contribute something to this codebase.

hawesie commented 10 years ago

Excellent, this really matches our aims. We're currently trying to run our robots for up to 15 days continuously to generate data from long-term deployments.

I'd suggest defining your own "interesting thing occurred" ROS message type (e.g. including ROS Time, string description, maybe a list of topics to look at) and then writing that out via the message store when certain components are triggered or certain messages are published. Alternatively you could just define mongo queries to find these from the logged data.

rmbennett commented 10 years ago

Brilliant thanks!

Could I ask for a brief comment on the current differences between the groovy-devel and hydro-devel branches are at the moment?

hawesie commented 10 years ago

Only hydro-devel is actually being developed, but I believe it should be completely compatible with groovy (as we only use catkin). Therefore I suggest trying hydro-devel first. We can merge our changes into groovy-devel if there really is a problem.

rmbennett commented 10 years ago

Okay - I'll use the hydro branch and get back to you.

Thanks!

rmbennett commented 10 years ago

So having pulled the code - I have immediately received this error.

I assume that I've done something inherently wrong as it's on both groovy-devel and hydro-devel branches.

Traceback (most recent call last): File "/home/rmb209/rosHydro/stacks/ros_datacentre/ros_datacentre/scripts/mongodb_server.py", line 12, in import ros_datacentre.util ImportError: No module named ros_datacentre.util

hawesie commented 10 years ago

Have you run catkin_make in your workspace? And how are you trying to launch this?

rmbennett commented 10 years ago

Yes, and like this as described in the readme.

rosrun ros_datacentre mongodb_server.py Traceback (most recent call last): File "/home/rmb209/rosHydro/ws_baxter/src/ros_datacentre/ros_datacentre/scripts/mongodb_server.py", line 12, in import ros_datacentre.util ImportError: No module named ros_datacentre.util

hawesie commented 10 years ago

How about roslaunch ros_datacentre datacentre.launch

hawesie commented 10 years ago

Did you ever get going with this?

hawesie commented 10 years ago

Our code is now in the ROS Ubuntu repository, so please use it from there if you're still using it.