Codebase list ros-interactive-markers / 492b941
New upstream version 1.11.4 Jochen Sprickerhof 5 years ago
7 changed file(s) with 37 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
+0
-28
.travis.yml less more
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
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package interactive_markers
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
38
49 1.11.3 (2016-08-24)
510 -------------------
3737
3838 # C++ Unit Tests
3939 #
40 if(GTEST_FOUND)
40 if(CATKIN_ENABLE_TESTING)
4141 include_directories(${GTEST_INCLUDE_DIRS})
4242
4343 add_executable(server_test EXCLUDE_FROM_ALL src/test/server_test.cpp)
3232 #define INTERACTIVE_MARKER_CLIENT
3333
3434 #include <boost/shared_ptr.hpp>
35 #include <boost/thread/mutex.hpp>
3536 #include <boost/function.hpp>
3637 #include <boost/unordered_map.hpp>
3738
149150 typedef boost::shared_ptr<SingleClient> SingleClientPtr;
150151 typedef boost::unordered_map<std::string, SingleClientPtr> M_SingleClient;
151152 M_SingleClient publisher_contexts_;
153 boost::mutex publisher_contexts_mutex_;
152154
153155 tf::Transformer& tf_;
154156 std::string target_frame_;
44 </description>
55 <maintainer email="william@osrfoundation.org">William Woodall</maintainer>
66 <license>BSD</license>
7 <version>1.11.3</version>
7 <version>1.11.4</version>
88
99 <author>David Gossow</author>
1010
119119
120120 case INIT:
121121 case RUNNING:
122 publisher_contexts_.clear();
123122 init_sub_.shutdown();
124123 update_sub_.shutdown();
124 boost::lock_guard<boost::mutex> lock(publisher_contexts_mutex_);
125 publisher_contexts_.clear();
125126 last_num_publishers_=0;
126127 state_=IDLE;
127128 break;
175176 return;
176177 }
177178
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;
192201 }
193202
194203 // forward init/update to respective context
195 context_it->second->process( msg, enable_autocomplete_transparency_ );
204 client->process( msg, enable_autocomplete_transparency_ );
196205 }
197206
198207 void InteractiveMarkerClient::processInit( const InitConstPtr& msg )
228237
229238 // check if all single clients are finished with the init channels
230239 bool initialized = true;
240 boost::lock_guard<boost::mutex> lock(publisher_contexts_mutex_);
231241 M_SingleClient::iterator it;
232242 for ( it = publisher_contexts_.begin(); it!=publisher_contexts_.end(); ++it )
233243 {
148148
149149 int_marker.header.frame_id=msg.frame_id;
150150 int_marker.header.stamp=msg.stamp;
151 int_marker.pose.orientation.w = 1.0;
151152
152153 std::ostringstream s;
153154 s << i;
228229 stf.frame_id_=msg.frame_id;
229230 stf.child_frame_id_=target_frame;
230231 stf.stamp_=msg.stamp;
232 stf.setIdentity();
231233 tf.setTransform( stf, msg.server_id );
232234 break;
233235 }