im planning to do a CO-Simulation with Matlab/Simulink and Gazebo with the ROS-Toolbox in Simulink. There is a specific tool named 'Gazebo Pacer' which synchronize Gazebo simulation with the time step of Simulink. Do you have any idea to play a rosbag under this circumstances?
For clarification. I want to play a rosbag, since i press the start button in Simulink. One approach was to add the rosbag in the launchfile which is launching the whole gazebo environment. But if i do this, the playback starts immediately. But i want to start it with the play button from Simulink. Furthermore, i couldn't figure out a way to synchronize the rosbag and the simulink timestep.
Is there a possible solution for it? Or have anyone similiar problems? Maybe there is an approach with the c++ api? I'm very interested in a solution or at least a solution suggestion...