[ros-interactive-markers] 01/03: New upstream version 1.11.3

Jochen Sprickerhof jspricke at moszumanska.debian.org
Fri Sep 2 09:13:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

jspricke pushed a commit to annotated tag debian/1.11.3-1
in repository ros-interactive-markers.

commit 1d79df367ab859b400dcf50993d28db82208d2fd
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Fri Sep 2 11:06:12 2016 +0200

    New upstream version 1.11.3
---
 CHANGELOG.rst                                          | 18 ++++++++++++++++++
 CMakeLists.txt                                         | 18 +++++++++---------
 include/interactive_markers/detail/state_machine.h     |  5 +++--
 .../interactive_markers/interactive_marker_server.h    | 10 ++++++++++
 package.xml                                            |  2 +-
 src/interactive_marker_client.cpp                      | 12 ++++++++++--
 src/interactive_marker_server.cpp                      | 12 ++++++++++++
 src/interactive_markers/menu_handler.py                |  4 ++--
 8 files changed, 65 insertions(+), 16 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 1c31b30..f181c4c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,6 +2,24 @@
 Changelog for package interactive_markers
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+1.11.3 (2016-08-24)
+-------------------
+* The ``processFeedback`` function of the menu handler no longer catches the ``KeyErrors`` of the feedback_cb.
+  See: `#29 <https://github.com/ros-visualization/interactive_markers/issues/29>`_
+* Added the ``empty()`` and ``size()`` members to ``InteractiveMarkerServer`` interface.
+  See: `#30 <https://github.com/ros-visualization/interactive_markers/issues/30>`_
+* Contributors: Blake Anderson, Guglielmo Gemignani
+
+1.11.2 (2016-08-24)
+-------------------
+* Fix build when disabling tests with ``-DCATKIN_ENABLE_TESTING=OFF``.
+  See: `#26 <https://github.com/ros-visualization/interactive_markers/issues/26>`_
+* Fix use of uninitialized variables.
+  See: `#24 <https://github.com/ros-visualization/interactive_markers/issues/24>`_
+* Fix potential segfault when shutting down.
+  See: `#25 <https://github.com/ros-visualization/interactive_markers/issues/25>`_
+* Contributors: Alexis Ballier, David Gossow, Max Schwarz
+
 1.11.1 (2014-12-16)
 -------------------
 * Added explicit keyword argument queue_size for publisher in Python code and use the same default queue_size value as C++.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fbb8a9..2d6be3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,14 +55,14 @@ if(GTEST_FOUND)
   target_link_libraries(server_client_test ${PROJECT_NAME} ${GTEST_LIBRARIES})
   add_dependencies(tests server_client_test)
   add_rostest(test/cpp_server_client.test)
-endif()
 
-# Test program to simulate Interactive Marker with missing tf information
-add_executable(bursty_tf EXCLUDE_FROM_ALL src/test/bursty_tf.cpp)
-target_link_libraries(bursty_tf ${PROJECT_NAME})
-add_dependencies(tests bursty_tf)
+  # Test program to simulate Interactive Marker with missing tf information
+  add_executable(bursty_tf EXCLUDE_FROM_ALL src/test/bursty_tf.cpp)
+  target_link_libraries(bursty_tf ${PROJECT_NAME})
+  add_dependencies(tests bursty_tf)
 
-# Test program to simulate Interactive Marker with wrong tf information
-add_executable(missing_tf EXCLUDE_FROM_ALL src/test/missing_tf.cpp)
-target_link_libraries(missing_tf ${PROJECT_NAME})
-add_dependencies(tests missing_tf)
+  # Test program to simulate Interactive Marker with wrong tf information
+  add_executable(missing_tf EXCLUDE_FROM_ALL src/test/missing_tf.cpp)
+  target_link_libraries(missing_tf ${PROJECT_NAME})
+  add_dependencies(tests missing_tf)
+endif()
diff --git a/include/interactive_markers/detail/state_machine.h b/include/interactive_markers/detail/state_machine.h
index 8894249..c8c043d 100644
--- a/include/interactive_markers/detail/state_machine.h
+++ b/include/interactive_markers/detail/state_machine.h
@@ -60,9 +60,10 @@ private:
 
 template<class StateT>
 StateMachine<StateT>::StateMachine( std::string name, StateT init_state )
-: name_(name)
+: state_(init_state)
+, chg_time_(ros::Time::now())
+, name_(name)
 {
-  operator=(init_state);
 };
 
 template<class StateT>
diff --git a/include/interactive_markers/interactive_marker_server.h b/include/interactive_markers/interactive_marker_server.h
index 6a497c3..dea538c 100644
--- a/include/interactive_markers/interactive_marker_server.h
+++ b/include/interactive_markers/interactive_marker_server.h
@@ -109,6 +109,16 @@ public:
   /// Clear all markers.
   /// Note: This change will not take effect until you call applyChanges().
   void clear();
+  
+  /// Return whether the server contains any markers.
+  /// Note: Does not include markers inserted since the last applyChanges().
+  /// @return true if the server contains no markers
+  bool empty() const;
+  
+  /// Return the number of markers contained in the server
+  /// Note: Does not include markers inserted since the last applyChanges().
+  /// @return The number of markers contained in the server
+  std::size_t size() const;
 
   /// Add or replace a callback function for the specified marker.
   /// Note: This change will not take effect until you call applyChanges().
diff --git a/package.xml b/package.xml
index c6089a5..24e0d37 100644
--- a/package.xml
+++ b/package.xml
@@ -5,7 +5,7 @@
   </description>
   <maintainer email="william at osrfoundation.org">William Woodall</maintainer>
   <license>BSD</license>  
-  <version>1.11.1</version>
+  <version>1.11.3</version>
 
   <author>David Gossow</author>
 
diff --git a/src/interactive_marker_client.cpp b/src/interactive_marker_client.cpp
index 224d286..08b97e9 100644
--- a/src/interactive_marker_client.cpp
+++ b/src/interactive_marker_client.cpp
@@ -232,11 +232,19 @@ void InteractiveMarkerClient::update()
     M_SingleClient::iterator it;
     for ( it = publisher_contexts_.begin(); it!=publisher_contexts_.end(); ++it )
     {
-      it->second->update();
-      if ( !it->second->isInitialized() )
+      // Explicitly reference the pointer to the client here, because the client
+      // might call user code, which might call shutdown(), which will delete
+      // the publisher_contexts_ map...
+
+      SingleClientPtr single_client = it->second;
+      single_client->update();
+      if ( !single_client->isInitialized() )
       {
         initialized = false;
       }
+
+      if ( publisher_contexts_.empty() )
+        break; // Yep, someone called shutdown()...
     }
     if ( state_ == INIT && initialized )
     {
diff --git a/src/interactive_marker_server.cpp b/src/interactive_marker_server.cpp
index 0b73abc..b6047c1 100644
--- a/src/interactive_marker_server.cpp
+++ b/src/interactive_marker_server.cpp
@@ -211,6 +211,18 @@ void InteractiveMarkerServer::clear()
 }
 
 
+bool InteractiveMarkerServer::empty() const
+{
+  return marker_contexts_.empty();
+}
+
+
+std::size_t InteractiveMarkerServer::size() const
+{
+  return marker_contexts_.size();
+}
+
+
 bool InteractiveMarkerServer::setPose( const std::string &name, const geometry_msgs::Pose &pose, const std_msgs::Header &header )
 {
   boost::recursive_mutex::scoped_lock lock( mutex_ );
diff --git a/src/interactive_markers/menu_handler.py b/src/interactive_markers/menu_handler.py
index 59e3bad..77a96bc 100644
--- a/src/interactive_markers/menu_handler.py
+++ b/src/interactive_markers/menu_handler.py
@@ -138,9 +138,9 @@ class MenuHandler:
     def processFeedback(self, feedback):
         try:
             context = self.entry_contexts_[feedback.menu_entry_id]
-            context.feedback_cb(feedback)
         except KeyError:
-            pass
+            return
+        context.feedback_cb(feedback)
 
     # Create and push MenuEntry objects from handles_in onto
     # entries_out. Calls itself recursively to add the entire menu tree.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-interactive-markers.git



More information about the debian-science-commits mailing list