Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Topological Prediction] wrong edge_ids, missing edges, and 0.0 transversability probability #215

Closed
bfalacerda opened this issue Mar 31, 2015 · 24 comments

Comments

@bfalacerda
Copy link
Contributor

I just tested the topological prediction in the following map:

bruno@bruno-mbp:~$ rosrun topological_utils list_maps 
--------------------------------------------------
Name:             small_lgjune14
Number of nodes:  11
Edge actions:     ['move_base', 'docking', 'undocking', 'doorPassing']
Last modified:    2015-03-19 16:11:47.279000+00:00

When I run the service,I get this:

bruno@bruno-mbp:~$ rosservice call /topological_prediction/predict_edges "epoch:
  secs: 1427825826
  nsecs: 0" 
edge_ids: ['small_lgjune14__ChargingPoint_WayPoint1', 'small_lgjune14__WayPoint1_WayPoint2', 'small_lgjune14__WayPoint3_WayPoint6', 'small_lgjune14__WayPoint4_WayPoint3']
probs: [0.0, 0.0, 1.0, 0.015384615398943424]
durations: 
  - 
    secs: 17
    nsecs: 761088404
  - 
    secs: 48
    nsecs: 852463148
  - 
    secs: 22
    nsecs: 717355132
  - 
    secs: 51
    nsecs: 571141663

The edge_ids are prepended with the topo map name, not all edges have predictions (I imagine because they weere never executed, but we should use a distance based duration then), and some edges have 0 probability, which will create problems, as the robot will never try to execute it again @Jailander

@Jailander
Copy link
Member

Hi just found the problem, will fix tomorrow morning, the probability 0 is a problem that I don't know how to handle in theory it should be solved by exploration, but for now I can bootstrap the value

@Jailander
Copy link
Member

Hi,

#209 also includes a fix for this, now all unknown edges (those with no statistics) have a probability of 0.5 and duration estimated by distance. Minimum probability now is 0.01 to avoid 0

@bfalacerda
Copy link
Contributor Author

The edge_ids are still prepended by the topological map_name:

edge_ids: ['small_lgjune14__ChargingPoint_WayPoint1', 'small_lgjune14__WayPoint1_WayPoint2', 'small_lgjune14__WayPoint3_WayPoint6', 'small_lgjune14__WayPoint4_WayPoint3', 'small_lgjune14__WayPoint1_ChargingPoint', 'small_lgjune14__WayPoint1_WayPoint7', 'small_lgjune14__WayPoint3_WayPoint4', 'small_lgjune14__WayPoint5_WayPoint4', 'small_lgjune14__WayPoint4_WayPoint2', 'small_lgjune14__WayPoint4_WayPoint5', 'small_lgjune14__WayPoint6_WayPoint2', 'small_lgjune14__WayPoint6_WayPoint3', 'small_lgjune14__WayPoint6_WayPoint7', 'small_lgjune14__WayPoint9_WayPoint8', 'small_lgjune14__WayPoint9_WayPoint10', 'small_lgjune14__WayPoint7_WayPoint1', 'small_lgjune14__WayPoint7_WayPoint6', 'small_lgjune14__WayPoint7_WayPoint2', 'small_lgjune14__WayPoint7_WayPoint8', 'small_lgjune14__WayPoint8_WayPoint9', 'small_lgjune14__WayPoint8_WayPoint10', 'small_lgjune14__WayPoint8_WayPoint7', 'small_lgjune14__WayPoint2_WayPoint1', 'small_lgjune14__WayPoint2_WayPoint4', 'small_lgjune14__WayPoint2_WayPoint6', 'small_lgjune14__WayPoint2_WayPoint7', 'small_lgjune14__WayPoint10_WayPoint9', 'small_lgjune14__WayPoint10_WayPoint8']

@Jailander
Copy link
Member

ooops, sorry I forgot to take that out, give me a second

@Jailander
Copy link
Member

now its done same PR

@bfalacerda
Copy link
Contributor Author

I got this when having everything fully integrated, but i only saw it once in a lot of calls:

[WARN] [WallTime: 1427899979.713486] Caught exception when getting expected time: service [/mdp_plan_exec/get_expected_travel_times_to_waypoint] responded with an error: service cannot process request: service [/topological_prediction/predict_edges] responded with an error: error processing request: 'NoneType' object has no attribute 'probabilities'

@Jailander
Copy link
Member

hmmm that is very weird :/ could it be some ros timing issue?

@bfalacerda
Copy link
Contributor Author

it looks like there was some object that wasnt set somewhere

@bfalacerda
Copy link
Contributor Author

The predict is also a bottleneck in the whole process of getting expected travel times. You think it can be done faster?

@Jailander
Copy link
Member

hmmm, not really, I depend on the fremenserver times.
The Only way I can think of is for example creating predictions for the next hour let's say every five mins and send the closest one to the requested one that should be immediate and not too different since the dynamics of the environment have a much lower frequency

@gestom
Copy link
Member

gestom commented Apr 1, 2015

Currently, one prediction takes ~25ms. How long a prediction is supposed to take ?

@gestom
Copy link
Member

gestom commented Apr 1, 2015

The actual calulation takes much less time, the problem is the communication overhead because you are querying for each state separately.

@bfalacerda
Copy link
Contributor Author

the predictions are called quite a lot of times for each scheduling problem. we should be able to reduce the number of calls, as i think now it's a bit brute force. We'll have to call it one time per edge at least though.

Getting something that calls for all edges in one go would already be a nice improvement then

Also, just to make sure, once the model is built (I assume we'll have a node that rebuild the fremen models once in a while), the prediction times are constant right?

@gestom
Copy link
Member

gestom commented Apr 1, 2015

The fremen models are now build incrementally - every time you add an observation, the fremen model is updated.
I can modify the the predict action so that you can query for multiple states simultanneously. Just open an issue in the fremen.

@Jailander
Copy link
Member

just to clarify, right now the models are built only when the node is started, but I am planning to add a service to rebuild the models when called adding the new info

@gestom
Copy link
Member

gestom commented Apr 1, 2015

@Jailander
Copy link
Member

Hi, forecast reduces operation time greatly :) only one question/suggestion though, now the adaptive order doesn't work any-more as the action server takes only one order I'm going to use order 1 as it the most chosen one unless @gestom suggests otherwise

@bfalacerda
Copy link
Contributor Author

isnt the adaptative thing one of the interesting things about the model building? Why doesnt it work anymore?

@Jailander
Copy link
Member

yes, but is not vital, it doesn't work since it is a different order for each edge but on the action server I can only pass one order for all edges

@gestom
Copy link
Member

gestom commented Apr 2, 2015

@Jailander
Copy link
Member

great!!! :) Sorry didn't know you were already working on this 👍

@bfalacerda
Copy link
Contributor Author

👍

@gestom
Copy link
Member

gestom commented Apr 2, 2015

The adaptive order works a bit differently now. In the old version, you would simply set the order to -1 and the system would take the model with the lowest reconstruction error. Now, you provide measured data and ask fremen by the 'evaluate' action how do the models fit these data. You get the prediction/reconstruction errors for given orders and then select the order which you want. This allows to evaluate the predictive capability of different models for the data that you explicitly choose - this is useful e.g. for cross-validation.

@Jailander
Copy link
Member

the new version in #209 does the prediction in 0.6 secs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants