Main Content

Play Back Data from Jackal rosbag Logfile in Simulink

Use the Read Data block to play back data from a rosbag logfile recorded from a Jackal™ robot from ClearPath™ Robotics.

Load the model.

open_system('read_jackal_pose_log.slx')

Open the Read Data block mask to load a rosbag logfile. Click the Load logfile data link. Browse for the logfile and specify a time offset or limited duration if needed. Thejackal_sim.bagfile is attached to this example.

Select the desired topic,/odometry/filtered, which containsnav_msgs/Odometrymessages. The Read Data block outputs the messages from the rosbag logfile. A bus selector extracts the xy-position from thenav_msgs/Odometrymessages

Run the model. The block plays back data in sync with the simulation time. TheRecordplot displays the robot position over time.

sim(gcs)