Open V7KX opened 1 month ago
Hello, I have the same issue with this function, I can't run hello_drone.py. I am using UE 5.4, Win10, Colosseum-main.
I get this error:
###################################################
Traceback (most recent call last):
File "C:\Users\amax\Colosseum\PythonClient\multirotor\hello_drone.py", line 15, in
Did you find any solution ?
Sorry, I haven't solved this problem either. It seems that Colossum is unable to obtain the status information of the drone itself. The version I am currently using is cosys-airsim, but it also has a problem as it cannot set ' "DrawDebugPoints": true, ' in settings. json, otherwise it will crash. So I think if it's not necessary, it's better to use UE4 back.
Liu Zhe @.***
College graduates Shandong Province, China
------------------ 原始邮件 ------------------ 发件人: "CodexLabsLLC/Colosseum" @.>; 发送时间: 2024年11月7日(星期四) 晚上10:15 @.>; 抄送: "Liu @.**@.>; 主题: Re: [CodexLabsLLC/Colosseum] getMultirotorState() Function error (Issue #106)
Hello, I have the same issue with this function, I can't run hello_drone.py. I am using UE 5.4, Win10, Colosseum-main. I get this error: ################################################### Traceback (most recent call last): File "C:\Users\amax\Colosseum\PythonClient\multirotor\hello_drone.py", line 15, in state = client.getMultirotorState() File "C:\Users\amax\Colosseum\PythonClient\airsim\client.py", line 1594, in getMultirotorState return MultirotorState.from_msgpack(self.client.call('getMultirotorState', vehicle_name)) File "C:\Users\amax\Colosseum\PythonClient\airsim\types.py", line 36, in from_msgpack raise ValueError("Length of encoded data does not match number of attributes") ValueError: Length of encoded data does not match number of attributes #####################################################################
Did you find any solution ?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Thanks for your answer. I tried also Pegasus based on Isaac Sim. It seems to work but is very GPU demanding.
I changed types.py file (PythonClient/airsim/) and I don't have the error message.
def from_msgpack(cls, encoded):
obj = cls()
# if len(encoded) != len(cls.attribute_order):
# raise ValueError("Length of encoded data does not match number of attributes")
# for index, (attr_name, attr_type) in enumerate(cls.attribute_order):
# value = encoded[index]
# if issubclass(attr_type, MsgpackMixin):
# value = attr_type.from_msgpack(value)
# setattr(obj, attr_name, value)
if isinstance(encoded, dict):
for k, v in encoded.items():
if (isinstance(v, dict) and hasattr(getattr(obj, k).__class__, 'from_msgpack')):
obj.__dict__[k] = getattr(getattr(obj, k).__class__, 'from_msgpack')(v)
else:
obj.__dict__[k] = v
else:
obj = encoded
return obj
Bug report
What's the issue you encountered?
I want to draw the flight trajectory of a drone, but every time the program calls getMultirotorState() function, it will report an error.
Settings
How can the issue be reproduced?
Include full error message in text form
What's better than filing an issue? Filing a pull request :).