Borrar filtros
Borrar filtros

How can I fix "Invalid partial port connection found between memory layout block" problem when run simulink with Gazebo

5 visualizaciones (últimos 30 días)
I am try to simulate multiple robot in warehouse scenrio with simulink and Gazebo. I using different topics for Gazebo read and apply torque. I adjusted the model from example simulink and exmaple run with Gazebo. Attached file is my world file in Gazebo. When I start running the simulation this problem came up. Anyone know how to fix this. Thank you so much in advance
This is my simulink model

Respuestas (1)

Sanchari
Sanchari el 16 de Feb. de 2024
Hi Setthivadee,
The error message you provided typically indicates that there is a problem with how the ports of certain blocks are connected in your Simulink model. This can happen when a block that expects a certain data type/ signal dimension is connected to a signal that does not match its requirements.
When integrating Simulink with Gazebo, it is important to ensure that all the message interfaces between them are correctly configured. Here are some steps you can take to troubleshoot this issue:
1. Check ROS Network Configuration: You can ensure this by running the following commands in MATLAB command window
>> rosinit % Initialize ROS master connection
>> rostopic list % List all ROS topics to see if Gazebo topics are present
2. Check Block Connections: Ensure correct connection for all blocks and that the output of one block is compatible with the input of the next block in terms of signal dimensions and data types.
3. Examine Data Types: Ensure signals match the expected data types of the Gazebo topics. You can do so by:
a. Using the ‘Model Data Editor’ to view and edit data types.
b. Enable the display data types in Simulink from Display Menu > Signals & Ports > Signal Data Types.
4. Verify Signal Dimensions: Ensure that the signals from Simulink match the Gazebo signal dimensions. You can do so by:
a. Using the Signal & Scope Manager from Simulink Toolstrip to manage signal dimensions.
b. Enable the display of port dimensions from Display menu > Signals & Ports > Port Dimensions.
5. Check with Model Advisor: Right click on the model background and select to run Model Advisor. Use the checks under “Simulink > Check model for data type and dimension issues” to automatically detect and help fix the problems.
6. Use Bus Signals: If multiple data types or nested structures are involved, consider using bus signals in Simulink to match the structure of the Gazebo messages.
7. Check Gazebo Plugin Configuration: Make sure that the Gazebo plugins (ROS) used for communication with Simulink are correctly configured and that the topics are correctly mapped.
8. Update Software: Please consider upgrading software to the latest MATLAB version R2023b as it is likely to be fixed in the latest release.
Please refer to the following links for further information on:
  1. Creating topic (ML Answer): https://in.mathworks.com/matlabcentral/answers/427862-how-to-create-topic?s_tid=answers_rc1-1_p1_Topic
  2. Error using Example Helper Gazebo: https://in.mathworks.com/support/search.html/answers/447866-error-using-examplehelpergazebocommunicator-startmodelservices-line-334.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:support/network-c5032&page=1
I hope this resolves your query!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by