Page tree
Skip to end of metadata
Go to start of metadata

PlotJuggler,一个基于Qt的应用程序,允许用户加载、搜索和打印数据。许多ROS用户会为此使用MATLAB或rqt_plot,但是当要分析的数据相当大时,使用这些解决方案可能会不尽人意。

PlotJuggler是rqtplot和rqtbag更好的替代品,它提供了更友好的用户界面,具有如下特征:

  • Multiplot(多曲线):将多条曲线添加到绘图中。在行、列、选项卡和/或单独的窗口中排列绘图。
  • Zoom(缩放):轻松缩放绘图。可以锁定所有绘图的X轴。
  • Save/Load layouts(保存/加载布局):组织布局后,可以将其保存到文件中以供以后重用。
  • Complete Undo/Redo(完全撤消/重做):CTRL-Z按您的预期操作。
  • DataLoad plugins(数据加载插件):轻松加载CSV或rosbags。
  • DataStreaming plugins(数据流插件):订阅一个或多个ros主题并实时绘制它们的数据。
  • RosPublisher plugin(RosPublisher 插件):使用交互式跟踪器重新发布原始ROS消息。

进入ROS容器

docker run -it --rm -v /home/bean/Desktop/cloud_bags:/root/bags -v /etc/localtime:/etc/localtime:ro --net=host -e DISPLAY=:0 -e GDK_SCALE -e GDK_DPI_SCALE --name test --hostname test --entrypoint /bin/bash ros:kinetic-ros-base

设置代理

export http_proxy=http://127.0.0.1:18888
export https_proxy=http://127.0.0.1:18888

安装依赖

apt update
apt -y install libzmq3-dev wget libtool autoconf mesa-common-dev ros-kinetic-tf software-properties-common

升级cmake

mkdir -pv /root/Downloads
cd /root/Downloads
wget https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4-linux-x86_64.tar.gz
tar xvzf cmake-3.21.4-linux-x86_64.tar.gz
mv cmake-3.21.4-linux-x86_64 /opt/cmake-3.21.4
ln -sf /opt/cmake-3.21.4/bin/* /usr/bin/
echo "export PATH=\$PATH:/opt/cmake-3.21.4/bin" >> /root/.bashrc
source ~/.bashrc
cmake --version

升级gcc

add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt update
apt install -y gcc-9 g++-9
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20
update-alternatives --auto gcc
gcc --version
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 20
update-alternatives --auto g++
g++ --version

安装Qt5

add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial -y
apt update
apt install -y qt511-meta-full
cd /etc/xdg/qtchooser
mv opt-qt511.conf default.conf
echo "export Qt5_DIR=/opt/qt511" >> /root/.bashrc
echo "export PATH=\$PATH:/opt/qt511/bin" >> /root/.bashrc
source ~/.bashrc
qmake -v

安装protobuf

cd /root/Downloads
wget https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz
tar xvzf protobuf-cpp-3.4.1.tar.gz
cd protobuf-3.4.1
./autogen.sh
./configure --prefix=/opt/protobuf-3.4.1
make
make install
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/protobuf-3.4.1/lib/" >> /root/.bashrc
echo "export LIBRARY_PATH=\$LIBRARY_PATH:/opt/protobuf-3.4.1/lib/" >> /root/.bashrc
echo "export PATH=\$PATH:/opt/protobuf-3.4.1/bin/" >> /root/.bashrc
echo "export C_INCLUDE_PATH=\$C_INCLUDE_PATH:/opt/protobuf-3.4.1/include/" >> /root/.bashrc
echo "export CPLUS_INCLUDE_PATH=\$CPLUS_INCLUDE_PATH:/opt/protobuf-3.4.1/include/" >> /root/.bashrc
echo "export PKG_CONFIG_PATH=/opt/protobuf-3.4.1/lib/pkgconfig/" >> /root/.bashrc
source ~/.bashrc
protoc --version

编译安装plotjuggler

mkdir -p /root/ws_plotjuggler/src
cd /root/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 PlotJuggler
git checkout 3.6.0
cd ../..
source /opt/ros/kinetic/setup.bash
catkin_make

运行plotjuggler

source /root/ws_plotjuggler/devel/setup.bash
rosrun plotjuggler plotjuggler


  • No labels
Write a comment...