Skip to content

[Unity] Fix Car API - #2937

Merged
David Zimmermann (zimmy87) merged 3 commits into
microsoft:masterfrom
rajat2004:fix-unity-car-api
May 24, 2021
Merged

[Unity] Fix Car API#2937
David Zimmermann (zimmy87) merged 3 commits into
microsoft:masterfrom
rajat2004:fix-unity-car-api

Conversation

@rajat2004

@rajat2004 Rajat Singhal (rajat2004) commented Aug 16, 2020

Copy link
Copy Markdown
Contributor

Set API enabled so that it uses API controls rather than keyboard
Plus fix some warnings

Will be easier to review commit wise

Closes #2679, closes #2636, closes #2631

Some more cleanup needs to be done, keyboard_controls_ is actually incorrect and doesn't contain the keypresses, that is actually been done here. It can be seen that the external controls are applied only when isApiEnabled is true, which is being added in this PR.
CarPawn is supposed to provide the keyboard_controls but is just a placeholder, and doesn't do anything, so I think that can be removed

TODO:

  • A method should probably be added so that CarPawnSimApi can fetch the keyboard controls from Car.cs, without this, the getCarControls API won't work to fetch the keyboard values.
  • Figure out why reverse throttle isn't working (Works in Unreal)
airsim_unity_car_api.mp4

These changes will diverge Unity implementation from Unreal one, but shouldn't be much of a problem

@rajat2004

Rajat Singhal (rajat2004) commented Aug 17, 2020

Copy link
Copy Markdown
Contributor Author

Ratnesh Madaan (@madratman) Sai Vemprala (@saihv) Jonathan (@jonyMarino) If possible, could you have a look at why Travis is not triggering and the Azure Pipelines status aren't getting updated? Seems to be happening for all PRs in the last 2-3 days
Thanks

Edit: Travis does get triggered, but not appearing in the CI checks - https://travis-ci.org/github/microsoft/AirSim/pull_requests

@HackBrettHB

Copy link
Copy Markdown
Contributor

Thank you, this PR solved my problem! Why is it not merged into master yet?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor style changes. Tested with PythonClient\car\hello_car.py, PythonClient\car\drive_straight.py, and PythonClient\car\car_monitor.py, and the PR appears to work as intested

Comment thread Unity/AirLibWrapper/AirsimWrapper/Source/Vehicles/Car/CarPawnSimApi.cpp Outdated
Comment thread Unity/AirLibWrapper/AirsimWrapper/Source/Vehicles/Car/CarPawnSimApi.cpp Outdated
Comment thread Unity/AirLibWrapper/AirsimWrapper/Source/Vehicles/Car/SimModeCar.cpp Outdated
@zimmy87

Copy link
Copy Markdown
Contributor

Thanks for the contribution Rajat Singhal (@rajat2004)!

@zimmy87
David Zimmermann (zimmy87) merged commit 6d9535a into microsoft:master May 24, 2021
@rajat2004
Rajat Singhal (rajat2004) deleted the fix-unity-car-api branch May 25, 2021 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

4 participants