Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feasability of removing SimMode #4110

Open
rajat2004 opened this issue Oct 24, 2021 · 4 comments · May be fixed by #4340
Open

Feasability of removing SimMode #4110

rajat2004 opened this issue Oct 24, 2021 · 4 comments · May be fixed by #4340

Comments

@rajat2004
Copy link
Contributor

rajat2004 commented Oct 24, 2021

What feature are you suggesting?

Overview:

AirSim currently uses SimMode which can be Multirotor, Car, or ComputerVision, to determine the types of vehicle which can be used. In each Simmode, we can have multiple vehicles of the supported types (#4109 for CV mode). SimMode is also used in a variety of places for which features are supported where.

This however adds a restriction of not being able to use Multirotor and Car vehicles together or any such combination. This is probably one of the most requested features for a long time (#506, #2990, #1777, #1382, more as well). #506 has some modified repositories which allow this feature using a new SimMode, but it might be possible to achieve this by removing the grouping of SimMode itself and allowing any mix of vehicles. This will be a big effort though, and a breaking change, hence this issue to describe the use case and feasibility, as well as possible enhancements. Would love to hear about any other ideas and issues, possible improvements with this suggestion

Smaller Details:

Instead of SimMode, AirSim would allow any combination of vehicles such as ArduRover + SimpleFlight, etc. SimMode is used in various places to decide the appropriate defaults, I'll try to list some of them below and possible modifications -

  • Physics Engine
    Multiple physics engines are not used at the same time currently. In case of multirotors, FastPhysicsEngine & ExternalPhysics is supported but these aren't used for Car. From the implementations in Can I use a car and a multirotor at the same time? #506, it is possible to use Car & drone together, but not sure whether FastPhysics and ExternalPhysics will work together. Maybe we can have a global setting like used now, but Car if present would still use PhysXCar.
    Needs to be looked into, but it might be possible to have per-vehicle physics engine. Maybe something to be done before this actual implementation would be ensure that ExternalPhysics works with Car as well (will be a good feature improvement regardless)

  • RPC Server
    Each Simmode creates the appropriate server for the APIs. They all use the same port (41451 by default). This will need to be modified to use a different port for multirotors, car, and CV vehicles. Client-side code will likely have a transparent migration. Possible enhancement could be per-vehicle RPC servers also

  • Default Sensors and positions
    Default sensors for Multirotor (IMU, GPS, Baro, Magnetometer), and Car (GPS) alongwith default position of Lidar, Distance sensors relative to the vehicle. This should be changed to per-vehicle type itself.

Removing SimMode can also allow removing external cameras, since such a usecase can be covered through CV vehicles.

Nature of Request:

  • Addition
  • Change
  • Removal

Why would this feature be useful?

More types of scenarios can be simulated, also making AirSim more complete in multi-agent capabilities. Removes the need to handling different combinations individually, will probably lead to code cleanup as well.

Incremental Changes

Since this is a big change, it's better to get small changes, cleanups & refactors, etc done which will help in reducing later effort. Most of these will probably be addressing existing issues. Please feel free to pickup anything, and I'll be glad to discuss or help out in any way I can!

Any comments, ideas, criticism are very much welcome!

@jonyMarino
Copy link
Collaborator

@rajat2004 Thank you very much for these thermometers of what the community is asking for. I also noticed this.

@alonfaraj
Copy link
Contributor

@rajat2004 I also think this feature is also one of the most requested by the community.
Are you planning to work on it?

@rajat2004
Copy link
Contributor Author

@alonfaraj Yeah, I'm planning to work on it but other things came up, and didn't get the time (or motivation) to properly focus on this. Please do go ahead and work if you want to! And if you prefer would love to discuss and work on this with you, let me know your thoughts

@rajat2004
Copy link
Contributor Author

I've also updated the issue description with some smaller things which can be done earlier and will address some current issues/feature requests as well

@alonfaraj alonfaraj linked a pull request Feb 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants