6 #include <boost/interprocess/sync/scoped_lock.hpp>
8 #include <ros/console.h>
9 #include <ros/node_handle.h>
10 #include <ros/publisher.h>
13 #include <std_msgs/String.h>
15 namespace ipc = boost::interprocess;
52 ROS_ERROR_NAMED(
"ServerSHM",
"rgbd::SharedMemServer is not initialized");
97 const sensor_msgs::CameraInfo& cam_info = image.
getCameraModel().cameraInfo();
133 ROS_DEBUG_NAMED(
"ServerSHM",
"ServerSHM::checkSHMThreadFunc");
134 ros::Rate r(frequency);
137 ROS_DEBUG_STREAM_NAMED(
"ServerSHM",
"ServerSHM::checkSHMThreadFunc: checking shm on: " <<
shared_mem_name_);
142 catch (ipc::interprocess_exception &ex)
144 ROS_FATAL_STREAM_NAMED(
"ServerSHM",
"ServerSHM::checkSHMThreadFunc: SHM on '" <<
shared_mem_name_ <<
"' is corrupted: '" << ex.what() <<
"'");
149 ROS_DEBUG_NAMED(
"ServerSHM",
"ServerSHM::checkSHMThreadFunc done");
156 ros::Publisher pub_shm_hostname = nh.advertise<std_msgs::String>(server_name +
"/hosts", 1);
157 ros::WallRate r(frequency);
158 std_msgs::String msg;
162 pub_shm_hostname.publish(msg);