VectorizedMultiAgentSimulator icon indicating copy to clipboard operation
VectorizedMultiAgentSimulator copied to clipboard

[Enhancement] Give the possibility to set "n_rays" Lidar in Navigation-Discovery-Flocking scenarios

Open Giovannibriglia opened this issue 1 year ago • 0 comments

Issue: In scenarios where agents are equipped with Lidar, the "n_rays" parameter is currently fixed at 12. It would be beneficial to allow users to set this parameter via the kwargs to offer more flexibility.

Question:

  • I've already implemented this enhancement in my local repository for the navigation and flocking scenarios, as it was a simple change (just defining the variable). However, I haven't yet implemented it for the discovery scenario, since if self.use_agent_lidar is set to True, there are two components involved. Which component(s) should we allow the user to configure in this case, the default(15) or the additional(12)? https://github.com/proroklab/VectorizedMultiAgentSimulator/blob/89882a6ae2a591fe273ffbaf74ec2a5244333e8a/vmas/scenarios/discovery.py#L73

Suggestions:

  • For the navigation and flocking scenarios, introduce the following code to enable custom Lidar rays:
    self.n_rays = kwargs.pop("n_rays", 12)
    
  • For the discovery scenario, we could apply a similar approach for the default Lidar, keeping the additional Lidar fixed with 12 rays when self.use_agent_lidar is True. What do you think about?

Giovannibriglia avatar Sep 05 '24 07:09 Giovannibriglia