Exploration to PointGoal Transfer
See original GitHub issueHi dear @devendrachaplot Thank you for open-sourcing your work! I enjoyed reading your paper “Learning To Explore Using Active Neural SLAM”. The experiment setup and usage instructions are concise and easy to follow. I was able to run the code without any issues (except import errors fixed here https://github.com/devendrachaplot/Neural-SLAM/issues/1). The environment exploration visualizations generated by pre-trained models look amazing!
I’m struggling with Exploration to PointGoal Transfer. Basically, I understand the idea that the GlobalPolicy should be fixed to output PointGoal coordinates. But I fail to implement this idea in code.
-
So the general question is: How to transform episode PointGoal coordinates to “local map” coordinates so that they could be used by the short-term goal planner? *I see that GlobalPolicy’s output is a point in “local map” coordinates. My intuition is that PointGoal coordinates should be converted to “full map” coordinates and then to “local map” coordinates.
-
Could you, please, also explain the math behind this expression? What does
st
mean? Why do we add 180 to orientation? https://github.com/devendrachaplot/Neural-SLAM/blob/e833e8f20c5a8d71552a5d22fb78ad6980cfc80c/env/habitat/exploration_env.py#L613 -
And how
get_grid
function works? https://github.com/devendrachaplot/Neural-SLAM/blob/e833e8f20c5a8d71552a5d22fb78ad6980cfc80c/utils/model.py#L7 *I understand that it returns rotation and transition matrix. But, again, what is the math behind? I’m also confused withF.affine_grid
function. And the similar transformation here https://github.com/devendrachaplot/Neural-SLAM/blob/e833e8f20c5a8d71552a5d22fb78ad6980cfc80c/model.py#L206 -
And what is the intuition for applying
get_new_pose_batch
function? https://github.com/devendrachaplot/Neural-SLAM/blob/e833e8f20c5a8d71552a5d22fb78ad6980cfc80c/model.py#L262
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
The hacky/easy way of getting rid of this error is just waiting till the max_episode_length in the step function:
You can add the following at L198 in env/habitat/exploration_env.py:
The better way, which will require a lot of code change, is to pass is to set done=True when self._previous_action == 0 in step function and then checking which thread has episode finished in main.py (at L371) and resetting map for a thread when it is finished. You will also need to sync this with local steps (because map get shifted between global steps). This should not change the results, it will only help in reducing the runtime.
Some more notes:
--noisy_actions 0
,--noisy_odometry 0
and--use_pose_estimation 0
arguments--map_size_cm 3000
and--global_downscaling 1
arguments. This will increase the runtime slightly.Hi,
In order to transfer to the pointgoal task, you need to transform the relative pointgoal directions to map coordinates, pass these coordinates to the planner and add a check for stop action.
You will need to do the following:
I might be missing a few things, let me know if the above does not work as expected.
Regarding the other questions, ‘st’ stands for spatial transformation. ‘get_grid’ and ‘F.affine_grid’ functions are used to get the parameters for the spatial transformation. You can check out the paper on spatial transformer networks (https://arxiv.org/pdf/1506.02025.pdf) and the pytorch tutorial (https://pytorch.org/tutorials/intermediate/spatial_transformer_tutorial.html) to get more details.
The ‘get_new_pose_batch’ function adds the relative pose change to the previous pose to the get the current pose. It computes current pose for a batch of inputs for efficiency.
The ‘get_sim_location’ function is converting the quaternion pose in the simulator to a single orientation of the agent in the top-down view.
Hope this helps.