You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure there is going to be a solution here, but I wanted to check with the authors of this crate if they've come across this problem before and if they have solutions.
I'm struggling / un-able to use this crate to deserialize messages containing fixed sized arrays with more than 32 elements in them. from_slice<> obviously requires that Deserialize is implemented for the type in question, but #[derive(Deserialize)] is only able to produce valid deserialization impls for fixed size arrays of 32 elements or less. Otherwise you get:
error[E0277]: the trait bound `[f64; 33]: Deserialize<'_>` is not satisfied
--> src/datatests/nav_sat_fix.rs:14:9
|
14 | pub r#position_covariance: [f64; 33],
| ^^^ the trait `Deserialize<'_>` is not implemented for `[f64; 33]`
|
= help: the following other types implement trait `Deserialize<'de>`:
[T; 0]
[T; 1]
[T; 2]
This is particularly challenging because several "standard" ros messages like TwistWithCovariance have fixed sized arrays with 36 members.
I'm not sure there is going to be a solution here, but I wanted to check with the authors of this crate if they've come across this problem before and if they have solutions.
I'm struggling / un-able to use this crate to deserialize messages containing fixed sized arrays with more than 32 elements in them. from_slice<> obviously requires that Deserialize is implemented for the type in question, but #[derive(Deserialize)] is only able to produce valid deserialization impls for fixed size arrays of 32 elements or less. Otherwise you get:
This is particularly challenging because several "standard" ros messages like TwistWithCovariance have fixed sized arrays with 36 members.
I'm assuming someone has already solved this and I'm just being dumb in roslibrust, but not excited about a solution like this: https://stackoverflow.com/questions/62665558/how-can-i-implement-serdedeserialize-for-arrays-larger-than-32
Looking for any guidance.
The text was updated successfully, but these errors were encountered: