Open rajat2004 opened 3 years ago
@rajat2004 Thank you very much for these thermometers of what the community is asking for. I also noticed this.
@rajat2004 I also think this feature is also one of the most requested by the community. Are you planning to work on it?
@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
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
What feature are you suggesting?
Overview:
AirSim currently uses
SimMode
which can beMultirotor
,Car
, orComputerVision
, 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 #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 usePhysXCar
. 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 alsoDefault 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:
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!
simAddVehicle
API working with Car, CV vehicles Currently this API only works with multirotors, Car, CV vehicles fail with the error mentioned in https://github.com/microsoft/AirSim/pull/4109#issuecomment-950307936 (possible workaround is mentioned in later comment). PR - #4203Any comments, ideas, criticism are very much welcome!