Skip to content

Uavnet sim patch1#8

Open
hkphimanshukumar321 wants to merge 4 commits intoZihao-Felix-Zhou:masterfrom
hkphimanshukumar321:uavnet-sim-patch1
Open

Uavnet sim patch1#8
hkphimanshukumar321 wants to merge 4 commits intoZihao-Felix-Zhou:masterfrom
hkphimanshukumar321:uavnet-sim-patch1

Conversation

@hkphimanshukumar321
Copy link

No description provided.

This file implements a circular pattern mobility model for UAV simulation, allowing drones to fly in circular paths with configurable parameters.
@ddherm
Copy link
Contributor

ddherm commented Jan 13, 2026

@hkphimanshukumar321 Hi~
First of all, thank you for this PR! I really appreciate your effort to add the Circular Pattern Mobility Model and TDMA support to UavNetSim-v1.
I’ve reviewed the code and have a few comments regarding the implementation:

  1. Missing TDMA Code: The PR description mentions the addition of a TDMA MAC protocol, but I couldn't find the implementation in the cmmitted files. Could you please double-check if those files were missed?
    2.I nstantiation Issue: In drone.py, I noticed that only the CircularPattern class is instantiated. The SpiralPattern class appears to be unused in the main logic.
  2. SpiralPattern Issues: The SpiralPattern class is currently incomplete:
    ①It is missing the get_next_position() method.
    ②It lacks a proper initialization mechanism. Specifically, it's missing an initialized flag and a corresponding setup method (similar to initialize_circular_motion in the circular pattern). As a result, the UAV's starting position is not being handled correctly.

Could you please update the code to address these issues? I look forward to your reply so we can proceed with the merge.
Thanks again!

This TDMA protocol is needed to be instantiated manually by changing the drone , using MAC from CSMA/CA to TDMA then the modelled TDMA will show different results for the metrics mentioned.
Removed the SpiralPattern class, which provided functionality for a drone to fly in an expanding or contracting spiral trajectory. will make a seperate class fro spiral movement and make necessarry change sin thsi movment pattern
@Zihao-Felix-Zhou
Copy link
Owner

Hi, @hkphimanshukumar321 , thank you for your PR. We have reviewed the tdma.py today and noticed some subtle bugs: when adding the first drone into the environment, it can not be assigned to a certain slot as expected (yields an empty dictionary), which results in some issues in the transmission timeline of the UAV 0. In addition, some functions like update_slot_assignment() are not be used.

Actually, we have fixed these problems, if you want, I would be happy to email you the new revised tdma.py, and then we can merge it into the project.

@hkphimanshukumar321
Copy link
Author

Hey,

Thanks for the review and for catching those bugs with the drone slot assignment!

Yes, please email me the revised tdma.py. I’d be happy to use your fixed version so we can proceed with the merge.

Thanks again!

@hkphimanshukumar321
Copy link
Author

Just a heads-up: I am currently working on adding more mobility models (spiral model initially incomplete) and an RL-based MAC selection feature. I plan to update the project with these soon. If you have any suggestions or specific features you'd like to see regarding that, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants