IEEERobotics / high-level

CV, localization, mapping, planning, and generally anything that will run on the PandaBoard
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

can MapClass access waypoints dict during runtime? #23

Closed rlsnow closed 11 years ago

rlsnow commented 11 years ago

I have written a function, fillLoc, in my MapClass that fills locations so that localizer can tell which locations are filled/empty.

In that function I need to access the waypoints dict. Is the waypoints dict a global that will be accessible to MapClass?

Since mapping isn't really a living process, some process will have to make the function calls to fill a location. So as long as that process has access to waypoints, then it should be fine.

jschornick commented 11 years ago

In order to start using MapClass directly (instead of my test maps), I updated map_class.fillLoc() to take waypoints as a parameter. Passing in the unpickled waypoints dict seems to work as expected.

I also had to fix an issue where mvars.map_grid_vars doesn't exist in this context. Instead, I opted to quickly change these references to (map_real_var * res) calculations.

The relevant commit is SHA: 025407d3b07642e29133161e6e728dc787fd5473

Let me know if there is some reason we need to back out either of those changes.

rlsnow commented 11 years ago

Yea that should give the same result. Good catch. I had to take map_grid_vars out of of the map_vars module and put it back in map_script because it uses the parsed resolution in map_script.

@jschornick, you were able to read the map_real_vars ok? I just realized I may have to pickle map_real_vars since the module that makes it isn't actually called at runtime.