How to put data into a ROS mssage with Array Buses
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
when publish a topic with Array Buses inside the messagetype in Simulink, there's no way to put data into the array buses. I tried many solutions to put the data into the array buses, finally, when typing rostopic echo the topic ,data is NAN.Like the example below: I tried many ways to put data into "Points",including combine a array buses to the port or use a blank messagetype Point32 to transmit the data; when I put data directly into Points.X, there's an error remand me can not replace the signal within an array buses; but all failed. Hope to find a solution to solve this problem.Thanks a lot.
0 Commenti
Risposte (1)
Cam Salzberger
il 28 Ott 2019
Hello Xiaobo,
I believe that the recommended workflow (or at least the easiest) is to simply use a MATLAB Function block to do the assignment of values to a nested array message. See this example for an example model you can use as reference. Don't forget to manage the array sizes as well for variable-length arrays.
-Cam
0 Commenti
Vedere anche
Categorie
Scopri di più su Publishers and Subscribers in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!