rosrun plotjuggler PlotJuggler --help Usage: /opt/ros/kinetic/lib/plotjuggler/PlotJuggler [options] PlotJuggler: the time series visualization tool that you deserve
Options: -v, --version Displays version information. -h, --help Displays this help. -n, --nosplash Don't display the splashscreen -t, --test Generate test curves at startup -d, --datafile <file> Load a file containing data -l, --layout <file> Load a file containing the layout configuration --buffer_size <seconds> Change the maximum size of the streaming buffer (minimum: 10 default: 60)
import bagpy from bagpy import bagreader import pandas as pd import seaborn as sea import matplotlib.pyplot as plt import numpy as np
#read your rosbag file b = bagreader('1.bag') #check available topics b.topic_table #decode message on every topic data = b.message_by_topic('TOPIC_NAME') #output selected topic data as csv with a created new folder print("File saved: {}".format(data)) #read csv data as DataFrame in pandas df = pd.read_csv(data) #plot a scatter graph fig, axis = bagpy.create_fig(1) axis[0].scatter(x = 'X_data', y = 'Y_data', data = df, s= 1, label = 'label_name') axis.legend() axis.set_xlabel('Time') plt.show()