New upstream version 1.11.4
Jochen Sprickerhof
5 years ago
0 | language: cpp | |
1 | compiler: | |
2 | - gcc | |
3 | - clang | |
4 | install: | |
5 | - export CI_ROS_DISTRO=hydro | |
6 | - echo $CI_ROS_DISTRO | |
7 | # Add ROS repositories | |
8 | - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' | |
9 | - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | |
10 | - sudo apt-get update | |
11 | # Install and initialize rosdep | |
12 | - sudo apt-get install python-rosdep | |
13 | - sudo `which rosdep` init | |
14 | - rosdep update | |
15 | # Use rosdep to install rviz's dependencies | |
16 | - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO | |
17 | script: | |
18 | - source /opt/ros/$CI_ROS_DISTRO/setup.bash | |
19 | - mkdir build | |
20 | - cd build | |
21 | - cmake .. -DCMAKE_INSTALL_PREFIX=./install | |
22 | - make -j1 | |
23 | - make -j1 run_tests | |
24 | - catkin_test_results . | |
25 | - make -j1 install | |
26 | notifications: | |
27 | email: false |
0 | 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1 | 1 | Changelog for package interactive_markers |
2 | 2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
3 | ||
4 | 1.11.4 (2018-04-16) | |
5 | ------------------- | |
6 | * Fixed a crash when updates arrive, or are being processed, while shutdown is called (`#36 <https://github.com/ros-visualization/interactive_markers/issues/36>`_) | |
7 | * Contributors: Simon Schmeisser | |
3 | 8 | |
4 | 9 | 1.11.3 (2016-08-24) |
5 | 10 | ------------------- |
37 | 37 | |
38 | 38 | # C++ Unit Tests |
39 | 39 | # |
40 | if(GTEST_FOUND) | |
40 | if(CATKIN_ENABLE_TESTING) | |
41 | 41 | include_directories(${GTEST_INCLUDE_DIRS}) |
42 | 42 | |
43 | 43 | add_executable(server_test EXCLUDE_FROM_ALL src/test/server_test.cpp) |
32 | 32 | #define INTERACTIVE_MARKER_CLIENT |
33 | 33 | |
34 | 34 | #include <boost/shared_ptr.hpp> |
35 | #include <boost/thread/mutex.hpp> | |
35 | 36 | #include <boost/function.hpp> |
36 | 37 | #include <boost/unordered_map.hpp> |
37 | 38 | |
149 | 150 | typedef boost::shared_ptr<SingleClient> SingleClientPtr; |
150 | 151 | typedef boost::unordered_map<std::string, SingleClientPtr> M_SingleClient; |
151 | 152 | M_SingleClient publisher_contexts_; |
153 | boost::mutex publisher_contexts_mutex_; | |
152 | 154 | |
153 | 155 | tf::Transformer& tf_; |
154 | 156 | std::string target_frame_; |
4 | 4 | </description> |
5 | 5 | <maintainer email="william@osrfoundation.org">William Woodall</maintainer> |
6 | 6 | <license>BSD</license> |
7 | <version>1.11.3</version> | |
7 | <version>1.11.4</version> | |
8 | 8 | |
9 | 9 | <author>David Gossow</author> |
10 | 10 |
119 | 119 | |
120 | 120 | case INIT: |
121 | 121 | case RUNNING: |
122 | publisher_contexts_.clear(); | |
123 | 122 | init_sub_.shutdown(); |
124 | 123 | update_sub_.shutdown(); |
124 | boost::lock_guard<boost::mutex> lock(publisher_contexts_mutex_); | |
125 | publisher_contexts_.clear(); | |
125 | 126 | last_num_publishers_=0; |
126 | 127 | state_=IDLE; |
127 | 128 | break; |
175 | 176 | return; |
176 | 177 | } |
177 | 178 | |
178 | M_SingleClient::iterator context_it = publisher_contexts_.find(msg->server_id); | |
179 | ||
180 | // If we haven't seen this publisher before, we need to reset the | |
181 | // display and listen to the init topic, plus of course add this | |
182 | // publisher to our list. | |
183 | if ( context_it == publisher_contexts_.end() ) | |
184 | { | |
185 | DBG_MSG( "New publisher detected: %s", msg->server_id.c_str() ); | |
186 | ||
187 | SingleClientPtr pc(new SingleClient( msg->server_id, tf_, target_frame_, callbacks_ )); | |
188 | context_it = publisher_contexts_.insert( std::make_pair(msg->server_id,pc) ).first; | |
189 | ||
190 | // we need to subscribe to the init topic again | |
191 | subscribeInit(); | |
179 | SingleClientPtr client; | |
180 | { | |
181 | boost::lock_guard<boost::mutex> lock(publisher_contexts_mutex_); | |
182 | ||
183 | M_SingleClient::iterator context_it = publisher_contexts_.find(msg->server_id); | |
184 | ||
185 | // If we haven't seen this publisher before, we need to reset the | |
186 | // display and listen to the init topic, plus of course add this | |
187 | // publisher to our list. | |
188 | if ( context_it == publisher_contexts_.end() ) | |
189 | { | |
190 | DBG_MSG( "New publisher detected: %s", msg->server_id.c_str() ); | |
191 | ||
192 | SingleClientPtr pc(new SingleClient( msg->server_id, tf_, target_frame_, callbacks_ )); | |
193 | context_it = publisher_contexts_.insert( std::make_pair(msg->server_id,pc) ).first; | |
194 | client = pc; | |
195 | ||
196 | // we need to subscribe to the init topic again | |
197 | subscribeInit(); | |
198 | } | |
199 | ||
200 | client = context_it->second; | |
192 | 201 | } |
193 | 202 | |
194 | 203 | // forward init/update to respective context |
195 | context_it->second->process( msg, enable_autocomplete_transparency_ ); | |
204 | client->process( msg, enable_autocomplete_transparency_ ); | |
196 | 205 | } |
197 | 206 | |
198 | 207 | void InteractiveMarkerClient::processInit( const InitConstPtr& msg ) |
228 | 237 | |
229 | 238 | // check if all single clients are finished with the init channels |
230 | 239 | bool initialized = true; |
240 | boost::lock_guard<boost::mutex> lock(publisher_contexts_mutex_); | |
231 | 241 | M_SingleClient::iterator it; |
232 | 242 | for ( it = publisher_contexts_.begin(); it!=publisher_contexts_.end(); ++it ) |
233 | 243 | { |
148 | 148 | |
149 | 149 | int_marker.header.frame_id=msg.frame_id; |
150 | 150 | int_marker.header.stamp=msg.stamp; |
151 | int_marker.pose.orientation.w = 1.0; | |
151 | 152 | |
152 | 153 | std::ostringstream s; |
153 | 154 | s << i; |
228 | 229 | stf.frame_id_=msg.frame_id; |
229 | 230 | stf.child_frame_id_=target_frame; |
230 | 231 | stf.stamp_=msg.stamp; |
232 | stf.setIdentity(); | |
231 | 233 | tf.setTransform( stf, msg.server_id ); |
232 | 234 | break; |
233 | 235 | } |