-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
Description
Hi, I'm Japanese student. and, i'm new to airsim,github,python, and matlab.
I want to use airsim for visual odometry. so, I made this matlab script.
clc
clear
%%addpath windows起動ごとにリセットされるっぽいのでここでチェックして、必要に応じて加える
if count(py.sys.path,'C:\Users\hashimoto\git\AirSim\PythonClient') == 0
insert(py.sys.path,int32(0),'C:\Users\hashimoto\git\AirSim\PythonClient');
end
%%connect to the AirSim simulator
client=py.AirSimClient.CarClient; %クライアントの宣言
client.confirmConnection();
client.enableApiControl(true); %接続とAPIの有効化
car_controls = py.AirSimClient.CarControls; %コントローラーの宣言
%%車両状態の取得と表示
car_state = client.getCarState();
state = car_state.kinematics_true.orientation.x_val
%%車両状態の指定
car_controls.throttle = 0.15
car_controls.steering = 1.0
client.setCarControls(car_controls)
%%画像の取得 badcastが出て止まる
response = client.simGetImages(py.list({ py.AirSimClient.ImageRequest(0, 0, false, false), py.AirSimClient.ImageRequest(1, 0, false, false) }))
client.reset()
client.enableApiControl(false)
this script uses matlab's python call function. this script requires follow this page's task. https://github.com/Microsoft/AirSim/blob/master/docs/python.md
but, in simGetImages function, exception error occurred. this is error message.
エラー: future>get (line 45)
Python エラー: RPCError: rpclib: function 'simGetImages' (called with 1 arg(s)) threw an exception. The
exception contained this information: bad cast.
エラー: session>call (line 41)
return self.send_request(method, args).get()
エラー: AirSimClient>simGetImages (line 262)
responses_raw = self.client.call('simGetImages', requests)
I can't determine whether "bad cast" error is by matlab or by msgpack.
so, can anyone give me advice?