问题原因:这个问题是因为只安装了plotjuggler,但是没有安装它对rosbag支持的插件,因此只能打开一些比如csv之类的基础格式的文件。
解决方法参考:
命令行安装:
ros(19):rosbag包绘图工具PlotJuggler:这个仍然是从命令行安装,比较方便,测试也可以成功解决问题。但是命令行安装容易报错。
使用sudo apt install ros-noetic-plotjuggler-ros一键安装plotjuggler及其ros插件
源码安装:
PlotJuggler绘图工具无法打开rosbag文件解决方案:从源码安装,具体如下。
rosbag插件地址:https://github.com/PlotJuggler/plotjuggler-ros-plugins
cd ~/ws_plotjuggler/src
git clone https://github.com/PlotJuggler/plotjuggler_msgs.git
git clone https://github.com/facontidavide/PlotJuggler.git #(必有,否则编译报错)
git clone https://github.com/PlotJuggler/plotjuggler-ros-plugins.git
cd..
catkin_make#编译
#启动可做shell脚本
#!/bin/bash
# for Plotjuggler startup
cd /home/melodic/ws_plotjuggler
sleep 2
source devel/setup.bash
sleep 2
roslaunch plotjuggler_ros plotjuggler.launch
sleep 2
echo "Plotjuggler startup successfully"