Skip to content

Commit

Permalink
update master (#22)
Browse files Browse the repository at this point in the history
* core: launch_config: parse attributes in parent context

and make it mutable (required for $(anon))

* core: launch_config: handle $(anon) in ParseContext, see xqms#100

* core: test: node_utils: more debug output

* core: test: test_subst: test for nested $(anon), see xqms#100

* fix two typos in the README

* rosmon_core: fix a lot of whitespace issues introduced in xqms#76

* rosmon_core: option to obey output="XY" tags (see xqms#108)

Co-authored-by: Roger Pi <u1926981@campus.udg.edu>

* rosmon_core: unit test for output-attr parsing, refs xqms#108

* fix xqms#110

* rosmon_core: do not print node prefix in --disable-ui mode

--disable-ui is mostly used with ncurses-like nodes that have problems
with such additional outputs.

* rosmon_core: node_monitor: flush out remaining node output after node exit

* rosmon_core: new rosmon-disable-ui attribute for problematic launch files

* core: launch_config: accept empty yaml node

* rosmon_core: LaunchConfig warnings to stderr & make them captureable

* rosmon_core: test: unit tests for the warnings we trigger

* rosmon_core: Add YAML merge key parsing functionality.

* rosmon_core: Adding fix for rosparam parsing to equivilate with undocumented behavior of roslaunch

* rosmon_core: test: unit tests for merge keys feature

* rosmon_core: ui: UI DrawStatus optimized to only refresh on events.

* core: launch: add some comments & fix whitespace

* rosmon_core: depend on python2/3 conditioned on ROS_PYTHON_VERSION

* core: launch: add comments

* core: ui: just redraw on every keystroke

* core: launch: shift some node attributes into context

See xqms#116

* rosmon_core: parse scope attributes also for launch, include, group tags

* core: launch: make "enable-coredumps" a scoped attribute

* core: test: add test for scoped attributes on include tags

* core: monitor: support for systemd-coredump

* core: monitor: delete working directories from two runs ago

* capture stderr separately and correctly do output=log

* roscore: test: Fixing unit tests for stdout_stderr mod

* Adding alt. stderr output filter

* CHANGELOG

* CHANGELOG

* 2.3.0

* rosmon_core: cmake: request specific boost_python3 version

* rosmon_core: test: adapt test_node to python 3

* CHANGELOG

* 2.3.1

* rosmon_core: *really* fix search for boost_python for python 3

* rosmon_core: cmake: increase minimum version to address policy warnings

* CHANGELOG

* 2.3.2

* rosmon_core: cmake: older cmake versions don't have GREATER_EQUAL

* all: increase cmake minimum version to 3.4

* README: add installation hint for rosmon_core

* core: launch_config: loadYAMLParams: don't scope keys with leading slash

See xqms#130 for bug report. Basically, roslaunch respects leading slashes
during key resolution, we don't. We don't know what's better, but we have
to match whatever roslaunch is doing, as always.

* core: test: xml: rosparam: test leading slashes in keys

* core: consolidate floating point types used for stats

Fixes problems identified with -Wfloat-conversion

* core: ui: explicit float casts

Fixes problems identified with -Wfloat-conversion.

* rqt: make float/int casts explicit

Identified with -Wfloat-conversion.

* rosmon_core: env-hooks: follow symbolic links during file name suggestion

This fixes bash completion for colcon linked install spaces.

* core: substitution_python: catch by reference

Fixes a compiler warning on Ubuntu Focal.

* core: ui: display & search full name including namespace

* core: ui: use full name everywhere

* Start all and stop all options are added
F6 -> start all
F7 -> stop all

* core: launch: bytes_parser: add missing include

* Added option --stdout-print-source to print out node name when --disable-ui is used. Addresses xqms#139.

* Removed stdout-print-source option and print node name by default when --disable-ui is used. Right justify node names to the max node name length.

* core: fix compilation on Kinetic (boost::placeholders came later)

* core: monitor: do not leak stderr file descriptors

* core: launch_config: add warning for type= attrs on <param> tags on Kinetic

See xqms#138.

* update warning

* core: launch_config: strip off leading/trailing whitespace of params

* core: add utility to precisely dump ROS parameters

This is useful to analyze differences between roslaunch and rosmon in
parameter loading.

* core: launch_config: use double precision for auto type parameters

Previously we used floats, but XmlRpc stores doubles, so we should
make use of the full precision.

* core: launch_config: convert tabs + newlines in parameters

* core: test: add unit test for all sorts of whitespace in parameters

* core: test: basic.launch: make it work with roslaunch

* core: test: basic.py: adapt to fixed whitespace behavior

* core: fix aliasing problem using std::memcpy

* Resolves xqms#145 by providing a number of restarts threshold per node via ROS-launch arguments

* core: fix signed/unsigned comparison warning

* core: install tests (necessary for testing with colcon)

* core: monitor: use a second PTY for stderr, see xqms#147

* Inidicate when a node is actually Idle (e.g. stopped)

* Add missing dependency on libboost-pyhton-dev

Co-authored-by: Max Schwarz <max.schwarz@ais.uni-bonn.de>
Co-authored-by: Max Schwarz <max.schwarz@online.de>
Co-authored-by: Roger Pi <u1926981@campus.udg.edu>
Co-authored-by: Kazuhiro Hiratsuka <papino0319@gmail.com>
Co-authored-by: marco-tranzatto <marcot@ethz.ch>
Co-authored-by: Carl Colena <carl.colena@gmail.com>
Co-authored-by: Kutay YILMAZ <ktyylmz035@gmail.com>
Co-authored-by: Steve Golton <stevegolton@gmail.com>
Co-authored-by: mcfurry <f.b.f.schoenmakers@gmail.com>
Co-authored-by: Ferry Schoenmakers <ferry.schoenmakers@nobleo.nl>
Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl>
  • Loading branch information
12 people authored Jul 15, 2021
1 parent abdae1f commit 228c7bb
Show file tree
Hide file tree
Showing 49 changed files with 1,350 additions and 276 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ developers.

## Installation & Quick start

Official `rosmon` are available. On ROS Kinetic or Melodic (Ubuntu) simply do:
Official `rosmon` packages are available. On ROS Kinetic or Melodic (Ubuntu) simply do:

sudo apt install ros-${ROSDISTRO}-rosmon
sudo apt install ros-${ROS_DISTRO}-rosmon

In case you don't need the rqt GUI, you can install the core package only:

sudo apt install ros-${ROS_DISTRO}-rosmon-core

Afterwards, try

Expand Down
11 changes: 11 additions & 0 deletions rosmon/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
Changelog for package rosmon
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.2 (2020-05-29)
------------------

2.3.1 (2020-05-28)
------------------

2.3.0 (2020-05-28)
------------------
* Fix Issue "Can not handle arguments with spaces" (PR #110)
* Contributors: Kazuhiro Hiratsuka, Max Schwarz

2.2.1 (2019-11-08)
------------------

Expand Down
2 changes: 1 addition & 1 deletion rosmon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.4)
project(rosmon)

find_package(catkin)
Expand Down
2 changes: 1 addition & 1 deletion rosmon/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
for the roslaunch tool, focused on performance, remote
monitoring, and usability.
</description>
<version>2.2.1</version>
<version>2.3.2</version>
<license>BSD</license>
<author email="max.schwarz@uni-bonn.de">Max Schwarz</author>
<maintainer email="max.schwarz@uni-bonn.de">Max Schwarz</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion rosmon/src/rosmon
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
exec rosrun rosmon_core rosmon $*
exec rosrun rosmon_core rosmon "$@"
31 changes: 31 additions & 0 deletions rosmon_core/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@
Changelog for package rosmon_core
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.2 (2020-05-29)
------------------
* rosmon_core: cmake: increase minimum version to address policy warnings
* rosmon_core: *really* fix search for boost_python for python 3
* Contributors: Max Schwarz

2.3.1 (2020-05-28)
------------------
* Fix build issues on Debian connected to Boost & Python 3
* Contributors: Max Schwarz

2.3.0 (2020-05-28)
------------------
* Optionally filter stdout (INFO/DEBUG, PR #119)
* Capture stderr separately and correctly do output=log (PR #119)
* Prevent infinite coredump aggregation & support systemd-coredump (PR #125)
* Support certain rosmon-* attributes on all scopes (fixes #116)
* ui: UI DrawStatus optimized to only refresh on events (PR #121)
* Adding fix for rosparam parsing to equivilate with undocumented behavior of roslaunch (PR #118)
* depend on python2/3 conditioned on ROS_PYTHON_VERSION (PR #123)
* Add YAML merge key parsing functionality (PR #117)
* test: unit tests for the warnings we trigger
* LaunchConfig warnings to stderr & make them captureable
* rosmon_core: Handle empty yaml file (PR #114)
* Improved support for nodes with terminal UI (PR #112)
* Fix Issue "Can not handle arguments with spaces" (PR #111)
* Option to obey output=XY tags (PR #109)
* fix a lot of whitespace issues introduced in #76
* Handle nesting with $(anon) subst correctly (PR #101)
* Contributors: Carl Colena, Kazuhiro Hiratsuka, Max Schwarz, marco-tranzatto

2.2.1 (2019-11-08)
------------------
* correctly terminate execvp() arguments (issue: #102, PR: #103).
Expand Down
22 changes: 19 additions & 3 deletions rosmon_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.4)
project(rosmon_core)

find_package(catkin REQUIRED COMPONENTS
Expand Down Expand Up @@ -33,7 +33,15 @@ else()
message(WARNING "Please install libpython-dev (or equivalent) for $(eval ...) support")
endif()

find_package(Boost REQUIRED COMPONENTS python REQUIRED)
# Newer boost versions need a specific python version
if(${PYTHON_VERSION_MAJOR} GREATER 2)
set(boost_python_component "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
else()
set(boost_python_component "python")
endif()
message(STATUS "Searching for boost_python with keyword '${boost_python_component}'")

find_package(Boost REQUIRED COMPONENTS ${boost_python_component} REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})

# Specific feature tests
Expand Down Expand Up @@ -112,6 +120,12 @@ endif()
add_executable(abort
src/util/abort.cpp
)
add_executable(dump_param
src/util/dump_param.cpp
)
target_link_libraries(dump_param
${catkin_LIBRARIES}
)

add_executable(abort_really_long_executable
src/util/abort.cpp
Expand Down Expand Up @@ -149,9 +163,11 @@ if(CATKIN_ENABLE_TESTING)
else()
message(WARNING "Install catch_ros to enable XML unit tests")
endif()

install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
endif()

# Version 1.5 (increment this comment to trigger a CMake update)
# Version 1.6 (increment this comment to trigger a CMake update)
catkin_add_env_hooks(50-rosmon
SHELLS bash zsh
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks
Expand Down
4 changes: 2 additions & 2 deletions rosmon_core/env-hooks/50-rosmon.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function mon() {
case $1 in
launch)
shift
rosrun rosmon_core rosmon $*
rosrun rosmon_core rosmon "$@"
;;
esac
}
Expand Down Expand Up @@ -68,7 +68,7 @@ function _mon() {
# If we have no launch file yet, offer launch files
elif [[ ( ! -f $package_name ) && -z $launch_name ]]; then
local package_dir="$(rospack find ${COMP_WORDS[2]})"
local launchfiles=$(find "$package_dir" -name '*.launch' -type f -printf "%f\n")
local launchfiles=$(find -L "$package_dir" -name '*.launch' -type f -printf "%f\n")
COMPREPLY=( $(compgen -W "${launchfiles} ${FLAGS[*]} ${OPTS[*]}" -- $cur) )

# Only arguments now
Expand Down
2 changes: 1 addition & 1 deletion rosmon_core/env-hooks/50-rosmon.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function _launch_file() {
_launch_arg
else
package=${line[2]}
files=("${(@f)$(find $(rospack find ${package}) -name '*.launch' -type f -printf "%f\n")}")
files=("${(@f)$(find -L $(rospack find ${package}) -name '*.launch' -type f -printf "%f\n")}")
if [[ $#files -gt 0 ]]; then
_values 'launch files' $files
fi
Expand Down
13 changes: 8 additions & 5 deletions rosmon_core/package.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<package format="2">
<package format="3">
<name>rosmon_core</name>
<description>
Node launcher and monitor for ROS. rosmon is a replacement
for the roslaunch tool, focused on performance, remote
monitoring, and usability.
</description>
<version>2.2.1</version>
<version>2.3.2</version>
<license>BSD</license>
<author email="max.schwarz@uni-bonn.de">Max Schwarz</author>
<maintainer email="max.schwarz@uni-bonn.de">Max Schwarz</maintainer>

<buildtool_depend>catkin</buildtool_depend>
<depend>boost</depend>
<depend>libboost-python-dev</depend>
<depend>cmake_modules</depend>
<depend>libncurses-dev</depend>
<depend>rosfmt</depend>
Expand All @@ -24,10 +25,12 @@
<depend>tinyxml</depend>
<depend>yaml-cpp</depend>
<depend>diagnostic_msgs</depend>

<build_depend>python</build_depend>

<test_depend>python-rospkg</test_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 2">python</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3</build_depend>

<test_depend condition="$ROS_PYTHON_VERSION == 2">python-rospkg</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 3">python3-rospkg</test_depend>
<test_depend>rostest</test_depend>
<test_depend>catch_ros</test_depend>
</package>
11 changes: 9 additions & 2 deletions rosmon_core/src/diagnostics_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@ void DiagnosticsPublisher::publish(const std::vector<NodeMonitor::Ptr>& state)
}
else
{
if(nodeState->restartCount() > 0)
if (nodeState->state() == NodeMonitor::STATE_IDLE)
{
msg = "node idle ";
}

if(nodeState->numRespawnsAllowed() >= 0 &&
nodeState->restartCount() > static_cast<unsigned int>(nodeState->numRespawnsAllowed()))
{
nodeStatus.level = diagnostic_msgs::DiagnosticStatus::WARN;
msg = "restart count > 0! (" + std::to_string(nodeState->restartCount()) + ")";
msg += "restart count > " + std::to_string(nodeState->numRespawnsAllowed()) +
"! (" + std::to_string(nodeState->restartCount()) + ")";
}

if(nodeState->memory() > nodeState->memoryLimit())
Expand Down
2 changes: 2 additions & 0 deletions rosmon_core/src/launch/bytes_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ifndef ROSMON_LAUNCH_BYTES_PARSER_H
#define ROSMON_LAUNCH_BYTES_PARSER_H

#include <cstdint>
#include <string>
#include <tuple>

namespace rosmon
Expand Down
Loading

0 comments on commit 228c7bb

Please sign in to comment.