- Ensure that the ROS service message definition is correctly defined and available in your ROS environment. Make sure you have sourced the appropriate ROS setup file.
- Double-check the configuration of the ROS Call Service block. Verify that the service name and message type are correctly specified.
- If you recently changed the service type, try restarting MATLAB to ensure that any cached information is cleared.
- If the issue persists, consider reinstalling or updating the ROS toolbox in MATLAB to ensure compatibility between MATLAB R2021b and ROS Melodic.
Call Service block in simulink error "input must be a structure"
2 次查看(过去 30 天)
显示 更早的评论
Hi, everyone
I have a Matlab R2021b and Ros melodic , I'm using call service to request message from Ros melodic, but when I change service type,(click "select" button), it returns error, as show in the picture, and the communication between ros and simulink is right.
Is there somebody know how to solve this problem, thank you.
0 个评论
回答(1 个)
Sugandhi
2023-10-19
Hi,
I understand that you are getting errros on using call service to request message from Ros melodic, and change service type.
The error message you encountered indicates that the input to the ROS Call Service block's mask parameter callback should be a structure, but it received something else. This error commonly occurs when there is an issue with the ROS service definition or the configuration of the block itself.
To resolve this issue, you can try below few workarounds:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Messages 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!