Code Monkey home page Code Monkey logo

soma's Issues

when does this update mongodb?

@kunzel When does the soma manager update mongodb?

I deleted an object in rviz, and it was removed from the mongodb soma message store. But it remained in the geospatial message store. This caused me an issue because I obtain the objects from geo store, and the x, y coordinates from the message store.

Merging 2.0 branch into the master branch

Hi all,

Is it possible to merge 2.0 into the master branch?
In that way, we can re-release soma with its newer version.
I dont think anybody still uses the old version of soma.

Find roi for waypoint

I want to lookup what ROIs cover a given waypoint, which would involve listing the ROIs and checking is_inside. I notice there are functions for this stuff already...what is the best way to do it, and should I include it in SOMA or make it separate?

Error in RVIZ

There is an error when running both soma_manager and soma_roi in RVIZ.
It says

Error getting time of latest transform between /map and map: (error code: 1)

Usually, running mongodb and map_server is enough to make soma and soma_roi run properly.
@PDuckworth encounters the same problem.
Any idea why?

Little bug on update branch with map manager

One for @hkaraoguz I think! seems like just a tiny logic error somewhere. I ran:

jxy@DOPPLEGANGER:~/soma_ws$` roslaunch soma_manager soma2_local.launch map_name:=aloof

Then I got

[ INFO] [1476960944.631418854]: Waiting for SOMA Map Service...
[INFO] [WallTime: 1476960944.684978] Running SOMA map manager
No maps are found in DB. Listening map_server for a map...
Map is received. Please enter a name for storing it in the database: [INFO] [WallTime: 1476960944.824152] Running SOMA data manager (dbname: soma2data, collection_name: soma2)
Waiting for the map info from soma_map_manager
[ERROR] [WallTime: 1476960949.942048] No 'soma/map_info' service, Quitting...
[soma_data_manager_node-2] process has finished cleanly
log file: /home/jxy/.ros/log/2d2d8b4c-96b3-11e6-9c5f-1c872c60d569/soma_data_manager_node-2*.log

But it was still listening for input from line 4 there, it seems... So I typed the name of my map

aloof
you entered aloof
map is now being published on soma/map topic
[ INFO] [1476960968.022460250]: Received map info. Map Name: aloof, Map Unique ID: 5808a2c70b226751c422fc71
[ INFO] [1476960968.022917305]: SOMA Query Service Ready.

Which worked, and then I ran the launch file again and everything was fine and it all worked. It looks like the system should be waiting after it asks for the map name, but it doesn't, and then just runs on looking for the soma/map_info topic, can't find it (because that doesn't come up until you give it the map name, I guess?) then crashes. The map was actually already in the db, I think, which is why I passed it as a parameter, but I guess it wasn't found for some reason? It might be because I created the map under the previous branch, which had lots of stuff named with "soma2", so could just be an issue with collection names.

Geospatial_store can not access mongodb remotely

I got an error from geospatial_store which tells me that it can not connect to localhost:62345.

[ERROR] [WallTime: 1429726545.957402] Exception in your execute callback: could not connect to localhost:62345: [Errno 111] Connection refused
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/actionlib/simple_action_server.py", line 299, in executeLoop
    self.execute_callback(goal)
  File "/home/strands/g4s_ws/src/trajectory_behaviours/relational_learner/scripts/OfflineLearning_action.py", line 29, in execute
    if not self.cond(): ol.learn()
  File "/home/strands/g4s_ws/src/trajectory_behaviours/relational_learner/scripts/learn_traj_behaviours.py", line 160, in learn
    r = run_all()
  File "/home/strands/g4s_ws/src/trajectory_behaviours/relational_learner/scripts/learn_traj_behaviours.py", line 58, in run_all
    gs = GeoSpatialStoreProxy('geospatial_store','soma')
  File "/home/strands/g4s_ws/src/soma/soma_geospatial_store/src/soma_geospatial_store/geospatial_store.py", line 43, in __init__
    self._client = pymongo.MongoClient(host,port)
  File "/usr/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 352, in __init__
    raise ConnectionFailure(str(e))
ConnectionFailure: could not connect to localhost:62345: [Errno 111] Connection refused

This is wrong since it is supposed to access mongodb in other computer remotely (from bobl to bob).

rosservice /soma/query_objects

A query for all objects in a region fails if no object ids or type info is given. I think, it is the case because a type query with an empty string ("") is added by default.

@hkaraoguz, can you confirm this? And can we remove this? Or is there a reason for this behavior?

lars@xps15:~$ rosservice call /soma/query_objects "query_type: 0
uselowertime: false
useuppertime: false
usedates: false
useweekday: false
useroi: true
lowerhour: 0
upperhour: 0
lowerminutes: 0
upperminutes: 0
lowerdate: 0
upperdate: 0
weekday: 0
objectids: []
objecttypes: ['']
roi_id: '1'
config: ''" 
timedatelimits: []
types: []
ids: []
unique_ids: []
objects: []
queryjson: { "geoloc" : { "$geoWithin" : { "$geometry" : { "coordinates" : [ [ [ -3.470230539903696e-05, 1.899294748852753e-05 ], [ -3.532057527877441e-05, 5.444035780044487e-05 ], [ 3.768879300025674e-05, 5.349052088376993e-05 ], [ 3.537138304920973e-05, 1.808334768327313e-05 ], [ -3.470230539903696e-05, 1.899294748852753e-05 ] ] ], "type" : "Polygon" } } }, "$or" : [ { "type" : "" } ] }

New ROI objects created when editing existing ROIs?

In the latest commit on the update branch, is this the right behaviour? I add a new ROI, and then every time I edit it by moving one of the vertices, a brand new ROI object is entered into the database with the same ID as the old one, but with the new vertices and a more recent timestamp, rather than (what I would expect, and how it worked in the past) updating the old ROI object.

Am I doing something wrong? This makes it hard to do what I have been doing before-- getting all the ROIs from the database, picking one, and seeing if a given point is in that ROI. I guess this is for learning dynamic ROIs online that might change over time? But I think there should be a service to just return the set of most up-to-date ROIs for everything. Maybe there is and I am just using the wrong service call?

@hkaraoguz ?

Pose vs location in geospatial proxy

Code like the following is in GeoSpatialStoreProxy but as far as I see the documents in the store don't have pose fields, therefore this will always return None.

 def obj_coords(self, soma_id, soma_map, soma_config):
        """Returns the map coordinates of a soma_id object"""
        query = {  "map":  soma_map,
                   "config": soma_config,
                   "id": soma_id
                } 

        res = self.find_projection(query, {"pose": 1})

        if res.count() == 0:
            return None
        return res[0]['pose']['position']['x'], res[0]['pose']['position']['y'], \
            res[0]['pose']['position']['z']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.