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.

JackalRosbagModel.png

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. The jackal_sim.bag file is attached to this example.

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

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

sim(gcs)

jackalROsbagRecord.png