ROS Toolbox - Can't access a ROS Message Array
Mostra commenti meno recenti
(cannot paste from clip board to here so I'm retyping by hand)
uwb_ts = timeseries(uwb, 'Pose.Pose.Position.X', Pose.Pose.Position.Y', 'Pose.Covariance')
where uwb is a nav_msgs/Odometry message
I can Read the scalars but I can't read the array. I don't see any examples of getting arrays.
Matlab sees this as: (can't paste into this buffer so trust me, it's Pose.Covariance) yet it crashes with a no such thing message
1 Commento
Jeff Vandegrift
il 30 Ott 2019
Risposte (2)
Jeff Vandegrift
il 30 Ott 2019
0 voti
Cam Salzberger
il 1 Mag 2020
0 voti
Hello Jeff,
I know this is pretty old, but I wanted to get visibility on the reason for this error. I've just answered a similar question here.
The issue is that the timeseries method for BagSelection objects is only valid for use with numerical and scalar data. The Covariance field is an array, so timeseries cannot extract it. I understand that the error message is confusing, and have submitted a request to the appropriate team to look into improving it.
If you make use of readMessages(..., "DataFormat", "struct"), that is generally much faster than the standard "readMessages". It's a good way to get quick access to data.
-Cam
Categorie
Scopri di più su Specialized Messages in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!