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

Update types.py to fix issues with 'bad cast' RPCError #101

Closed
wants to merge 1 commit into from

Conversation

gstcyr
Copy link

@gstcyr gstcyr commented Aug 9, 2024

It looks like someone started transitioning the RPC messages to be array based instead of dict based but they didn't finish the job.

I haven't verified that all the types match between types.py and the structures defined in RpcLibAdaptorsBase.hpp, but I found at least one error in ImageResponse (missing the new camera_name attribute) so there very well could be others.

Fixes: #100
Fixes: #99

About

See above

These changes also break backwards compatibility with the pip install airsim library. I'd recommend registering a new codexairsim plugin with pip and making use of the ServerVersion and ClientVersion properties.

There's another airsim fork by Cosys (https://github.com/Cosys-Lab/Cosys-AirSim), which also works with 5.4 and adds some new features, but for me it breaks other things. Might be helpful to someone.

How Has This Been Tested?

Tested locally. If you want to use this, you'll need to copy the PythonClient\airsim files and overwrite the files you installed via pip install airsim

Screenshots (if appropriate):

It looks like someone started transitioning the RPC messages to be array based instead of dict based but they didn't finish the job. 

I haven't verified that all the types match between `types.py` and the structures defined in `RpcLibAdaptorsBase.hpp`, but I found at least one error in `ImageResponse` (missing the new `camera_name` attribute) so there very well could be others.
@gstcyr
Copy link
Author

gstcyr commented Aug 9, 2024

Probably would be best to revert the changes moving from MSGPACK_DEFINE_MAP to MSGPACK_DEFINE_ARRAY and having to keep an attribute_order property synced between server and client. It breaks backwards compatibility and introduces a new source of potential errors for very little gain.

@chaoer
Copy link

chaoer commented Aug 12, 2024

Probably would be best to revert the changes moving from MSGPACK_DEFINE_MAP to MSGPACK_DEFINE_ARRAY and having to keep an attribute_order property synced between server and client. It breaks backwards compatibility and introduces a new source of potential errors for very little gain.

I tried to revert the changes moving from MSGPACK_DEFINE_MAP to MSGPACK_DEFINE_ARRAY.

But I cannot compile it with errors like: MSGPACK_DEFINE_MAP has not enough params.

@gstcyr
Copy link
Author

gstcyr commented Aug 12, 2024

Ya I noticed the same thing. Not sure what has changed to cause MSGPACK_DEFINE_MAP to break, only thing I could think of was rpclib was upgraded from 2.3.0 to 2.3.1 a couple months ago, but even reverting that I couldn't get it to work. Could be because I forgot to clean or delete a cache directory though

@xxEoD2242
Copy link

Updated in #102

@xxEoD2242 xxEoD2242 closed this Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue in MultiRotor movement using simSetVehiclePose Python API error
3 participants