Gazebo Customized Plugin: Read contact positions that contains both a variable sized element and an array of sub-buses
Mostra commenti meno recenti
Hello,
I have tired to use the customized Gazebo plugin with Simulink and Gazebo in the virtual machine (Ubuntu).
The communication works between Gazebo in the virtual machine and Simulink.
However, when I try to read the contact-positions information (multiple contacts), the error occurs as shown below.
Simulation 1
04:28 AM Elapsed: 3 sec
Diagnostics 1
01:52 AM Elapsed: 20 sec
Simulation 1
01:52 AM Elapsed: 2 sec
Simulation 1
02:30 AM Elapsed: 3 sec
Simulation 1
02:31 AM Elapsed: 3 sec
The bus object 'Gazebo_SL_Bus_gazebo_msgs_custom_gazebo_msgs_Contacts' associated with
the block 'gazeboCosimControl_ys_v3/Gazebo Robot/Bus Selector13' contains both a variable sized element
and an array of sub-buses. Arrays of buses cannot be used in conjunction with bus objects that
contain variable sized elements.
Component: Simulink | Category: Block error
In addition, the contact-positions have the following variable sized elements based on Gazebo simulation. I mean multiple contacts can include to this information as shown below.

To solve this issue, I have tried to use several blocks related to 'bus' such as, bus to vector, to virtual bus, bus selector, etc, but I couldn't solve it.

Do you have any advice to address this issue?
Thank you so much in advance,
Yun
Risposta accettata
Più risposte (2)
Gaurav Bhosale
il 14 Giu 2021
0 voti
Hi Yunsik,
You can directly get Position.x at Bus Selector 13 by selection/expanding Position in Bus Selector.
Any specific reason to have two bus selector?
Gaurav Bhosale
il 29 Giu 2021
0 voti
Hi Yunsik,
Add 'MATLAB function' block in Simulink and add following code lines in the function
function y = fcn(u)
y = string(char(u'));
Thanks
1 Commento
Yunsik Jung
il 30 Giu 2021
Modificato: Yunsik Jung
il 3 Lug 2021
Categorie
Scopri di più su Vehicle Network Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!









