Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ros-humble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ROS2 Humble

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
steps:
# Set up ROS
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble

# Run ROS CI
- uses: ros-tooling/[email protected]
with:
package-name: plotjuggler_ros
target-ros2-distro: humble
23 changes: 23 additions & 0 deletions .github/workflows/ros-jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ROS2 Jazzy

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-24.04
steps:
# Set up ROS
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: jazzy

# Run ROS CI
- uses: ros-tooling/[email protected]
with:
package-name: plotjuggler_ros
target-ros2-distro: jazzy
23 changes: 23 additions & 0 deletions .github/workflows/ros-rolling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ROS2 Rolling

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-24.04
steps:
# Set up ROS
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: rolling

# Run ROS CI
- uses: ros-tooling/[email protected]
with:
package-name: plotjuggler_ros
target-ros2-distro: rolling
17 changes: 0 additions & 17 deletions .github/workflows/ros1.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/ros2.yaml

This file was deleted.

89 changes: 14 additions & 75 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,15 @@ cmake_minimum_required(VERSION 3.5)

PROJECT(plotjuggler_ros)

find_package(ament_cmake QUIET)
find_package(catkin QUIET)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rosbag2_transport REQUIRED)
find_package(Boost REQUIRED)
find_package(tf2_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(plotjuggler REQUIRED)

# http://answers.ros.org/question/230877/optionally-build-a-package-with-catkin/
if( catkin_FOUND OR CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE)
set(COMPILING_WITH_CATKIN 1)

message(STATUS "---------------------------------------------------------------------")
message(STATUS "PlotJuggler is being built using CATKIN. ROS plugins will be compiled")
message(STATUS "---------------------------------------------------------------------")

set(ROS_DEPENDENCIES
rosbag_storage
roscpp
roscpp_serialization
ros_type_introspection
tf2_ros
plotjuggler )

find_package(catkin REQUIRED COMPONENTS ${ROS_DEPENDENCIES} )

catkin_package(
CATKIN_DEPENDS ${ROS_DEPENDENCIES} )

elseif( ament_cmake_FOUND )
set(COMPILING_WITH_AMENT 1)

message(STATUS "---------------------------------------------------------------------")
message(STATUS "PlotJuggler is being built using AMENT. ROS2 plugins will be compiled")
message(STATUS "---------------------------------------------------------------------")

find_package(rclcpp REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rosbag2 REQUIRED)
find_package(rosbag2_transport REQUIRED)
find_package(Boost REQUIRED)
find_package(tf2_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(plotjuggler REQUIRED)

else()
message(FATAL_ERROR "PlotJuggler is being WITHOUT any ROS support")
endif()

cmake_policy (SET CMP0020 NEW)

Expand Down Expand Up @@ -96,47 +62,20 @@ IF (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF()

include_directories(
3rdparty
${Qt5Core_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Concurrent_INCLUDE_DIRS}
${Qt5Xml_INCLUDE_DIRS}
${Qt5WebSockets_INCLUDE_DIRS}
${Qt5Svg_INCLUDE_DIRS}
)

add_definitions(-DFMT_HEADER_ONLY)

######################### INSTALL ####################################

if(COMPILING_WITH_CATKIN)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})

install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

elseif(COMPILING_WITH_AMENT)
find_package(ament_cmake REQUIRED)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME})
install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME})

else()
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/plotjuggler)
endif()

#############################################################

add_subdirectory( src )

if(COMPILING_WITH_AMENT)
ament_package()
endif()
ament_package()


20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ ROS is supported through external plugins that can be found in this [repository]
- **Re-publisher** similar to `rosbag play` (ROS only).


## Install with Debians (TODO)
## Install with Debians

Install PlotJuggler and its ROS plugins with:

sudo apt install ros-${ROS_DISTRO}-plotjuggler-ros

To launch PlotJuggler on ROS, use the command:

rosrun plotjuggler plotjuggler

or, if have ROS2 installed:

ros2 run plotjuggler plotjuggler
ros2 run plotjuggler plotjuggler

## How to compile PlotJuggler from source

Expand All @@ -41,12 +37,12 @@ Create a catkin workspace and clone the repositories:
Now, it is time to compile:

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

Enjoy:
rosdep install --from-paths src --ignore-src -y
colcon build

# For ROS (1) users

From version 2.3+, this library will support only ROS2 (Hubmle or older)

source devel/setup.bash
roslaunch plotjuggler_ros plotjuggler.launch


21 changes: 5 additions & 16 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,12 @@

<author email="[email protected]">Davide Faconti</author>

<!-- ROS1 dependencies -->
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend>

<depend condition="$ROS_VERSION == 1">rosbag_storage</depend>
<depend condition="$ROS_VERSION == 1">roscpp</depend>
<depend condition="$ROS_VERSION == 1">roscpp_serialization</depend>
<depend condition="$ROS_VERSION == 1">ros_type_introspection</depend>

<!-- ROS2 dependencies -->
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<depend condition="$ROS_VERSION == 2">ros_environment</depend>
<depend condition="$ROS_VERSION == 2">rclcpp</depend>
<depend condition="$ROS_VERSION == 2">rcpputils</depend>
<depend condition="$ROS_VERSION == 2">rosbag2</depend>
<depend condition="$ROS_VERSION == 2">rosbag2_transport</depend>
<depend>rclcpp</depend>
<depend>rcpputils</depend>
<depend>rosbag2_transport</depend>

<depend>plotjuggler</depend>
<depend>tf2_ros</depend>
Expand All @@ -42,7 +32,6 @@

<!-- The export tag contains other, unspecified, tags -->
<export>
<build_type condition="$ROS_VERSION == 1">catkin</build_type>
<build_type condition="$ROS_VERSION == 2">ament_cmake</build_type>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading