microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.28k stars 4.53k forks source link

Vehicle API for 'Car1' is not available. #1342

Closed EricJin101 closed 6 years ago

EricJin101 commented 6 years ago

when I run python multi_agent_car.py I got this result

Connected! Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

Traceback (most recent call last): File "multi_agent_car.py", line 31, in client.enableApiControl(True, "Car1") File "/home/eric/AirSim/PythonClient/airsim/client.py", line 37, in enableApiControl return self.client.call('enableApiControl', is_enabled, vehicle_name) File "/home/eric/anaconda3/lib/python3.6/site-packages/msgpackrpc/session.py", line 41, in call return self.send_request(method, args).get() File "/home/eric/anaconda3/lib/python3.6/site-packages/msgpackrpc/future.py", line 45, in get raise error.RPCError(self._error) msgpackrpc.error.RPCError: rpclib: function 'enableApiControl' (called with 2 arg(s)) threw an exception. The exception contained this information: Vehicle API for 'Car1' is not available. This could either because this is simulation-only API or this vehicle does not exist.

I'v changed the setting.json

sytelus commented 6 years ago

You probably don't have correct settings.json that has Car1 as vehicle - just what error says.

EricJin101 commented 6 years ago

After you changed the settings.json, you need to stop the simulation and restart it....