The current implementation just replicates the train_gnn script:
The model and trainer are created using Pytorch Lightning and a similar configuration class
It creates an InMemory dataset from the mission graph
During runtime, it runs the fit method from Lightning and resets the epochs (otherwise it doesn't optimize the next iteration)
There are a few things that were problematic on my laptop:
The configuration class overwrites the input parameters of the python scripts, and conflicts with the rosparams if they are passed as arguments to the script. Probably this can be solved by using roslaunch and loading from the parameter server instead though
I observed some latency in the image callback when training was running. Perhaps I need to check again if there are blocking elements (there are some mutex in the underlying graph structure that I may need to debug), or maybe my computer is just too slow.
In any case, perhaps we can just implement the optimization loop using pure torch, so we have more control as in other approaches (e.g, NICE-SLAM)
The current implementation just replicates the
train_gnn
script:fit
method from Lightning and resets the epochs (otherwise it doesn't optimize the next iteration)There are a few things that were problematic on my laptop:
In any case, perhaps we can just implement the optimization loop using pure torch, so we have more control as in other approaches (e.g, NICE-SLAM)