(ROS) Matlab not publishing to Gazebo while still being able to subscribe

2 次查看(过去 30 天)
Hi! I’m new to ros and I am doing a series of small projects for an exam in which we control the turtlebot through matlab&simulink (working on ubuntu 20.04).
I had never had any problem with publishing from matlab/simulink to gazebo until a couple of hours ago, when suddenly simulink stopped being able to send commands to gazebo. It can subscribe without problems (e.g, I can get the odometry), but if I try, for example, to set a velocity from matlab with the setVelocity function, the bot in Gazebo doesn’t move.
I read other posts on this forum that mentioned similar issues, and I have tried the proposed solutions: I checked if gazebo and matlab are connected to the same IP and they are, I checked nodes and topics between matlab and terminal and they are the same. I've seen mentioned also checking the firewall status, and it says 'inactive'.
Also, I think it’s worth mentioning that I have not changed anything in my setup. Everything happened suddenly, without apparent reason.
Could you please help me find a solution?
Thank you!

回答(1 个)

Animesh
Animesh 2023-8-31
Based on your post, it seems that you haven't provided any specific error codes.
I would like to suggest the following resources to help you with setting up the Gazebo Simulation Environment and troubleshooting any issues you may encounter:

类别

Help CenterFile Exchange 中查找有关 ROS 2 Network Access in Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by