rakeshshrestha31 / map_prediction_enhanced_exploration

Open-source modules for ICRA 2019 submission "Learned Map Prediction for Enhanced Mobile Robot Exploration"
22 stars 7 forks source link

Running the Simulator with the Model #10

Closed Quest2GM closed 2 years ago

Quest2GM commented 2 years ago

Hi @rakeshshrestha31,

I was able to train a model that I think works decently, and I'm interested in testing it out real-time on the simulator like you did in your demo video (https://www.youtube.com/watch?v=NRgXYdxroJE). Is the code for achieving this in the repository? If so, would you be able to direct me to where to look at?

Thank you, Siddarth

Quest2GM commented 2 years ago

I tried to reproduce it, but it didn't seem to work as well as I expected. I trained my model for roughly 300 epochs with learning rate = 1e-4, weight decay = 1e-4 and batch_size = 32, and achieved the following results with the following results in kth_partial_dataset.py:

average_kld_loss 462.1073060469194 overall_stats { "true_positives": 1921963, "false_positives": 1474959, "true_negatives": 15423714, "false_negatives": 508186, "total_positives": 4990690, "total_negatives": 26394910, "total_predicted_positives": 3396922, "total_predicted_negatives": 15931900, "total_certain_positives": 2430149, "total_certain_negatives": 16898673, "total": 31385600, "total_unknowns": 12056778, "total_knowns": 19328822, "total_unknown_positives": 2560541, "total_unknown_negatives": 9496237 } { "accuracy": 0.5526635463397227, "generous_accuracy": 0.8973995932085256, "obstacle_precision": 0.5657954465837014, "obstacle_recall": 0.3851096742133853, "obstacle_generous_recall": 0.7908827812615605, "free_precision": 0.9681026117412236, "free_recall": 0.5843442542520508, "free_generous_recall": 0.912717466040085 }

Checkpoint with Minimized Batch Loss https://user-images.githubusercontent.com/39883561/200447701-9075f95e-2f48-4afd-a008-5e41adc15eea.mp4

Checkpoint with Minimized Test Loss https://user-images.githubusercontent.com/39883561/200447965-c97c1ff6-a90a-4db0-8529-3a3608c7949e.mp4

In the videos, you will see three occupancy grid channels. The thick light grey is the costmap (ie. input to the model), the purple is ground truth, and the black is the prediction.

If anyone was able to achieve better weights, please let me know.

hocherie commented 1 year ago

Hi @rakeshshrestha31 @Quest2GM, Thank you for the repo and @Quest2GM sharing your knowledge in the reproduction.

I did the following:

However, the robot is not on the costmap. See below. image

@Quest2GM , I see that in your video, the robot is aligned with the costmap.
I believe there is some TF issues with my stack, is there a step I am missing? Thank you!

Quest2GM commented 1 year ago

Hi @hocherie,

I believe I ran roslaunch stage_frontier_datagen kth_datagen.launch (not the standalone one), and I added the following two lines: <node pkg="tf" type="static_transform_publisher" name="map_odom_tf" args="0 0 0 0 0 0 odom map 25" /> <node pkg="tf" type="static_transform_publisher" name="base_odom_tf" args="0 0 0 0 0 0 base_link odom 25" /> Let me know if this works.

Quest2GM