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

Add AirSimManager to CarDemo scene in Unity #4290

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Add AirSimManager to CarDemo scene in Unity #4290

merged 1 commit into from
Feb 23, 2022

Conversation

lnexenl
Copy link
Contributor

@lnexenl lnexenl commented Jan 13, 2022

Fixes:

The RPC server of CarDemo isn't launched when running CarDemo scene in Unity.

About

Add AirSimManager to CarDemo scene in Unity to launch RPC server when CarDemo scene is started.

How Has This Been Tested?

# when AirSimManager wasn't added to CarDemo, the rpc server was not started.
python .\hello_car.py
WARNING:tornado.general:Connect error on fd 1192: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 1192: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 1192: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 1192: WSAECONNREFUSED
WARNING:tornado.general:Connect error on fd 1192: WSAECONNREFUSED
Traceback (most recent call last):
  File ".\hello_car.py", line 11, in <module>
    client.confirmConnection()
  File "C:\code\AirSim\PythonClient\airsim\client.py", line 139, in confirmConnection
    if self.ping():
  File "C:\code\AirSim\PythonClient\airsim\client.py", line 35, in ping
    return self.client.call('ping')
  File "C:\Users\*\anaconda3\lib\site-packages\msgpackrpc\session.py", line 41, in call
    return self.send_request(method, args).get()
  File "C:\Users\*\anaconda3\lib\site-packages\msgpackrpc\future.py", line 43, in get
    raise self._error
msgpackrpc.error.TransportError: Retry connection over the limit

# when AirSimManager is added to CarDemo, hello_car.py runs correctly.
python .\hello_car.py
Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

API Control enabled: True
Saving images to C:\Users\*\AppData\Local\Temp\airsim_car
Speed 0, Gear 0
Go Forward
Go Forward, steer right
Go reverse, steer right
Apply brakes
Retrieved images: 4
Type 3, size 23651
Type 2, size 36864
Type 0, size 23596
Type 0, size 110592
Speed 11, Gear 0
Go Forward
Go Forward, steer right
Go reverse, steer right
Apply brakes
Retrieved images: 4
Type 3, size 1698
Type 2, size 36864
Type 0, size 26066
Type 0, size 110592
Speed 9, Gear 0
Go Forward
Go Forward, steer right
Go reverse, steer right
Apply brakes
Retrieved images: 4
Type 3, size 1720
Type 2, size 36864
Type 0, size 22335
Type 0, size 110592

Screenshots (if appropriate):

current hierarchy of DroneDemo

current hierarchy of CarDemo

Compared to DroneDemo, CarDemo lacks AirSimManager.

@ghost
Copy link

ghost commented Jan 13, 2022

CLA assistant check
All CLA requirements met.

@zimmy87
Copy link
Contributor

zimmy87 commented Feb 23, 2022

Tested this fix locally and it's working for me, so I am moving ahead with merging.

@zimmy87 zimmy87 merged commit 5ff15e7 into microsoft:master Feb 23, 2022
@Lyccccccccccc
Copy link

Hi, I don't know what's wrong but when I added AirSimManager to CarDemo and hit play, Unity just crashed.

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

Successfully merging this pull request may close these issues.

4 participants