Coder Social home page Coder Social logo

plotjuggler-ros-plugins's Introduction

PlotJuggler

windows ubuntu macos ROS1 ROS2 Tweet

Gold Sponsor: Greenzie

PlotJuggler 3.9

PlotJuggler is a tool to visualize time series that is fast, powerful and intuitive.

Noteworthy features:

  • Simple Drag & Drop user interface.
  • Load data from file.
  • Connect to live streaming of data.
  • Save the visualization layout and configurations to re-use them later.
  • Fast OpenGL visualization.
  • Can handle thousands of timeseries and millions of data points.
  • Transform your data using a simple editor: derivative, moving average, integral, etc…
  • PlotJuggler can be easily extended using plugins.

PlotJuggler

Data sources (file and streaming)

  • Load CSV files.
  • Load ULog (PX4).
  • Subscribe to many different streaming sources: MQTT, WebSockets, ZeroMQ, UDP, etc.
  • Understand data formats such as JSON, CBOR, BSON, Message Pack, etc.
  • Well integrated with ROS: open rosbags and/or subscribe to ROS topics (both ROS1 and ROS2).
  • Supports the Lab Streaming Layer, that is used by many devices.
  • Easily add your custom data source and/or formats...

Transform and analyze your data

PlotJuggler makes it easy to visualize data but also to analyze it. You can manipulate your time series using a simple and extendable Transform Editor.

Alternatively, you may use the Custom Function Editor, which allows you to create Multi-input / Single-output functions using a scripting language based on Lua.

If you are not familiar with Lua, don't be afraid, you won't need more than 5 minutes to learn it ;)

Tutorials

To learn how to use PlotJuggler, check the tutorials here:

Tutorial 1 Tutorial 2 Tutorial 3

Supported plugins

Some plugins can be found in a different repository. The individual README files should include all the information needed to compile and use the plugin.

Please submit specific issues, Pull Requests and questions on the related Github repository:

If you want a simple example to learn how to write your own plugins, have a look at PlotJuggler/plotjuggler-sample-plugins

Installation

Snap (recommended in Ubuntu, to ROS users too)

The snap contains a version of PlotJuggler that can work with either ROS1 or ROS2.

Get it from the Snap Store

To install it in Ubuntu 22.04, with ROS2 support, run:

sudo snap install plotjuggler

If you are still using ROS1 (Ubuntu 20.04), install instead:

sudo snap install plotjuggler-ros

Windows Binary installer

This installer does not include ROS plugins.

Windows Installer: PlotJuggler-Windows-3.9.0-installer

Debian packages for ROS User

Install the ROS packages with:

sudo apt install ros-$ROS_DISTRO-plotjuggler-ros

To launch PlotJuggler on ROS, use the command:

rosrun plotjuggler plotjuggler

or, if are using ROS2:

ros2 run plotjuggler plotjuggler

ROS plugins are available in a separate repository: https://github.com/PlotJuggler/plotjuggler-ros-plugins

Please take a look at the instructions in that repository if you want to compile PJ and its ROS plugins from source.

Compile from source

You can find the detailed instructions here: COMPILE.md.

Sponsorship and commercial support

PlotJuggler required a lot of work to develop and maintain; my goal is to build the most intuitive and powerful tool to visualize data and timeseries.

If you find PlotJuggler useful, consider donating PayPal or becoming a Github Sponsor.

If you need to extend any of the functionalities of PlotJuggler to cover a specific need or to parse your custom data formats, you can receive commercial support from the main author, Davide Faconti.

License

PlotJuggler is released under the Mozilla Public License Version 2.0, which allows users to develop closed-source plugins.

Please note that some third-party dependencies (including Qt) use the GNU Lesser General Public License.

Star History

Star History Chart

Contributors

plotjuggler-ros-plugins's People

Contributors

bcohen116 avatar facontidavide avatar k-okada avatar paulerikf avatar simulacrus avatar tobias-fischer avatar tonywelte avatar v-lopez avatar v4hn avatar wentasah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plotjuggler-ros-plugins's Issues

plotjugger_ros build failures on Rolling

ROS distro: rolling
OS: Ubuntu 22.04 (Jammy)
plotjuggler_ros version: 1.5.1-2

Example failing build: https://build.ros2.org/view/Rbin_uJ64/job/Rbin_uJ64__plotjuggler_ros__ubuntu_jammy_amd64__binary/72/

Console log excerpt:

00:05:55.155 cd /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins && /usr/lib/ccache/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DDISABLE_RULE_EDITING -DFMT_HEADER_ONLY -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SHARED -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DQWT_MOC_INCLUDE -DRCUTILS_ENABLE_FAULT_INJECTION -DTopicPublisherROS2_EXPORTS -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/plugins -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/include -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/3rdparty -I/usr/include/x86_64-linux-gnu/qt5/QtWebSockets -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/plugins/. -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/plugins/ros2_introspection/include -I/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/plugins/ros2_parsers -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /opt/ros/rolling/include/rclcpp -isystem /opt/ros/rolling/include/rcpputils -isystem /opt/ros/rolling/include/rosbag2_transport -isystem /opt/ros/rolling/include/sensor_msgs -isystem /opt/ros/rolling/include/geometry_msgs -isystem /opt/ros/rolling/include/nav_msgs -isystem /opt/ros/rolling/include/diagnostic_msgs -isystem /opt/ros/rolling/include/plotjuggler_msgs -isystem /opt/ros/rolling/include/tf2_msgs -isystem /opt/ros/rolling/include/tf2_ros -isystem /opt/ros/rolling/include -isystem /opt/ros/rolling/include/fastcdr -isystem /opt/ros/rolling/include/ament_index_cpp -isystem /opt/ros/rolling/include/libstatistics_collector -isystem /opt/ros/rolling/include/builtin_interfaces -isystem /opt/ros/rolling/include/rosidl_runtime_c -isystem /opt/ros/rolling/include/rcutils -isystem /opt/ros/rolling/include/rosidl_typesupport_interface -isystem /opt/ros/rolling/include/rosidl_runtime_cpp -isystem /opt/ros/rolling/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/rolling/include/rmw -isystem /opt/ros/rolling/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/rolling/include/rosidl_typesupport_introspection_c -isystem /opt/ros/rolling/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/rolling/include/rcl -isystem /opt/ros/rolling/include/rcl_interfaces -isystem /opt/ros/rolling/include/rcl_logging_interface -isystem /opt/ros/rolling/include/rcl_yaml_param_parser -isystem /opt/ros/rolling/include/libyaml_vendor -isystem /opt/ros/rolling/include/tracetools -isystem /opt/ros/rolling/include/statistics_msgs -isystem /opt/ros/rolling/include/rosgraph_msgs -isystem /opt/ros/rolling/include/rosidl_typesupport_cpp -isystem /opt/ros/rolling/include/rosidl_typesupport_c -isystem /opt/ros/rolling/include/keyboard_handler -isystem /opt/ros/rolling/include/rosbag2_compression -isystem /opt/ros/rolling/include/pluginlib -isystem /opt/ros/rolling/include/class_loader -isystem /opt/ros/rolling/include/rosbag2_cpp -isystem /opt/ros/rolling/include/rosbag2_storage -isystem /opt/ros/rolling/include/rosbag2_interfaces -isystem /opt/ros/rolling/include/moodycamel -isystem /opt/ros/rolling/include/std_msgs -isystem /opt/ros/rolling/include/action_msgs -isystem /opt/ros/rolling/include/unique_identifier_msgs -isystem /opt/ros/rolling/include/message_filters -isystem /opt/ros/rolling/include/rclcpp_action -isystem /opt/ros/rolling/include/rcl_action -isystem /opt/ros/rolling/include/tf2 -g -O2 -ffile-prefix-map=/tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -g -fno-omit-frame-pointer  -fPIC -fPIC -fPIC -std=gnu++17 -MD -MT plugins/CMakeFiles/TopicPublisherROS2.dir/TopicPublisherROS2_autogen/mocs_compilation.cpp.o -MF CMakeFiles/TopicPublisherROS2.dir/TopicPublisherROS2_autogen/mocs_compilation.cpp.o.d -o CMakeFiles/TopicPublisherROS2.dir/TopicPublisherROS2_autogen/mocs_compilation.cpp.o -c /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/mocs_compilation.cpp
00:05:55.156 In file included from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/../../../../plugins/TopicPublisherROS2/publisher_ros2.h:18,
00:06:02.202                  from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/moc_publisher_ros2.cpp:10,
00:06:02.202                  from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/mocs_compilation.cpp:2:
00:06:02.202 /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/../../../../plugins/TopicPublisherROS2/generic_publisher.h: In constructor ‘GenericPublisher::GenericPublisher(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rosidl_message_type_support_t&)’:
00:06:02.202 /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/../../../../plugins/TopicPublisherROS2/generic_publisher.h:28:101: error: no matching function for call to ‘rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*&, const string&, const rosidl_message_type_support_t&, rcl_publisher_options_t)’
00:06:02.202    28 |     : rclcpp::PublisherBase(node_base, topic_name, type_support, rcl_publisher_get_default_options())
00:06:02.202       |                                                                                                     ^
00:06:02.202 In file included from /opt/ros/rolling/include/rclcpp/rclcpp/callback_group.hpp:27,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/any_executable.hpp:20,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/memory_strategy.hpp:25,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/memory_strategies.hpp:18,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/executor_options.hpp:20,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/executor.hpp:37,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/executors.hpp:21,
00:06:02.202                  from /opt/ros/rolling/include/rclcpp/rclcpp/rclcpp.hpp:155,
00:06:02.202                  from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/../../../../plugins/TopicPublisherROS2/publisher_ros2.h:9,
00:06:02.202                  from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/moc_publisher_ros2.cpp:10,
00:06:02.202                  from /tmp/binarydeb/ros-rolling-plotjuggler-ros-1.5.1/obj-x86_64-linux-gnu/plugins/TopicPublisherROS2_autogen/mocs_compilation.cpp:2:
00:06:02.202 /opt/ros/rolling/include/rclcpp/rclcpp/publisher_base.hpp:77:3: note: candidate: ‘rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rosidl_message_type_support_t&, const rcl_publisher_options_t&, const rclcpp::PublisherEventCallbacks&, bool)’
00:06:02.202    77 |   PublisherBase(
00:06:02.202       |   ^~~~~~~~~~~~~
00:06:02.202 /opt/ros/rolling/include/rclcpp/rclcpp/publisher_base.hpp:77:3: note:   candidate expects 6 arguments, 4 provided
00:06:02.202 /opt/ros/rolling/include/rclcpp/rclcpp/publisher_base.hpp:60:7: note: candidate: ‘rclcpp::PublisherBase::PublisherBase(const rclcpp::PublisherBase&)’
00:06:02.202    60 | class PublisherBase : public std::enable_shared_from_this<PublisherBase>
00:06:02.202       |       ^~~~~~~~~~~~~
00:06:02.202 /opt/ros/rolling/include/rclcpp/rclcpp/publisher_base.hpp:60:7: note:   candidate expects 1 argument, 4 provided

issue building on ros2 foxy ubuntu 20.04

I am trying to build PlotJuggler with ros2 foxy on ubuntu 20.04. I have done the following steps:

   sudo apt install ros-${ROS_DISTRO}-plotjuggler-msgs
   git clone https://github.com/facontidavide/PlotJuggler.git
   git checkout foxy
   mkdir build && cd build
   cmake ..
   make

It build nicely up to 96% but then:

[ 96%] Building CXX object plugins/ROS/CMakeFiles/commonROS.dir/ros2_parsers/ros2_parser.cpp.o
In file included from /opt/ros/foxy/include/plotjuggler_msgs/msg/dictionary.hpp:9,
                 from /home/pru/devenvironment/ros_ws/src/PlotJuggler/plugins/ROS/ros2_parsers/plotjuggler_msgs.h:3,
                 from /home/pru/devenvironment/ros_ws/src/PlotJuggler/plugins/ROS/ros2_parsers/ros2_parser.cpp:5:
/opt/ros/foxy/include/plotjuggler_msgs/msg/detail/dictionary__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<plotjuggler_msgs::msg::Dictionary>()
      |                         ^
In file included from /opt/ros/foxy/include/plotjuggler_msgs/msg/data_points.hpp:9,
                 from /home/pru/devenvironment/ros_ws/src/PlotJuggler/plugins/ROS/ros2_parsers/plotjuggler_msgs.h:4,
                 from /home/pru/devenvironment/ros_ws/src/PlotJuggler/plugins/ROS/ros2_parsers/ros2_parser.cpp:5:
/opt/ros/foxy/include/plotjuggler_msgs/msg/detail/data_points__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<plotjuggler_msgs::msg::DataPoints>()
      |                         ^
make[2]: *** [plugins/ROS/CMakeFiles/commonROS.dir/build.make:135: plugins/ROS/CMakeFiles/commonROS.dir/ros2_parsers/ros2_parser.cpp.o] Error 1

Maybe I have chosen the wrong branch or something. Any advice on this ? I would be happy to help out. I posted the issue here as its more of a ROS2 related issue than a PlotJuggler one.

PJ won't build on melodic

I follow instructions How to compile PlotJuggler from source
and got this error on catkin build:

elgarbe@notebook:~/ws_plotjuggler$ catkin build
-----------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/melodic
Workspace:                   /home/elgarbe/ws_plotjuggler
-----------------------------------------------------------------
Build Space:        [exists] /home/elgarbe/ws_plotjuggler/build
Devel Space:        [exists] /home/elgarbe/ws_plotjuggler/devel
Install Space:      [unused] /home/elgarbe/ws_plotjuggler/install
Log Space:         [missing] /home/elgarbe/ws_plotjuggler/logs
Source Space:       [exists] /home/elgarbe/ws_plotjuggler/src
DESTDIR:            [unused] None
-----------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------------
Workspace configuration appears valid.
-----------------------------------------------------------------
[build] Found '3' packages in 0.0 seconds.                                     
[build] Updating package table.                                                
Warning: generated devel space setup files have been deleted.
[build] Warning: Skipping package `plotjuggler_msgs` because it has an unsupported package build type: `ament_cmake`
[build] Note: Available build types:                                           
[build]  - `catkin`                                                            
[build]  - `cmake`                                                             
Abandoned <<< plotjuggler_ros                      [ Depends on unknown jobs: plotjuggler_msgs ]
Starting  >>> catkin_tools_prebuild                                            
Finished  <<< catkin_tools_prebuild                [ 1.8 seconds ]             
Starting  >>> plotjuggler                                                      
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << plotjuggler:cmake /home/elgarbe/ws_plotjuggler/logs/plotjuggler/build.cmake.000.log                                                                                                                                                                             
/opt/ros/melodic/include/usr/include
cd /home/elgarbe/ws_plotjuggler/build/plotjuggler; catkin build --get-env plotjuggler | catkin env -si  /usr/bin/cmake /home/elgarbe/ws_plotjuggler/src/PlotJuggler --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/elgarbe/ws_plotjuggler/devel/.private/plotjuggler -DCMAKE_INSTALL_PREFIX=/home/elgarbe/ws_plotjuggler/install; cd -
..............................................................................................................................................................................................................................................................................
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << plotjuggler:make /home/elgarbe/ws_plotjuggler/logs/plotjuggler/build.make.000.log                                                                                                                                                                               
/home/elgarbe/ws_plotjuggler/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/dataloader_base.h:0: Note: No relevant classes found. No output generated.
/home/elgarbe/ws_plotjuggler/src/PlotJuggler/plotjuggler_plugins/DataLoadCSV/dataload_csv.ui: Warning: The name 'layoutWidget' (QWidget) is already in use, defaulting to 'layoutWidget1'.
/home/elgarbe/ws_plotjuggler/src/PlotJuggler/plotjuggler_plugins/ToolboxQuaternion/quaternion_to_rpy.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame1'.
cd /home/elgarbe/ws_plotjuggler/build/plotjuggler; catkin build --get-env plotjuggler | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..............................................................................................................................................................................................................................................................................
Finished  <<< plotjuggler                          [ 2 minutes and 54.4 seconds ]                                                                                                                                                                                             
[build] Summary: 2 of 3 packages succeeded.                                                                                                                                                                                                                                   
[build]   Ignored:   1 packages were skipped or are blacklisted.                                                                                                                                                                                                              
[build]   Warnings:  1 packages succeeded with warnings.                                                                                                                                                                                                                      
[build]   Abandoned: 1 packages were abandoned.                                                                                                                                                                                                                               
[build]   Failed:    None.                                                                                                                                                                                                                                                    
[build] Runtime: 2 minutes and 56.2 seconds total.  

Newest version of ros-plugins cannot be built. Missing ros2bag_transport package

Hello,
I wanted the newest version of ROS2 plugin, but it is still not available as a .deb package through apt system. I tried to build it in my own colcon workspace, but it misses the ros2bag_transport package. I have this package installed, so I do not see the problem. Could you help me with that? Or do you know when there will be a .deb package version online?

Finished` <<< plotjuggler [1min 31s]
Starting >>> plotjuggler_ros
--- stderr: plotjuggler_ros
In file included from /home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.h:11,
                 from /home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp:1:
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/ros2_parsers/generic_subscription.hpp:26:10: fatal error: rosbag2_transport/logging.hpp: No such file or directory
   26 | #include "rosbag2_transport/logging.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [plugins/CMakeFiles/DataStreamROS2.dir/build.make:76: plugins/CMakeFiles/DataStreamROS2.dir/DataStreamROS2/datastream_ros2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.h:11,
                 from /home/honzabednar/plotjuggler_workspace/build/plotjuggler_ros/plugins/DataStreamROS2_autogen/JX3IUUCCPQ/moc_datastream_ros2.cpp:9,
                 from /home/honzabednar/plotjuggler_workspace/build/plotjuggler_ros/plugins/DataStreamROS2_autogen/mocs_compilation.cpp:2:
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/ros2_parsers/generic_subscription.hpp:26:10: fatal error: rosbag2_transport/logging.hpp: No such file or directory
   26 | #include "rosbag2_transport/logging.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [plugins/CMakeFiles/DataStreamROS2.dir/build.make:63: plugins/CMakeFiles/DataStreamROS2.dir/DataStreamROS2_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:189: plugins/CMakeFiles/DataStreamROS2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataLoadROS2/dataload_ros2.cpp: In member function ‘virtual bool DataLoadROS2::readDataFromFile(PJ::FileLoadInfo*, PJ::PlotDataMapRef&)’:
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataLoadROS2/dataload_ros2.cpp:53:31: warning: ‘using StorageOptions = struct rosbag2_storage::StorageOptions’ is deprecated: use rosbag2_storage::StorageOptions instead [-Wdeprecated-declarations]
   53 |   rosbag2_cpp::StorageOptions storageOptions;
      |                               ^~~~~~~~~~~~~~
In file included from /home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataLoadROS2/dataload_ros2.cpp:21:
/opt/ros/galactic/include/rosbag2_cpp/storage_options.hpp:23:7: note: declared here
   23 | using StorageOptions [[deprecated("use rosbag2_storage::StorageOptions instead")]] =
      |       ^~~~~~~~~~~~~~
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/publisher_ros2.cpp: In constructor ‘TopicPublisherROS2::TopicPublisherROS2()’:
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/publisher_ros2.cpp:28:28: error: ‘rclcpp::executor’ has not been declared
   28 |   auto exec_args = rclcpp::executor::ExecutorArgs();
      |                            ^~~~~~~~
/home/honzabednar/plotjuggler_workspace/src/plotjuggler-ros-plugins/plugins/DataLoadROS2/dataload_ros2.cpp:153:18: error: ‘using element_type = class rosbag2_cpp::readers::SequentialReader’ {aka ‘class rosbag2_cpp::readers::SequentialReader’} has no member named ‘reset’
  153 |     _bag_reader->reset();
      |                  ^~~~~
make[2]: *** [plugins/CMakeFiles/DataLoadROS2.dir/build.make:76: plugins/CMakeFiles/DataLoadROS2.dir/DataLoadROS2/dataload_ros2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:217: plugins/CMakeFiles/DataLoadROS2.dir/all] Error 2
make[2]: *** [plugins/CMakeFiles/TopicPublisherROS2.dir/build.make:76: plugins/CMakeFiles/TopicPublisherROS2.dir/TopicPublisherROS2/publisher_ros2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:161: plugins/CMakeFiles/TopicPublisherROS2.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< plotjuggler_ros [23.9s, exited with code 2]

Summary: 2 packages finished [1min 55s]
  1 package failed: plotjuggler_ros
  2 packages had stderr output: plotjuggler plotjuggler_ros
```

How to install plotjuggler with ros-plugins on ubuntu?

Hi,
I am very new to Linux OS and I tried to run this command in a terminal

sudo apt install ros-${ROS_DISTRO}-plotjuggler
but I got this error:
E: unable to locate package ros--plotjuggler
Could anyone kindly offer me an insight on what I am doing wrong? Perhaps I need to clone the repository first? My ubunbu version is 20.04

How to load rosbag data?

Thanks for contributing to PlotJuggler. You are great!

Problem description

When I click load, I only see *.csv and *.ulg formats, and rosbag format is not supported. Do I want to convert *.bag to.csv?

ros version: melodic

ROS Topic Re-Publisher segfaults if multiple bags are loaded

Environment:
OS: Ubuntu 20.04
Kernel: 5.13.0-39-generic
ROS: Noetic

Steps to reproduce error:

  • roslaunch plotjuggler_ros plotjuggler.launch
  • Chuckle at meme in loading screen.
  • Load in multiple bag files.
  • Select all topics to be published.
  • Click the checkbox for ROS Topic Re-Publisher.
  • Hit the play button

Stack trace:

Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:33351/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.14

NODES
  /
    PlotJuggler (plotjuggler/plotjuggler)

auto-starting new master
process[master]: started with pid [623305]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 82f37e14-bcec-11ec-a350-21fe67c50afd
process[rosout-1]: started with pid [623330]
started core service [/rosout]
process[PlotJuggler-2]: started with pid [623333]
Loading compatible plugins from directory:  "/home/snwu/catkin_workspaces/playground_catkin_ws/devel/.private/plotjuggler/lib/plotjuggler"
"libDataLoadCSV.so is a DataLoader plugin"
"libDataLoadULog.so is a DataLoader plugin"
"libDataStreamSample.so is a DataStreamer plugin"  ...disabled, unless option -t is used
"libDataStreamUDP.so is a DataStreamer plugin"
"libDataStreamWebSocket.so is a DataStreamer plugin"
Type conversion already registered from type QString to type QwtText
"libProtobufParser.so is a MessageParser plugin"
"libPublisherCSV.so is a StatePublisher plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxFFT.so is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxLuaEditor.so is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxQuaternion.so is a Toolbox plugin"
Number of plugins loaded:  9 

Loading compatible plugins from directory:  "/home/snwu/catkin_workspaces/playground_catkin_ws/devel/.private/plotjuggler/lib/plotjuggler_ros"
Number of plugins loaded:  0 

Loading compatible plugins from directory:  "/home/snwu/catkin_workspaces/playground_catkin_ws/devel/lib/plotjuggler_ros"
"libDataLoadROS.so is a DataLoader plugin"
"libDataStreamROS.so is a DataStreamer plugin"
"libRosoutPublisher.so is a StatePublisher plugin"
"libRosTopicPublisher.so is a StatePublisher plugin"
Number of plugins loaded:  4 

Loading compatible plugins from directory:  "/opt/ros/noetic/lib/plotjuggler_ros"
"libDataLoadROS.so is a DataLoader plugin"  ...skipping, because already loaded
"libDataStreamROS.so is a DataStreamer plugin"  ...skipping, because already loaded
"libRosoutPublisher.so is a StatePublisher plugin"  ...skipping, because already loaded
"libRosTopicPublisher.so is a StatePublisher plugin"  ...skipping, because already loaded
Number of plugins loaded:  0 

Loading compatible plugins from directory:  "/home/snwu/.local/share/PlotJuggler"
Number of plugins loaded:  0 

The loading operation took 715 milliseconds
The loading operation took 6156 milliseconds
The loading operation took 1908 milliseconds
Stack trace (most recent call last):
#22   Object "", at 0xffffffffffffffff, in 
#21   Object "/home/snwu/catkin_workspaces/playground_catkin_ws/devel/.private/plotjuggler/lib/plotjuggler/plotjuggler", at 0x5574f25b2fdd, in _start
#20   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f41a30500b2, in __libc_start_main
#19   Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/PlotJuggler/plotjuggler_app/main.cpp", line 390, in main [0x5574f25b1da3]
        387:     w->on_buttonStreamingStart_clicked();
        388:   }
        389: 
      > 390:   return app.exec();
        391: }
#18   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a37f9115, in QCoreApplication::exec()
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a37f13aa, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#16   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a384a434, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#15   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f41a27c14a2, in g_main_context_iteration
#14   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f41a27c13ff, in g_main_context_dispatch
#13   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f41a27c117c, in g_main_context_dispatch
#12   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a384a06b, in QEventDispatcherGlib::flush()
#11   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a384977f, in QTimerInfoList::activateTimers()
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a37f2809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f41a42140ef, in QApplication::notify(QObject*, QEvent*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f41a420aa65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#7    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a381ebc4, in QObject::event(QEvent*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a382b3ed, in QTimer::timeout(QTimer::QPrivateSignal)
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f41a381e327, in QMetaObject::activate(QObject*, int, int, void**)
#4    Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2639, in MainWindow::onPlaybackLoop() [0x5574f25db04e]
       2637:   for (auto& it : _state_publisher)
       2638:   {
      >2639:     it.second->play(_tracker_time);
       2640:   }
       2641: 
       2642:   forEachWidget([&](PlotWidget* plot) {
#3    Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS/statepublisher_rostopic.cpp", line 433, in TopicPublisherROS::play(double) [0x7f41854c7a6c]
        430:   if (_previous_play_index > current_index)
        431:   {
        432:     _previous_play_index = current_index;
      > 433:     updateState(current_time);
        434:     return;
        435:   }
        436:   else
#2    Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS/statepublisher_rostopic.cpp", line 389, in TopicPublisherROS::updateState(double) [0x7f41854c712c]
        386:     if (any_value.type() == typeid(rosbag::MessageInstance))
        387:     {
        388:       const auto& msg_instance = std::any_cast<rosbag::MessageInstance>(any_value);
      > 389:       publishAnyMsg(msg_instance);
        390:     }
        391:   }
#1  | Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS/statepublisher_rostopic.cpp", line 292, in TopicPublisherROS::publishAnyMsg(rosbag::MessageInstance const&)
    |   291:   const auto& topic_name = msg_instance.getTopic();
    | > 292:   RosIntrospection::ShapeShifter* shapeshifted = RosIntrospectionFactory::get().getShapeShifter(topic_name);
    |   293: 
    |   294:   if (!shapeshifted)
    | Source "/home/snwu/catkin_workspaces/playground_catkin_ws/src/plotjuggler-ros-plugins/plugins/shape_shifter_factory.hpp", line 63, in RosIntrospectionFactory::getShapeShifter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    |    61: {
    |    62:     auto& instance = get();
    | >  63:     auto it = instance._ss_map.find( topic_name );
    |    64:     return ( it == instance._ss_map.end()) ? nullptr :  &(it->second);
    |    65: }
    | Source "/usr/include/c++/9/bits/stl_map.h", line 1169, in std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, RosIntrospection::ShapeShifter, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> > >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    |  1167:       iterator
    |  1168:       find(const key_type& __x)
    | >1169:       { return _M_t.find(__x); }
    |  1170: 
    |  1171: #if __cplusplus > 201103L
    | Source "/usr/include/c++/9/bits/stl_tree.h", line 2562, in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> > >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    |  2560:     find(const _Key& __k)
    |  2561:     {
    | >2562:       iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
    |  2563:       return (__j == end()
    |  2564: 	      || _M_impl._M_key_compare(__k,
    | Source "/usr/include/c++/9/bits/stl_tree.h", line 1934, in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> > >::_M_lower_bound(std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, RosIntrospection::ShapeShifter> >*, std::_Rb_tree_node_base*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    |  1932:     {
    |  1933:       while (__x != 0)
    | >1934: 	if (!_M_impl._M_key_compare(_S_key(__x), __k))
    |  1935: 	  __y = __x, __x = _S_left(__x);
    |  1936: 	else
    | Source "/usr/include/c++/9/bits/stl_function.h", line 386, in std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
    |   384:       bool
    |   385:       operator()(const _Tp& __x, const _Tp& __y) const
    | > 386:       { return __x < __y; }
    |   387:     };
    | Source "/usr/include/c++/9/bits/basic_string.h", line 6232, in bool std::operator< <char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    |  6230: 	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
    |  6231:     _GLIBCXX_NOEXCEPT
    | >6232:     { return __lhs.compare(__rhs) < 0; }
    |  6233: 
    |  6234:   /**
    | Source "/usr/include/c++/9/bits/basic_string.h", line 2863, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
    |  2861: 	const size_type __len = std::min(__size, __osize);
    |  2862: 
    | >2863: 	int __r = traits_type::compare(_M_data(), __str.data(), __len);
    |  2864: 	if (!__r)
    |  2865: 	  __r = _S_compare(__size, __osize);
      Source "/usr/include/c++/9/bits/char_traits.h", line 332, in std::char_traits<char>::compare(char const*, char const*, unsigned long) [0x7f41854c5e44]
        329: 	    return 0;
        330: 	  }
        331: #endif
      > 332: 	return __builtin_memcmp(__s1, __s2, __n);
        333:       }
        334: 
        335:       static _GLIBCXX17_CONSTEXPR size_t
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f41a31b0bde, in __nss_database_lookup
Segmentation fault (Signal sent by the kernel [(nil)])

plotjuggler build from source - ros2 foxy

Hello,

Thanks for the excellent toolchain.
Is there a way to compile juggler from source with colcon?
When I try a luck attempts with colcon build instead of catkin_make, I have receive errors about package.xml
related errors caused by Juggler package configuration is designed for catkin?

thanks in advance

Make euler angles wrapping optional

While plotting an imu message, I have noticed that the yaw_deg field is not wrapped between -180° and +180° but keep increasing.

On the v2 branch, the issue is not there.

This commit introduced the issue: facontidavide/PlotJuggler@0dd18a1

But I don't really understand the purpose of that commit so I did not provide a patch.

PlotJuggler 3.1.0 doesnt exit on Ctrl+C if subscribed to ROS topic

Maybe it is expected behavior, but I see different behavior in the following scenarios. I always start plotjuggler from a terminal using rosrun plotjuggler plotjuggler:

  1. hit Ctrl+C, plotjuggler exits as expceted
  2. subscribe to a ROS topic and then hit Ctrl+C => Plotjuggler stays opened
  3. subscribe to a ROS topic, unsubscribe hitting the Stop button and then hit Ctrl+C => Plotjuggler stays opened

Not enough memory in the buffer stream when loading ROS2 data from CARLA simulator (Foxy Focal)

Greetings. I am running on ros2 foxy on ubuntu focal.
I am running the latest version of plotjuggler from deb (sudo apt-get install ros-foxy-plotjuggler-ros).
I am attempting to load data from CARLA's object message which is an ObjectArray:
http://docs.ros.org/en/kinetic/api/derived_object_msgs/html/msg/Object.html

When I attempt to load my array, I receive the following error:

he plugin [DataLoad ROS2 bags] thrown the following exception: 

 Not enough memory in the buffer stream

I am not sure how to debug further, but I do have a significant amount of available RAM (somewhere around 100gb free).

Any idea what may be causing this? If you need further information, I am happy to provide it.

ROS 2 release request

Hi,

I created this Pull Request to enable pal_statistics plugin for ROS 2 and it got merged.

Could you release it for humble and rolling in order to be able to use that feature without having to clone the repository in my workspace?

Thanks.

Subscribing to MultiArray messages

In the earlier version of plotjuggler, I was able to subscribe to topics that published Float32MultiArrays. On the sidebar, the data would show up with each index of the array, e.g. data.0, data.1, etc, and I was able to plot all indices as line plots simultaneously. This was awesome! I was using it all the time for one of my projects.

After installing the new version, the same approach no longer works. It appears that plotjuggler is not reading the full contents of the Float32MultiArray message. In the sidebar, it shows the "layout" attribute, which contains the message index and "data_offset" (a scalar), but the "data" attribute which contains my array no longer shows up. I have verified that "data" is indeed an attribute of the message, but it is apparently invisible to plot juggler.

Would be awesome to have this capability back!

Parsing comma separated values from diagnostics message

Hey, opening an issue about an enhancement I would like. I previously opened a pull request, with a possible solution. The gist of it is, that I would like to see a plot of a list of comma separated values from the diagnostics message (for example a diagnostic message with key: acceleration; value: 0.45, 1.0, -0.012).

Would you consider looking at this PR?

how to build it the plugins on windows10 ?

i would like to use Plotjugger on windows to show the ros2 infomation. but the current Plotjugger 3.1.1 release don't have the ros2 plugins. when can release the Ploljugger with ros2 support for windows10 ? or how can i build it? thanks very much

Required package is missing maybe

Hi,

I was trying to run catkin_make after cloning the required packages but I'm getting a fatal error as follows:

fatal error: QNetworkDatagram: No such file or directory compilation terminated.

error: ‘qOverload’ was not declared in this scope

I tried looking for this package but no luck !

any help is appreciated.

Plotjuggler crashes after subscribing to ROS topic (`Floating point truncated 1`)

I'm using Plotjuggler 3.0.7 (Snap) on Ubuntu 18.04. Each time I subscribe to a specific ROS topic, Plotjuggler crashes immediately. It's possible other "bad" topics exist that make it crash but I identified at least one that's enough.

How to reproduce:

  • Start roscore
  • Replay bag file with a "bad" topic: rosbag play -l filename.bag
  • Start ROS subscriber and select the "bad" topic
  • Plotjuggler crashes with the attached error messages

plotjuggler-crash-after-subscribing-ROS-topic.txt

A similar thing happens when trying to open the bag file directly without streaming and selecting the topic. In this case it catches the exception though:

plotjuggler-error-when-selecting-many-messages-from-bag

Diagnostic messages being dropped when publishing multiple on same topic

When publishing multiple Diagnostics messages on the same topic but with a different key, messages are being dropped. It is visible in the screenshot below, where 'b' has no dropped messages, but 'a' has. You can see the sine wave for 'a' is oddly shaped.

image

I managed to create a minimal node which can reproduce this problem. It's based off of the ROS2 Galactic tutorial, with diagnostic_msgs added as dependency.

from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus, KeyValue
import rclpy
from rclpy.node import Node


class MinimalPublisher(Node):
    def __init__(self):
        super().__init__('minimal_publisher')
        self.diagnostics_publisher = self.create_publisher(DiagnosticArray, '/diagnostics', 10)
        timer_period = 0.5  # seconds
        self.timer = self.create_timer(timer_period, self.timer_callback)
        self.sine_values = [500, 794, 976, 976, 794, 500, 206, 24, 24, 206]
        self.i = 0

    def timer_callback(self):
        self._publish_message('a')
        self._publish_message('b')
        self.i += 1
        if self.i == len(self.sine_values):
            self.i = 0

    def _publish_message(self, name):
        array = DiagnosticArray()
        array.header.stamp = self.get_clock().now().to_msg()

        status = DiagnosticStatus(level=DiagnosticStatus.OK, name=name, message='OK')
        status.values.append(KeyValue(key='sine', value=str(self.sine_values[self.i])))
        array.status.append(status)

        self.diagnostics_publisher.publish(array)


def main(args=None):
    rclpy.init(args=args)
    minimal_publisher = MinimalPublisher()
    rclpy.spin(minimal_publisher)
    minimal_publisher.destroy_node()
    rclpy.shutdown()


if __name__ == '__main__':
    main()

Latest bloom release incomplete on Rolling.

The source packaging jobs for ROS 2 Rolling are not building due to missing artifacts. It is possible that errors during the bloom release were not caught and another bloom release may either reveal the issues or successfully generate the necessary artifacts. You should not need to tag a source release, bloom can just increment the package revision.

In the meantime I have proposed removing the plotjuggler_ros release from the build farm in order to avoid future errors building the same package.

ROS2 plugin fails to parse messages containing arrays longer than 100 items

When loading a rosbag2 serialized as CDR that contains messages that have arrays as fields with over 100 items, the data load ROS2 plugin fails with the message "Not enough memory in the buffer stream", as seen in the following screenshot:

image

I've created a repo with rosbags of messages with arrays of different sizes (https://github.com/esteve/capacity_messages_plotjuggler), any rosbag with over 100 messages (i.e. test_capacity_msgs101.bag, test_capacity_msgs1000.bag, test_capacity_msgs10000.bag) will cause this error.

I've looked into the code of the ROS2 plugins, and it seems that https://github.com/PlotJuggler/plotjuggler-ros-plugins/blob/rolling/plugins/ros2_introspection/src/ros2_introspection.cpp#L114 is somehow not honoring https://github.com/PlotJuggler/plotjuggler-ros-plugins/blob/rolling/plugins/ros2_introspection/include/ros2_introspection/ros2_introspection.hpp#L90, but I'm not entirely sure if that's the cause. The other lead I have is https://github.com/PlotJuggler/plotjuggler-ros-plugins/blob/rolling/plugins/parser_configuration.cpp#L63, but increasing the default value to anything above 100 doesn't do anything.

output doesn't match ros2 topic echo

When I use regular old "ros2 topic echo" I get different output then I get when using plotjuggler. In this screen shot "altitude" and "stbd_velocity" are clearly not matching up.

image

ubuntu 22.04 installed with sudo apt install ros-humble-plotjuggler ros-humble-plotjuggler-ros

ros topic subscriber plugin not available

I installed the ros package version via
sudo apt install ros-noetic-plotjuggler
and launched the application via
rosrun plotjuggler plotjuggler

under the streaming dropdown-menu, I can choose "UDP Server", "WebSocket Server" and "ZMQ Subscriber". I am missing the option "ROS Topic Subscriber". Is this the desired behavior? How can I get the ros topic subscriber?
Screenshot from 2022-01-21 16-55-00
?

Segmentation fault (Address not mapped to object [0x140])

If i click the Apply filter to data ,plotjuggler will have a Segmentation fault ,such as
Stack trace (most recent call last): #31 Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7ff05fd1435a, in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) #30 Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7ff05fd3a10a, in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) #29 Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7ff05fd387d2, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) #28 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f94f809, in QCoreApplication::notifyInternal2(QObject*, QEvent*) #27 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0603710ef, in QApplication::notify(QObject*, QEvent*) #26 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff060367a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*) #25 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0603c91eb, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) #24 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0603c6ce3, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) #23 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff060370456, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) #22 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f94f809, in QCoreApplication::notifyInternal2(QObject*, QEvent*) #21 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff060371342, in QApplication::notify(QObject*, QEvent*) #20 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff060367a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*) #19 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0604f4ada, in QMenu::event(QEvent*) #18 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0603aa2b5, in QWidget::event(QEvent*) #17 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0604f24d1, in QMenu::mouseReleaseEvent(QMouseEvent*) #16 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0604f14ad, in QMenu::leaveEvent(QEvent*) #15 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0604e9d11, in QMenu::setIcon(QIcon const&) #14 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff060363aa1, in QAction::activate(QAction::ActionEvent) #13 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff0603613e5, in QAction::triggered(bool) #12 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f97b327, in QMetaObject::activate(QObject*, int, int, void**) #11 Object "/opt/ros/foxy/lib/plotjuggler/plotjuggler", at 0x55d515e8fae6, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) #10 Object "/opt/ros/foxy/lib/plotjuggler/plotjuggler", at 0x55d515e9d733, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) #9 Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff06061c805, in QListWidget::setItemSelected(QListWidgetItem const*, bool) #8 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f90d0c0, in QItemSelectionModel::select(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) #7 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f912e96, in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) #6 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f9102c1, in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) #5 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f90ae83, in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) #4 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f97b1cf, in QMetaObject::activate(QObject*, int, int, void**) #3 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff05f97b28b, in QMetaObject::activate(QObject*, int, int, void**) #2 Object "/opt/ros/foxy/lib/plotjuggler/plotjuggler", at 0x55d515e2a5dc, in #1 Object "/opt/ros/foxy/lib/plotjuggler/plotjuggler", at 0x55d515e9ce42, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) #0 Object "/opt/ros/foxy/lib/plotjuggler/plotjuggler", at 0x55d515f7bba4, in std::ctype<char>::do_widen(char) const Segmentation fault (Address not mapped to object [0x140])

The ROS2 version which i used is foxy and the system version is ubuntu 20.04.3 LTS.
Thanks for your answer.

[Humble] Segmentation fault (Address not mapped to object [0x1e0]

  • Building and running the packages works just fine:
    • PlotJuggler --> main branch
    • plotjuggler-ros-plugins --> Humble branch
    • plotjuggler_msgs --> main branch
  • However after selecting a ros2 message (of sensor_msgs/msg/JointState type) the error below occured:
Loading compatible plugins from directory:  "/home/ws_ros2/install/plotjuggler_ros/lib/plotjuggler_ros"
"libDataLoadROS2.so is a DataLoader plugin"
"libDataStreamROS2.so is a DataStreamer plugin"
[WARN] [1684830914.399383185] [rclcpp]: logging was initialized more than once
"libTopicPublisherROS2.so is a StatePublisher plugin"
Number of plugins loaded:  3 

Loading compatible plugins from directory:  "/home/ws_ros2/install/plotjuggler/lib/plotjuggler"
"libDataLoadCSV.so is a DataLoader plugin"
"libDataLoadMCAP.so is a DataLoader plugin"
"libDataLoadULog.so is a DataLoader plugin"
"libDataStreamSample.so is a DataStreamer plugin"  ...disabled, unless option -t is used
"libDataStreamUDP.so is a DataStreamer plugin"
"libDataStreamWebSocket.so is a DataStreamer plugin"
"libDataStreamZMQ.so is a DataStreamer plugin"
"libParserDataTamer.so is a MessageParser plugin"
"libParserROS1.so is a MessageParser plugin"
"libParserROS2.so is a MessageParser plugin"
"libProtobufParser.so is a MessageParser plugin"
"libPublisherCSV.so is a StatePublisher plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxFFT.so is a Toolbox plugin"
"libToolboxLuaEditor.so is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxQuaternion.so is a Toolbox plugin"
Number of plugins loaded:  14 

Loading compatible plugins from directory:  "/home/paul/.local/share/PlotJuggler"
Number of plugins loaded:  0 

Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#30   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1cbfd4, in 
#28   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1c8d3f, in 
#27   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e172e46, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
#26   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e174363, in QApplication::notify(QObject*, QEvent*)
#24   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1af4ed, in QWidget::event(QEvent*)
#22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e2641e6, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
#21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e263fc3, in 
#20   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e26239d, in 
#19   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e262115, in QAbstractButton::clicked(bool)
#18   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f14e4, in 
#17   Source "/home/paul/ws_ros2/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 515, in qt_metacall [0x55614cd2e199]
        512:         return _id;
        513:     if (_c == QMetaObject::InvokeMetaMethod) {
        514:         if (_id < 66)
      > 515:             qt_static_metacall(this, _c, _id, _a);
        516:         _id -= 66;
        517:     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        518:         if (_id < 66)
#16   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 3349, in on_buttonStreamingStart_clicked [0x55614cd70fd2]
       3346:   ui->buttonStreamingStart->setEnabled(false);
       3347:   if (ui->buttonStreamingStart->text() == "Start")
       3348:   {
      >3349:     startStreamingPlugin(ui->comboStreaming->currentText());
       3350:   }
       3351:   else
       3352:   {
#15   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1695, in startStreamingPlugin [0x55614cd6788b]
       1692:   try
       1693:   {
       1694:     // TODO data sources (argument to _active_streamer_plugin->start()
      >1695:     started = _active_streamer_plugin && _active_streamer_plugin->start(nullptr);
       1696:   }
       1697:   catch (std::runtime_error& err)
       1698:   {
#14   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 144, in start [0x7f4d584dd1ed]
        141:   });
        142: 
        143:   //-----------------------------
      > 144:   waitOneSecond();
        145:   return true;
        146: }
#13   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 48, in waitOneSecond [0x7f4d584dc6f8]
         45:   {
         46:     int msec = duration_cast<milliseconds>(system_clock::now() - start_time).count();
         47:     progress_dialog.setValue(msec);
      >  48:     QApplication::processEvents();
         49:     if (progress_dialog.wasCanceled())
         50:     {
         51:       break;
#12   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d513111, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#11   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c31e3e2, in g_main_context_iteration
#10   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c3756c7, in 
#9    Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c320d3a, in g_main_context_dispatch
#8    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d512ceb, in 
#7    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d5123ea, in QTimerInfoList::activateTimers()
#6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#4    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4e733e, in QObject::event(QEvent*)
#3    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f57fd, in QTimer::timeout(QTimer::QPrivateSignal)
#2    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f1792, in 
#1    Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2390, in updateDataAndReplot [0x55614cd66d20]
       2387:       _curvelist_widget->refreshColumns();
       2388:     }
       2389: 
      >2390:     _mapped_plot_data.setMaximumRangeX(ui->streamingSpinBox->value());
       2391:   }
       2392: 
       2393:   const bool is_streaming_active = isStreamingActive();
#0  | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/src/plotdata.cpp", line 140, in setMaximumRangeX
    |   138:   for (auto& it : strings)
    |   139:   {
    | > 140:     it.second.setMaximumRangeX(range);
    |   141:   }
    |   142:   for (auto& it : user_defined)
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 45, in trimRange
    |    43:   {
    |    44:     _max_range_x = max_range;
    | >  45:     trimRange();
    |    46:   }
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 86, in trimRange
    |    85: private:
    | >  86:   void trimRange()
    |    87:   {
    |    88:     if(_max_range_x < std::numeric_limits<double>::max())
      Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 90, in setMaximumRangeX [0x55614ce90c45]
         87:   {
         88:     if(_max_range_x < std::numeric_limits<double>::max())
         89:     {
      >  90:       auto const back_point_x = _points.back().x;
         91:       while (_points.size() > 2 && (back_point_x - _points.front().x) > _max_range_x)
         92:       {
         93:         this->popFront();
Segmentation fault (Address not mapped to object [0x1e0])
[ros2run]: Segmentation fault
paul@paul-Precision-3541:~/ws_ros2$ ros2 run plotjuggler plotjuggler 
Loading compatible plugins from directory:  "/home/paul/ws_ros2/install/plotjuggler_ros/lib/plotjuggler_ros"
"libDataLoadROS2.so is a DataLoader plugin"
"libDataStreamROS2.so is a DataStreamer plugin"
[WARN] [1684831191.706553499] [rclcpp]: logging was initialized more than once
"libTopicPublisherROS2.so is a StatePublisher plugin"
Number of plugins loaded:  3 

Loading compatible plugins from directory:  "/home/paul/ws_ros2/install/plotjuggler/lib/plotjuggler"
"libDataLoadCSV.so is a DataLoader plugin"
"libDataLoadMCAP.so is a DataLoader plugin"
"libDataLoadULog.so is a DataLoader plugin"
"libDataStreamSample.so is a DataStreamer plugin"  ...disabled, unless option -t is used
"libDataStreamUDP.so is a DataStreamer plugin"
"libDataStreamWebSocket.so is a DataStreamer plugin"
"libDataStreamZMQ.so is a DataStreamer plugin"
"libParserDataTamer.so is a MessageParser plugin"
"libParserROS1.so is a MessageParser plugin"
"libParserROS2.so is a MessageParser plugin"
"libProtobufParser.so is a MessageParser plugin"
"libPublisherCSV.so is a StatePublisher plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxFFT.so is a Toolbox plugin"
"libToolboxLuaEditor.so is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxQuaternion.so is a Toolbox plugin"
Number of plugins loaded:  14 

Loading compatible plugins from directory:  "/home/paul/.local/share/PlotJuggler"
Number of plugins loaded:  0 

Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#30   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47cbfd4, in 
#28   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47c8d3f, in 
#27   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4772e46, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
#26   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4774363, in QApplication::notify(QObject*, QEvent*)
#24   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47af4ed, in QWidget::event(QEvent*)
#22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b48641e6, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
#21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4863fc3, in 
#20   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b486239d, in 
#19   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4862115, in QAbstractButton::clicked(bool)
#18   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af14e4, in 
#17   Source "/home/paul/ws_ros2/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 515, in qt_metacall [0x56461d9d3199]
        512:         return _id;
        513:     if (_c == QMetaObject::InvokeMetaMethod) {
        514:         if (_id < 66)
      > 515:             qt_static_metacall(this, _c, _id, _a);
        516:         _id -= 66;
        517:     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        518:         if (_id < 66)
#16   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 3349, in on_buttonStreamingStart_clicked [0x56461da15fd2]
       3346:   ui->buttonStreamingStart->setEnabled(false);
       3347:   if (ui->buttonStreamingStart->text() == "Start")
       3348:   {
      >3349:     startStreamingPlugin(ui->comboStreaming->currentText());
       3350:   }
       3351:   else
       3352:   {
#15   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1695, in startStreamingPlugin [0x56461da0c88b]
       1692:   try
       1693:   {
       1694:     // TODO data sources (argument to _active_streamer_plugin->start()
      >1695:     started = _active_streamer_plugin && _active_streamer_plugin->start(nullptr);
       1696:   }
       1697:   catch (std::runtime_error& err)
       1698:   {
#14   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 144, in start [0x7f87802221ed]
        141:   });
        142: 
        143:   //-----------------------------
      > 144:   waitOneSecond();
        145:   return true;
        146: }
#13   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 48, in waitOneSecond [0x7f87802216f8]
         45:   {
         46:     int msec = duration_cast<milliseconds>(system_clock::now() - start_time).count();
         47:     progress_dialog.setValue(msec);
      >  48:     QApplication::processEvents();
         49:     if (progress_dialog.wasCanceled())
         50:     {
         51:       break;
#12   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b13111, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#11   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b291e3e2, in g_main_context_iteration
#10   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b29756c7, in 
#9    Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b2920d3a, in g_main_context_dispatch
#8    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b12ceb, in 
#7    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b123ea, in QTimerInfoList::activateTimers()
#6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#4    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ae733e, in QObject::event(QEvent*)
#3    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af57fd, in QTimer::timeout(QTimer::QPrivateSignal)
#2    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af1792, in 
#1    Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2390, in updateDataAndReplot [0x56461da0bd20]
       2387:       _curvelist_widget->refreshColumns();
       2388:     }
       2389: 
      >2390:     _mapped_plot_data.setMaximumRangeX(ui->streamingSpinBox->value());
       2391:   }
       2392: 
       2393:   const bool is_streaming_active = isStreamingActive();
#0  | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/src/plotdata.cpp", line 140, in setMaximumRangeX
    |   138:   for (auto& it : strings)
    |   139:   {
    | > 140:     it.second.setMaximumRangeX(range);
    |   141:   }
    |   142:   for (auto& it : user_defined)
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 45, in trimRange
    |    43:   {
    |    44:     _max_range_x = max_range;
    | >  45:     trimRange();
    |    46:   }
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 86, in trimRange
    |    85: private:
    | >  86:   void trimRange()
    |    87:   {
    |    88:     if(_max_range_x < std::numeric_limits<double>::max())
      Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 90, in setMaximumRangeX [0x56461db35c45]
         87:   {
         88:     if(_max_range_x < std::numeric_limits<double>::max())
         89:     {
      >  90:       auto const back_point_x = _points.back().x;
         91:       while (_points.size() > 2 && (back_point_x - _points.front().x) > _max_range_x)
         92:       {
         93:         this->popFront();
Segmentation fault (Address not mapped to object [0x1e0])
[ros2run]: Segmentation fault

segmentation fault when loading plugins

Hi,

I try to use the latest version of PlotJuggler using the Ros plugins, but I struggle a bit.

When I use the version that comes trough apt-get I once again get questioned to update. Since I of course want the latest & greatest, I download the AppImage version from github! However, this does not have Ros2 (galactic in my case) support. When I try to use the default plugins (apt install ..) I get the following error message. Sometimes it works though, sometimes not..

What would be the recommended way of using the latest PlotJuggler with ros2 plugings? Are there maybe binaries available for the plugin that do work with the AppImage version?

Thanks in advance!

~/Desktop/PlotJuggler-3.4.1-x86_64.AppImage 
Loading compatible plugins from directory:  "/opt/ros/galactic/lib/plotjuggler_ros"
"libDataLoadROS2.so is a DataLoader plugin"
"libDataStreamROS2.so is a DataStreamer plugin"
Stack trace (most recent call last):
#7    Object "", at 0xffffffffffffffff, in 
#6    Object "/tmp/.mount_PlotJuzgnvu1/usr/bin/plotjuggler", at 0x55b5c4adb90d, in _start
#5    Source "../csu/libc-start.c", line 308, in __libc_start_main [0x7fe850e3c0b2]
#4    Source "/home/dfaconti/tmp_pj/PlotJuggler/plotjuggler_app/main.cpp", line 368, in main [0x55b5c4ada8a6]
#3    Source "/home/dfaconti/tmp_pj/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 230, in MainWindow [0x55b5c4b1d34d]
#2    Source "/home/dfaconti/tmp_pj/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 566, in loadAllPlugins [0x55b5c4b1464e]
#1    Source "/home/dfaconti/tmp_pj/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 741, in initializePlugins [0x55b5c4b13965]
#0  | Source "/home/dfaconti/tmp_pj/PlotJuggler/plotjuggler_base/src/datastreamer_base.cpp", line 8, in operator=
    | Source "/usr/include/c++/9/bits/shared_ptr.h", line 103, in operator=
    |   101:   */
    |   102:   template<typename _Tp>
    | > 103:     class shared_ptr : public __shared_ptr<_Tp>
    |   104:     {
    |   105:       template<typename... _Args>
    | Source "/usr/include/c++/9/bits/shared_ptr_base.h", line 1080, in operator=
    |  1079:   template<typename _Tp, _Lock_policy _Lp>
    | >1080:     class __shared_ptr
    |  1081:     : public __shared_ptr_access<_Tp, _Lp>
    |  1082:     {
    | Source "/usr/include/c++/9/bits/shared_ptr_base.h", line 749, in _M_release
    |   747: 	      __tmp->_M_add_ref_copy();
    |   748: 	    if (_M_pi != 0)
    | > 749: 	      _M_pi->_M_release();
    |   750: 	    _M_pi = __tmp;
    |   751: 	  }
    | Source "/usr/include/c++/9/bits/shared_ptr_base.h", line 152, in __exchange_and_add_dispatch
    |   150:         // Be race-detector-friendly.  For more info see bits/c++config.
    |   151:         _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
    | > 152: 	if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
    |   153: 	  {
    |   154:             _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
    | Source "/usr/include/c++/9/ext/atomicity.h", line 78, in __exchange_and_add_dispatch
    |    76:   static inline _Atomic_word
    |    77:   __attribute__ ((__unused__))
    | >  78:   __exchange_and_add_dispatch(_Atomic_word* __mem, int __val)
    |    79:   {
    |    80: #ifdef __GTHREADS
    | Source "/usr/include/c++/9/ext/atomicity.h", line 82, in __exchange_and_add
    |    80: #ifdef __GTHREADS
    |    81:     if (__gthread_active_p())
    | >  82:       return __exchange_and_add(__mem, __val);
    |    83:     else
    |    84:       return __exchange_and_add_single(__mem, __val);
      Source "/usr/include/c++/9/ext/atomicity.h", line 49, in setAvailableParsers [0x55b5c4c48bfe]
         46: #ifdef _GLIBCXX_ATOMIC_BUILTINS
         47:   static inline _Atomic_word 
         48:   __exchange_and_add(volatile _Atomic_word* __mem, int __val)
      >  49:   { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
         50: 
         51:   static inline void
         52:   __atomic_add(volatile _Atomic_word* __mem, int __val)
Segmentation fault (Signal sent by the kernel [(nil)])
Segmentation fault (core dumped)

Error when installing Plotjuggler to ros2 dashing

I couldn't install plotjuggler plugin to ROS2 dashing.

When I execute following:
sudo apt install ros-${ROS_DISTRO}-plotjuggler
I got error E: Unable to locate package ros-dashing-plotjuggler

Then I tried to compile PlotJuggler from source.
I clone following repositories

 mkdir -p ~/ws_plotjuggler/src
 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

When I execute rosdep install

cd ~/ws_plotjuggler
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

I got the following error
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
plotjuggler_msgs: Cannot locate rosdep definition for [message_runtime]

Segmentation Fault by loading Layout with tab separations

Problem description

Receive "Segmentation fault" trying to load saved layout, which contains vertical or horizontal tab separations. Launching plotjuggler and loading layout without tab separations, is working without problems.

Steps to reproduce (important)

- Describe your platform / Operative System.
Ubuntu 22.04 with ROS2 Humble.

- Check if the problem can be reproduced using the dummy data created by the command line argument "-t" or one of the files in the folder "datasamples".
Yes, I also receive "Segmentation Fault" Error!
In details, I start plotjuggler using "ros2 run plotjuggler plotjuggler -t" and I save the following layout under name jugplot.xml
image
I stop plotjuggler and call it again with "ros2 run plotjuggler plotjuggler". Then from 'File->Layout->load Data and Window plots layout' I try to load my jugplot.xml layout and I receive:
image

colcon build, code compilation failed(Ubuntu20.04+ros rolling)

/home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/generic_publisher.h:28:119: error: no matching function for call to ‘rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*&, const string&, const rosidl_message_type_support_t&, rcl_publisher_options_t, rclcpp::PublisherEventCallbacks&, bool)’
28 | : rclcpp::PublisherBase(node_base, topic_name, type_support, rcl_publisher_get_default_options(), callbacks_, true)
| ^
In file included from /opt/ros/rolling/include/rclcpp/callback_group.hpp:24,
from /opt/ros/rolling/include/rclcpp/any_executable.hpp:20,
from /opt/ros/rolling/include/rclcpp/memory_strategy.hpp:25,
from /opt/ros/rolling/include/rclcpp/memory_strategies.hpp:18,
from /opt/ros/rolling/include/rclcpp/executor_options.hpp:20,
from /opt/ros/rolling/include/rclcpp/executor.hpp:37,
from /opt/ros/rolling/include/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/rolling/include/rclcpp/executors.hpp:21,
from /opt/ros/rolling/include/rclcpp/rclcpp.hpp:155,
from /home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/publisher_ros2.h:9,
from /home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/publisher_ros2.cpp:1:
/opt/ros/rolling/include/rclcpp/publisher_base.hpp:75:3: note: candidate: ‘rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rosidl_message_type_support_t&, const rcl_publisher_options_t&)’
75 | PublisherBase(
| ^~~~~~~~~~~~~
/opt/ros/rolling/include/rclcpp/publisher_base.hpp:75:3: note: candidate expects 4 arguments, 6 provided
/opt/ros/rolling/include/rclcpp/publisher_base.hpp:58:7: note: candidate: ‘rclcpp::PublisherBase::PublisherBase(const rclcpp::PublisherBase&)’
58 | class PublisherBase : public std::enable_shared_from_this
| ^~~~~~~~~~~~~
/opt/ros/rolling/include/rclcpp/publisher_base.hpp:58:7: note: candidate expects 1 argument, 6 provided
In file included from /home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/publisher_ros2.h:18,
from /home/user/ws_plotjuggler/src/build/plotjuggler_ros/plugins/TopicPublisherROS2_autogen/TH6L5D5FXO/moc_publisher_ros2.cpp:9,
from /home/user/ws_plotjuggler/src/build/plotjuggler_ros/plugins/TopicPublisherROS2_autogen/mocs_compilation.cpp:2:
/home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/generic_publisher.h: In constructor ‘GenericPublisher::GenericPublisher(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rosidl_message_type_support_t&)’:
/home/user/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/TopicPublisherROS2/generic_publisher.h:28:119: error: no matching function for call to ‘rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*&, const string&, const rosidl_message_type_support_t&, rcl_publisher_options_t, rclcpp::PublisherEventCallbacks&, bool)’
28 | : rclcpp::PublisherBase(node_base, topic_name, type_support, rcl_publisher_get_default_options(), callbacks_, true)

Build error with colcon build on ROS2

Hi, after the last commits I receiver build error as below:

berkay@ade:~/ws_plotjuggler$ colcon build
Starting >>> plotjuggler
Starting >>> plotjuggler_msgs
Finished <<< plotjuggler [3.07s]                                                            
Finished <<< plotjuggler_msgs [3.56s]                  
Starting >>> plotjuggler_ros
--- stderr: plotjuggler_ros                             
/home/berkay/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp: In member function ‘void DataStreamROS2::subscribeToTopic(const string&, const string&)’:
/home/berkay/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp:193:27: error: ‘adapt_request_to_offers’ is not a member of ‘PJ’; did you mean ‘Rosbag2QoS::adapt_request_to_offers’?
  193 |   auto detected_qos = PJ::adapt_request_to_offers(topic_name, publisher_info);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/berkay/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp:10:
/home/berkay/ws_plotjuggler/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/rosbag2_helper.hpp:11:20: note: ‘Rosbag2QoS::adapt_request_to_offers’ declared here
   11 | inline rclcpp::QoS adapt_request_to_offers(
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [plugins/CMakeFiles/DataStreamROS2.dir/build.make:76: plugins/CMakeFiles/DataStreamROS2.dir/DataStreamROS2/datastream_ros2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:189: plugins/CMakeFiles/DataStreamROS2.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< plotjuggler_ros [4.21s, exited with code 2]

Summary: 2 packages finished [7.93s]
  1 package failed: plotjuggler_ros
  1 package had stderr output: plotjuggler_ros

After I changed line 193 to:
auto detected_qos = Rosbag2QoS::adapt_request_to_offers(topic_name, publisher_info);
issue solved.
I don't know it is because of me or not.

I have some problem in compile from source

Environment

ubuntu16.04
ros kinetic
gcc-8
qt-5

command

cd ~/ws_plotjuggler
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
catkin_make

then the error occurs:
ws_plotjuggler/src/PlotJuggler/plotjuggler_plugins/DataStreamWebsocket/websocket_server.cpp:109:11: error: ‘qOverload’ was not declared in this scope
qOverload<const QString &>(&QComboBox::currentIndexChanged),
^~~~~~~~~
ws_plotjuggler/src/PlotJuggler/plotjuggler_plugins/DataStreamWebsocket/websocket_server.cpp:109:21: error: expected primary-expression before ‘const’
qOverload<const QString &>(&QComboBox::currentIndexChanged),

Also

if I compile the main package Plotjuggler(ignore the ros-plugin) with cmake .. and make, the same error occurs.( > _ < )

The plugin [DataLoad ROS bags] thrown the following exception: Variant::extract -> wrong type

Hi,

I have a custom ROS message VisualizationData and a bagfile containing built-in ROS messages (like std_msgs/Bool, sensor_msgs/Imu, ...) and others custom ROS messages (including VisualizationData). When I load the bagfile, if I select the topic with Datatype VisualizationData, plotjuggler fails with error:

image

I don't have this issue with the others custom ROS messages.

OS: Ubuntu 20.04
Plotjuggler: from snap, PlotJuggler-3 3.0.7

VisualizationData is a composition of built-in ROS type/fixed-length and variable-length array and custom ROS messages :

VisualizationData.msg

Header header

int64 image_counter
bool zero_velocity_update

int8[] camera_id_array
FrameInfo[] frames

FrameInfo.msg

Point2D[] candidates
Landmark[] landmarks
LandmarkUncertainty[] landmark_uncertainties
NewLandmark[] new_landmarks
PatchInfo[] patches

float64 roll
float64 pitch

Point2D.msg

float32 x
float32 y

Landmark.msg

uint8 LANDMARK_FINAL = 0
uint8 LANDMARK_SURROUNDING_GOOD = 1
uint8 LANDMARK_SURROUNDING_BAD = 2
uint8 LANDMARK_NOT_CONVERGED = 3
uint8 LANDMARK_INTENSITY_ERROR = 4

uint8 status
Point2D point

LandmarkUncertainty.msg

Point2D point
uint32 number

float64 sigma1
float64 sigma2
float64 sigma_angle

NewLandmark.msg

uint8 NEW_LANDMARK_CANDIDATE = 0
uint8 NEW_LANDMARK_CONVERGED_VALID = 1
uint8 NEW_LANDMARK_CONVERGED_REJECTED = 2
uint8 NEW_LANDMARK_NOT_CONVERGED = 3

uint8 status
Point2D point
uint32 number

PatchInfo.msg

uint8 PATCH_SUCCESS = 0
uint8 PATCH_NOT_IN_FRAME = 1
uint8 PATCH_OUTLIER = 2
uint8 PATCH_NOT_CONVERGED = 3
uint8 PATCH_TOO_LARGE_INTENSITY_ERROR = 4

uint8 status
Point2D point
Point2D[4] corners
float64 data

I tracked down the issue to ros1_parser.cpp: IntrospectionParser::parseMessage and the functions raising the exception to variant.hpp: Variant::extract. But I don't know why it fails to parse the message, given its definition.

Any idea what may be causing this?

Installation from apt missing for galactic

Since this morning (we have a continuous CI, which runs every morning), the installation of the plotjuggler ros package for the galactic distribution is failing. When I am trying to run:

sudo apt install ros-galactic-plotjuggler-ros

it fails with the error that it is unable to locate the package.

Problems during installation

when I run sudo apt install ros-${ROS_DISTRO}-plotjuggler-ros
I got :

 ros-kinetic-plotjuggler : Depends: binutils-dev but it is not going to be installed
                       Depends: libqt5multimedia5-plugins but it is not going to be installed

but when I install those two depends.
binutils is already the newest version (2.26.1-1ubuntu1~16.04.8)
libqt5multimedia5-plugins : Depends: libqt5multimedia5 (= 5.2.1-0ubuntu5) but 5.5.1-4ubuntu2 is to be installed
So , how can I install this tool?
build with repository is wrong,too.

Plot custom ROS2 messages

Hi,
I have some custom ROS (2) messages that I would like to plot in plotjuggler.
Currently, I can see my topics but nothing happens when I select them. Of course, standard ROS messages are working fine (geometry_msgs etc.).
I'm sourced both to my workspace where my messages are defined, and to /opt/ros/galactic/setup.bash

Could you recommend the best way to add my custom messages?

Released binary version is still 1.5.1 instead of latest 1.7.2

The released binary version of plugins is still 1.5.1 when installing humble or rolling binaries. The 1.5.1 version doesn't handle best-efforts topic properly and reports an incompatible qos. Compiling and running the latest version 1.7.2 locally fixes this problem.

Failed to compile using catkin build

I have installed in my system and it is working fine. I was trying to install ROS plugins through source, but during the build of plotjuggler_ros package I get the following error(s). Can someone point out what I am doing wrong and/or what can be possible solution of this. I am using ROS Noetic on mac m1 installed through conda (robostack).

/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:84: error: no member named 'ptr_fun' in namespace 'std'
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
~~~~~^
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:95: error: expected '(' for function-style cast or type construction
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
~~~^
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:100: error: expected '(' for function-style cast or type construction
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));

Thanks in advance!

Update data tip of each plot according to the header stamp rather than the receive stamp when `use_header_stamp` is true

When use_header_stamp is set to true for pluginDataLoad ROS bags, ROS Topic Re-Publisher still uses the receive/record timestamp to determine which message to publish, which creates a discrepancy between the messages published and the data tip shown in the plot. The figure below shows the discrepancy: a) header timestamp; b) receive/record timestamp.
image
Can we show the data tip of the plotted data point corresponding to the header stamp instead?

Plotjuggler 3 ignores ROS_MASTER_URI & ROS_IP

Hello, as always, thanks a lot for your amazing work!

I just tried to subscribe to a live topic from a robot (making my ROS_MASTER_URI point to the robot and my ROS_IP correct) and I found out I only get my local topics (from a rosbag I was testing) in Plotjuggler, not the ones in the robot. Plotjuggler 2.8.4 did show me the expected topics, so I was surprised to see the 3.0.7 version didn't.

How to install specific (older) version of plotjuggler and needed plugins?

I have different systems. One is Ubuntu 18.04, another one is Kubuntu 18.04. Currently I use Plottjuggler 3.4 but it is too memory hungry for analyzing ros bags. An older version of Plotjuggler 3.0.7 was better for this. I installed the v3.0.7 but I fail to install the plotjuggler_ros package (Unable to locate package plotjuggler_ros). What is the fastest and/or the cleanest way?

ros2 bag play

when 'ros2 bag play' will be supported in plotjuggler?

[Feature request] Open multiple bagfiles as one

tldr: Open multiple bagfiles as if it was one

There is a nice option to open multiple bagfiles and they all get namespaced. I find myself in the position of having multiple sequential bagfiles (--split option). It would be nice if we can load them without the namespacing because it's the same data.

This has some implications:

  • Bagfiles may overlap (might simply be ignored)
  • Bagfiles may not contain same data (difficult for selection options)

Opening this here instead of the ros plugins repo as it might be relevant for csv files or others as well.

Use ros2_introspection as ROS2 package

I want to use ros2_introspection as standalone ROS2 package. However, currently it's impossible because CMakelists.txt and package.xml are not provided.

Is there any plan to make ros2_introspection as a package like ros1_introspection?

std::bad_alloc on ROS2 Bag load

Hi,

I was trying to load a simple ROS2 bag with the load data from file (by selecting the metadata.yaml of the ROSbag) but it always throw the same error (std::bad_alloc) while loading the data. While replaying the bag through ros2 bag play and subscribing to the topic with Plotjuggler works perfectly fine.
I'm using plotjuggler latest version with plotjuggler-ros-plugins v1.7.3. Is this an expected behavior ?

The metadata of the simple ROSBag :

rosbag2_bagfile_information:
  version: 4
  storage_identifier: sqlite3
  relative_file_paths:
    - rosbag2_2023_02_28-11_44_54_0.db3
  duration:
    nanoseconds: 6430324604
  starting_time:
    nanoseconds_since_epoch: 1677581094320974926
  message_count: 6433
  topics_with_message_count:
    - topic_metadata:
        name: /wrench_ee
        type: geometry_msgs/msg/WrenchStamped
        serialization_format: cdr
        offered_qos_profiles: "- history: 3\n  depth: 0\n  reliability: 1\n  durability: 2\n  deadline:\n    sec: 2147483647\n    nsec: 4294967295\n  lifespan:\n    sec: 2147483647\n    nsec: 4294967295\n  liveliness: 1\n  liveliness_lease_duration:\n    sec: 2147483647\n    nsec: 4294967295\n  avoid_ros_namespace_conventions: false"
      message_count: 6433
  compression_format: ""
  compression_mode: ""

The stack trace :

double free or corruption (!prev)
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8c70ef, in QApplication::notify(QObject*, QEvent*)
#30   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8bda65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e91f1eb, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**)
#28   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e91c35c, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**)
#27   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8c6456, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
#26   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f731dea5809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8c7342, in QApplication::notify(QObject*, QEvent*)
#24   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8bda65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9002b5, in QWidget::event(QEvent*)
#22   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9b4034, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
#21   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9b3e72, in QAbstractButton::setIconSize(QSize const&)
#20   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9b2a2d, in QAbstractButton::toggled(bool)
#19   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9b2805, in QAbstractButton::clicked(bool)
#18   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f731ded128b, in QMetaObject::activate(QObject*, int, int, void**)
#17   Source "/home/antoineh/Plotjuggler_ws/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 514, in MainWindow::qt_metacall(QMetaObject::Call, int, void**) [0x56083cf09aa9]
        511:         return _id;
        512:     if (_c == QMetaObject::InvokeMetaMethod) {
        513:         if (_id < 66)
      > 514:             qt_static_metacall(this, _c, _id, _a);
        515:         _id -= 66;
        516:     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        517:         if (_id < 66)
#16   Source "/home/antoineh/Plotjuggler_ws/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 422, in MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [0x56083cf07d48]
        419:         case 61: _t->on_buttonRecentLayout_clicked(); break;
        420:         case 62: _t->on_pushButtonLoadLayout_clicked(); break;
        421:         case 63: _t->on_pushButtonSaveLayout_clicked(); break;
      > 422:         case 64: _t->on_pushButtonLoadDatafile_clicked(); break;
        423:         case 65: _t->on_actionColorMap_Editor_triggered(); break;
        424:         default: ;
        425:         }
#15   Source "/home/antoineh/Plotjuggler_ws/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2987, in MainWindow::on_pushButtonLoadDatafile_clicked() [0x56083cf5acd5]
       2984:   directory_path = QFileInfo(fileNames[0]).absolutePath();
       2985:   settings.setValue("MainWindow.lastDatafileDirectory", directory_path);
       2986: 
      >2987:   if (loadDataFromFiles(fileNames))
       2988:   {
       2989:     updateRecentDataMenu(fileNames);
       2990:   }
#14   Source "/home/antoineh/Plotjuggler_ws/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1368, in MainWindow::loadDataFromFiles(QStringList) [0x56083cf56073]
       1365:     {
       1366:       info.prefix = filename_prefix[info.filename];
       1367:     }
      >1368:     auto added_names = loadDataFromFile(info);
       1369:     if (!added_names.empty())
       1370:     {
       1371:       loaded_filenames.push_back(filenames[i]);
#13   Source "/home/antoineh/Plotjuggler_ws/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1534, in MainWindow::loadDataFromFile[abi:cxx11](PJ::FileLoadInfo const&) [0x56083ceef419]
       1531:     }
       1532:     catch (std::exception& ex)
       1533:     {
      >1534:       QMessageBox::warning(this, tr("Exception from the plugin"),
       1535:                            tr("The plugin [%1] thrown the following exception: \n\n %3\n")
       1536:                                .arg(dataloader->name())
       1537:                                .arg(ex.what()));
#12   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731eafa478, in QMessageBox::critical(QWidget*, QString const&, QString const&, int, int, int)
#11   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e8fbc28, in QWidget::~QWidget()
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f731deceeed, in QObjectPrivate::deleteChildren()
#9    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9f935c, in QLabel::~QLabel()
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9f9328, in QLabel::~QLabel()
#7    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731e9f90ce, in QLabel::setBuddy(QWidget*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f731eaa81bc, in QWidgetTextControl::~QWidgetTextControl()
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f731ded9506, in QObject::~QObject()
BFD: DWARF error: section .debug_info is larger than its filesize! (0x93ef57 vs 0x530ea0)
#4    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f731d752fab, in pthread_attr_setschedparam
#3    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f731d7512fb, in pthread_attr_setschedparam
#2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f731d74926d, in __fsetlocking
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f731d6de858, in abort
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f731d6ff00b, in gsignal

Cheers

ros2 topic re-publisher mis-selection randomly in x11/wsl env

hi, is anyone facing the same issue?

after trying select some topics and click the ok button of the gui panel, when i check it again by re-open the selection panel gui, i always found the selection result was randomly mistaken.

sometimes the deselect all button look works (though not always)...

PX4 topics can't be plotted

Hello, thanks for the project! I've been using it with PX4 for a year or two now and it's been invaluable.

I am trying to use PlotJuggler to subscribe to an /fmu topic over the DDS bridge from a device connected on the same network, but the topic doesn't appear in the list in PJ. All of the other topics from running nodes do appear, just not the /fmu topics. Strangely if I run ros2 topic hz /fmu/out/vehicle_attitude on the device the topic appears in the list, but PJ still fails to plot it. I suspect this might be related to the QoS settings but I'm not sure.
https://docs.px4.io/main/en/middleware/uxrce_dds.html#px4-ros-2-qos-settings

PX4 uses the following QoS settings for publishers:

uxrQoS_t qos = {
  .durability = UXR_DURABILITY_TRANSIENT_LOCAL,
  .reliability = UXR_RELIABILITY_BEST_EFFORT,
  .history = UXR_HISTORY_KEEP_LAST,
  .depth = 0,
};

I added some debug printout in DataStreamROS2::subscribeToTopic and I see the QoS settings don't match the above (/camera/imu is from a realsense node and I am able to plot, it likely has default QoS settings)

subscribeToTopic:  /camera/imu
durability:  2
reliability:  1
history:  1
depth:  10

subscribeToTopic:  /fmu/out/vehicle_attitude
durability:  2
reliability:  1
history:  1
depth:  10

image

Int64 type makes PlotJuggler crash

To easily reproduce rostopic pub -r10 /test std_msgs/Int64 "data: 0" and let PlotJuggler subscribe to that topic, it will immediately crash.
If I import a bagfile with the same datatype message, it throws me Variant::extract -> wrong type

Doing the same tests with std_msgs/UInt64 seems to work however? Any reason why the Int64 datatype gives problems?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.