50 BaseNodelet::~BaseNodelet()
54 if (enable_tf_ ==
true && enable_tf_dynamic_ ==
true)
56 transform_thread_->join();
69 while (!system_proc_groups_.empty())
71 killpg(system_proc_groups_.front(), SIGHUP);
72 system_proc_groups_.pop();
81 catch(
const std::exception& ex)
94 void BaseNodelet::onInit()
try 100 ROS_ERROR_STREAM(nodelet_name_ <<
" - None of the streams are enabled. Exiting!");
104 while (
false == connectToCamera())
106 ROS_INFO_STREAM(nodelet_name_ <<
" - Sleeping 5 seconds then retrying to connect");
112 std::vector<std::string> dynamic_params = setDynamicReconfServer();
114 setStaticCameraOptions(dynamic_params);
119 if (enable_tf_ ==
true)
121 getCameraExtrinsics();
123 if (enable_tf_dynamic_ ==
true)
130 publishStaticTransforms();
135 startDynamicReconfCallback();
144 catch(
const std::exception & e)
151 ROS_ERROR_STREAM(nodelet_name_ <<
" - Caught unknown exception...shutting down!");
158 void BaseNodelet::getParameters()
161 nh_ = getNodeHandle();
162 pnh_ = getPrivateNodeHandle();
163 pnh_.getParam(
"serial_no", serial_no_);
164 pnh_.getParam(
"usb_port_id", usb_port_id_);
165 pnh_.getParam(
"camera_type", camera_type_);
170 pnh_.param(
"enable_pointcloud", enable_pointcloud_,
ENABLE_PC);
171 pnh_.param(
"enable_tf", enable_tf_,
ENABLE_TF);
174 pnh_.param(
"depth_width", width_[RS_STREAM_DEPTH],
DEPTH_WIDTH);
175 pnh_.param(
"depth_height", height_[RS_STREAM_DEPTH],
DEPTH_HEIGHT);
176 pnh_.param(
"color_width", width_[RS_STREAM_COLOR],
COLOR_WIDTH);
177 pnh_.param(
"color_height", height_[RS_STREAM_COLOR],
COLOR_HEIGHT);
178 pnh_.param(
"depth_fps", fps_[RS_STREAM_DEPTH],
DEPTH_FPS);
179 pnh_.param(
"color_fps", fps_[RS_STREAM_COLOR],
COLOR_FPS);
189 width_[RS_STREAM_INFRARED] = width_[RS_STREAM_DEPTH];
190 height_[RS_STREAM_INFRARED] = height_[RS_STREAM_DEPTH];
191 fps_[RS_STREAM_INFRARED] = fps_[RS_STREAM_DEPTH];
197 bool BaseNodelet::connectToCamera()
210 if (num_of_cameras < 1)
220 std::vector<int> camera_type_index = listCameras(num_of_cameras);
223 if (camera_type_index.size() < 1)
225 ROS_ERROR_STREAM(nodelet_name_ <<
" - No '" << camera_type_ <<
"' cameras detected!");
233 if (serial_no_.empty() && usb_port_id_.empty() && camera_type_index.size() > 1)
236 " - Multiple cameras of same type detected but no input serial_no or usb_port_id specified");
244 rs_device_ =
nullptr;
247 for (
int i : camera_type_index)
257 rs_device_ = rs_detected_device;
263 if (rs_device_ ==
nullptr)
266 string error_msg =
" - Couldn't find camera to connect with ";
267 error_msg +=
"serial_no = " + serial_no_ +
", ";
268 error_msg +=
"usb_port_id = " + usb_port_id_;
279 ROS_INFO_STREAM(nodelet_name_ <<
" - Connecting to camera with Serial No: " <<
289 std::vector<int> BaseNodelet::listCameras(
int num_of_cameras)
292 std::vector<int> camera_type_index;
294 for (
int i = 0; i < num_of_cameras; i++)
296 std::string detected_camera_msg =
" - Detected the following camera:";
297 std::string warning_msg =
" - Detected unvalidated firmware:";
313 if (camera_name.find(camera_type_) != std::string::npos)
315 camera_type_index.push_back(i);
318 detected_camera_msg = detected_camera_msg +
319 "\n\t\t\t\t- Serial No: " + camera_serial_number +
", USB Port ID: " +
321 ", Name: " + camera_name +
322 ", Camera FW: " + camera_fw;
325 std::string camera_warning_msg = checkFirmwareValidation(
"camera", camera_fw, camera_name, camera_serial_number);
327 if (!camera_warning_msg.empty())
329 warning_msg = warning_msg +
"\n\t\t\t\t- " + camera_warning_msg;
337 detected_camera_msg = detected_camera_msg +
", Adapter FW: " + adapter_fw;
338 std::string adapter_warning_msg = checkFirmwareValidation(
"adapter", adapter_fw, camera_name,
339 camera_serial_number);
340 if (!adapter_warning_msg.empty())
342 warning_msg = warning_msg +
"\n\t\t\t\t- " + adapter_warning_msg;
351 detected_camera_msg = detected_camera_msg +
", Motion Module FW: " + motion_module_fw;
352 std::string motion_module_warning_msg = checkFirmwareValidation(
"motion_module", motion_module_fw, camera_name,
353 camera_serial_number);
354 if (!motion_module_warning_msg.empty())
356 warning_msg = warning_msg +
"\n\t\t\t\t- " + motion_module_warning_msg;
360 if (warning_msg !=
" - Detected unvalidated firmware:")
366 return camera_type_index;
372 void BaseNodelet::advertiseTopics()
381 pointcloud_publisher_ = depth_nh.
advertise<sensor_msgs::PointCloud2>(
PC_TOPIC, 1);
391 void BaseNodelet::advertiseServices()
394 &BaseNodelet::getCameraOptionValues,
this);
396 &BaseNodelet::setPowerCameraService,
this);
398 &BaseNodelet::forcePowerCameraService,
this);
400 &BaseNodelet::isPoweredCameraService,
this);
406 bool BaseNodelet::getCameraOptionValues(realsense_camera::CameraConfiguration::Request & req,
407 realsense_camera::CameraConfiguration::Response &
res)
409 std::string get_options_result_str;
410 std::string opt_name, opt_value;
415 std::transform(opt_name.begin(), opt_name.end(), opt_name.begin(), ::tolower);
417 opt_value = boost::lexical_cast<std::string>(o.value);
418 get_options_result_str += opt_name +
":" + opt_value +
";";
421 res.configuration_str = get_options_result_str;
428 bool BaseNodelet::checkForSubscriber()
432 if (camera_publisher_[
index].getNumSubscribers() > 0)
437 if (pointcloud_publisher_.getNumSubscribers() > 0)
447 bool BaseNodelet::isPoweredCameraService(realsense_camera::IsPowered::Request & req,
448 realsense_camera::IsPowered::Response &
res)
452 res.is_powered =
true;
456 res.is_powered =
false;
464 bool BaseNodelet::setPowerCameraService(realsense_camera::SetPower::Request & req,
465 realsense_camera::SetPower::Response &
res)
469 if (req.power_on ==
true)
471 start_camera_ =
true;
472 start_stop_srv_called_ =
true;
482 if (checkForSubscriber() ==
false)
484 start_camera_ =
false;
485 start_stop_srv_called_ =
true;
489 ROS_INFO_STREAM(nodelet_name_ <<
" - Cannot stop the camera. Nodelet has subscriber.");
500 bool BaseNodelet::forcePowerCameraService(realsense_camera::ForcePower::Request & req,
501 realsense_camera::ForcePower::Response &
res)
503 start_camera_ = req.power_on;
504 start_stop_srv_called_ =
true;
512 void BaseNodelet::getCameraOptions()
526 camera_options_.push_back(o);
535 void BaseNodelet::setStaticCameraOptions(std::vector<std::string> dynamic_params)
545 for (std::string param_name : dynamic_params)
547 std::transform(opt_name.begin(), opt_name.end(), opt_name.begin(), ::tolower);
548 if (opt_name.compare(param_name) == 0)
560 if (pnh_.searchParam(opt_name, key))
563 pnh_.getParam(key, val);
570 else if (val > o.max)
578 ROS_INFO_STREAM(nodelet_name_ <<
" - Setting camera option " << opt_name <<
" = " << opt_val);
589 void BaseNodelet::setFrameCallbacks()
591 depth_frame_handler_ = [&](
rs::frame frame)
595 if (enable_pointcloud_ ==
true)
601 color_frame_handler_ = [&](
rs::frame frame)
630 void BaseNodelet::setStreams()
635 if (enable_[
stream] ==
true)
637 enableStream(static_cast<rs_stream>(
stream), width_[
stream], height_[stream], format_[stream], fps_[stream]);
639 else if (enable_[
stream] ==
false)
641 disableStream(static_cast<rs_stream>(
stream));
653 if (mode_.compare(
"manual") == 0)
666 if (camera_info_ptr_[stream_index] == NULL)
669 getStreamCalibData(stream_index);
670 step_[stream_index] = camera_info_ptr_[stream_index]->width * unit_step_size_[stream_index];
671 image_[stream_index] = cv::Mat(camera_info_ptr_[stream_index]->height,
672 camera_info_ptr_[stream_index]->width, cv_type_[stream_index], cv::Scalar(0, 0, 0));
674 ts_[stream_index] = -1;
680 void BaseNodelet::getStreamCalibData(
rs_stream stream_index)
695 ROS_ERROR_STREAM(nodelet_name_ <<
" - Verify camera firmware version and/or calibration data!");
699 sensor_msgs::CameraInfo *
camera_info =
new sensor_msgs::CameraInfo();
700 camera_info_ptr_[stream_index] = sensor_msgs::CameraInfoPtr(camera_info);
702 camera_info->header.frame_id = optical_frame_id_[stream_index];
703 camera_info->width = intrinsic.
width;
704 camera_info->height = intrinsic.
height;
706 camera_info->K.at(0) = intrinsic.
fx;
707 camera_info->K.at(2) = intrinsic.
ppx;
708 camera_info->K.at(4) = intrinsic.
fy;
709 camera_info->K.at(5) = intrinsic.
ppy;
710 camera_info->K.at(8) = 1;
712 camera_info->P.at(0) = camera_info->K.at(0);
713 camera_info->P.at(1) = 0;
714 camera_info->P.at(2) = camera_info->K.at(2);
715 camera_info->P.at(3) = 0;
717 camera_info->P.at(4) = 0;
718 camera_info->P.at(5) = camera_info->K.at(4);
719 camera_info->P.at(6) = camera_info->K.at(5);
720 camera_info->P.at(7) = 0;
722 camera_info->P.at(8) = 0;
723 camera_info->P.at(9) = 0;
724 camera_info->P.at(10) = 1;
725 camera_info->P.at(11) = 0;
739 camera_info->P.at(11) = z_extrinsic.
translation[2];
742 camera_info->distortion_model =
"plumb_bob";
745 camera_info->R.at(0) = 1.0;
746 camera_info->R.at(1) = 0.0;
747 camera_info->R.at(2) = 0.0;
748 camera_info->R.at(3) = 0.0;
749 camera_info->R.at(4) = 1.0;
750 camera_info->R.at(5) = 0.0;
751 camera_info->R.at(6) = 0.0;
752 camera_info->R.at(7) = 0.0;
753 camera_info->R.at(8) = 1.0;
755 for (
int i = 0; i < 5; i++)
757 camera_info->D.push_back(intrinsic.
coeffs[i]);
777 std::string BaseNodelet::startCamera()
786 rs_device_->start(rs_source_);
788 catch (std::runtime_error & e)
790 ROS_ERROR_STREAM(nodelet_name_ <<
" - Couldn't start camera -- " << e.what());
794 return "Camera Started Successfully";
796 return "Camera is already Started";
802 std::string BaseNodelet::stopCamera()
809 rs_device_->stop(rs_source_);
811 catch (std::runtime_error & e)
813 ROS_ERROR_STREAM(nodelet_name_ <<
" - Couldn't stop camera -- " << e.what());
816 return "Camera Stopped Successfully";
818 return "Camera is already Stopped";
830 image_depth16_ =
reinterpret_cast<const uint16_t *
>(frame.
get_data());
834 image_[stream_index].data = (
unsigned char *) image_depth16_;
838 cvWrapper_ = cv::Mat(image_[stream_index].
size(), cv_type_[stream_index],
839 const_cast<void *>(reinterpret_cast<const void *>(image_depth16_)), step_[stream_index]);
840 cvWrapper_.convertTo(image_[stream_index], cv_type_[stream_index],
841 static_cast<double>(depth_scale_meters) / static_cast<double>(
MILLIMETER_METERS));
846 image_[stream_index].data = (
unsigned char *) (frame.
get_data());
853 void BaseNodelet::setDepthEnable(
bool &enable_depth)
856 if (enable_depth ==
false)
860 ROS_INFO_STREAM(nodelet_name_ <<
" - Color stream is also disabled. Cannot disable depth stream");
888 std::unique_lock<std::mutex> lock(frame_mutex_[stream_index]);
891 if (ts_[stream_index] != frame_ts)
893 setImageData(stream_index, frame);
895 if (camera_publisher_[stream_index].getNumSubscribers() > 0)
898 encoding_[stream_index],
900 msg->header.frame_id = optical_frame_id_[stream_index];
902 msg->header.stamp =
getTimestamp(stream_index, frame_ts);
903 msg->width = image_[stream_index].cols;
904 msg->height = image_[stream_index].rows;
905 msg->is_bigendian =
false;
906 msg->step = step_[stream_index];
907 camera_info_ptr_[stream_index]->header.stamp = msg->header.stamp;
908 camera_publisher_[stream_index].publish(msg, camera_info_ptr_[stream_index]);
911 ts_[stream_index] = frame_ts;
920 catch(
const std::exception & e)
927 ROS_ERROR_STREAM(nodelet_name_ <<
" - Caught unknown exception...shutting down!");
934 void BaseNodelet::publishPCTopic()
956 sensor_msgs::PointCloud2 msg_pointcloud;
960 msg_pointcloud.is_dense =
true;
965 sensor_msgs::PointField::FLOAT32,
"y", 1,
966 sensor_msgs::PointField::FLOAT32,
"z", 1,
967 sensor_msgs::PointField::FLOAT32,
"rgb", 1,
968 sensor_msgs::PointField::FLOAT32);
980 float depth_point[3], color_point[3], color_pixel[2], scaled_depth;
981 unsigned char *color_data = image_color.data;
986 for (
int y = 0;
y < z_intrinsic.
height;
y++)
988 for (
int x = 0;
x < z_intrinsic.
width;
x++)
990 scaled_depth =
static_cast<float>(*image_depth16_) * depth_scale_meters;
991 float depth_pixel[2] = {
static_cast<float>(
x), static_cast<float>(
y)};
992 rs_deproject_pixel_to_point(depth_point, &z_intrinsic, depth_pixel, scaled_depth);
994 if (depth_point[2] <= 0.0
f || depth_point[2] > max_z_)
996 depth_point[0] = 0.0f;
997 depth_point[1] = 0.0f;
998 depth_point[2] = 0.0f;
1001 *iter_x = depth_point[0];
1002 *iter_y = depth_point[1];
1003 *iter_z = depth_point[2];
1006 *iter_r =
static_cast<uint8_t
>(255);
1007 *iter_g =
static_cast<uint8_t
>(255);
1008 *iter_b =
static_cast<uint8_t
>(255);
1012 rs_transform_point_to_point(color_point, &z_extrinsic, depth_point);
1013 rs_project_point_to_pixel(color_pixel, &color_intrinsic, color_point);
1015 if (color_pixel[1] < 0.0
f || color_pixel[1] >= image_color.rows
1016 || color_pixel[0] < 0.0f || color_pixel[0] >= image_color.cols)
1020 *iter_r =
static_cast<uint8_t
>(96);
1021 *iter_g =
static_cast<uint8_t
>(157);
1022 *iter_b =
static_cast<uint8_t
>(198);
1026 int i =
static_cast<int>(color_pixel[0]);
1027 int j =
static_cast<int>(color_pixel[1]);
1029 *iter_r =
static_cast<uint8_t
>(color_data[i * 3 + j * image_color.cols * 3]);
1030 *iter_g =
static_cast<uint8_t
>(color_data[i * 3 + j * image_color.cols * 3 + 1]);
1031 *iter_b =
static_cast<uint8_t
>(color_data[i * 3 + j * image_color.cols * 3 + 2]);
1036 ++iter_x; ++iter_y; ++iter_z; ++iter_r; ++iter_g; ++iter_b;
1041 pointcloud_publisher_.publish(msg_pointcloud);
1048 void BaseNodelet::getCameraExtrinsics()
1070 void BaseNodelet::publishStaticTransforms()
1073 ROS_INFO_STREAM(nodelet_name_ <<
" - Publishing camera transforms (/tf_static)");
1078 geometry_msgs::TransformStamped b2d_msg;
1079 geometry_msgs::TransformStamped d2do_msg;
1080 geometry_msgs::TransformStamped b2c_msg;
1081 geometry_msgs::TransformStamped c2co_msg;
1082 geometry_msgs::TransformStamped b2i_msg;
1083 geometry_msgs::TransformStamped i2io_msg;
1090 b2c_msg.header.stamp = transform_ts_;
1091 b2c_msg.header.frame_id = base_frame_id_;
1093 b2c_msg.transform.translation.x = 0;
1094 b2c_msg.transform.translation.y = 0;
1095 b2c_msg.transform.translation.z = 0;
1096 b2c_msg.transform.rotation.x = 0;
1097 b2c_msg.transform.rotation.y = 0;
1098 b2c_msg.transform.rotation.z = 0;
1099 b2c_msg.transform.rotation.w = 1;
1100 static_tf_broadcaster_.sendTransform(b2c_msg);
1103 q_c2co.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1104 c2co_msg.header.stamp = transform_ts_;
1107 c2co_msg.transform.translation.x = 0;
1108 c2co_msg.transform.translation.y = 0;
1109 c2co_msg.transform.translation.z = 0;
1110 c2co_msg.transform.rotation.x = q_c2co.getX();
1111 c2co_msg.transform.rotation.y = q_c2co.getY();
1112 c2co_msg.transform.rotation.z = q_c2co.getZ();
1113 c2co_msg.transform.rotation.w = q_c2co.
getW();
1114 static_tf_broadcaster_.sendTransform(c2co_msg);
1117 b2d_msg.header.stamp = transform_ts_;
1118 b2d_msg.header.frame_id = base_frame_id_;
1120 b2d_msg.transform.translation.x = color2depth_extrinsic_.translation[2];
1121 b2d_msg.transform.translation.y = -color2depth_extrinsic_.translation[0];
1122 b2d_msg.transform.translation.z = -color2depth_extrinsic_.translation[1];
1123 b2d_msg.transform.rotation.x = 0;
1124 b2d_msg.transform.rotation.y = 0;
1125 b2d_msg.transform.rotation.z = 0;
1126 b2d_msg.transform.rotation.w = 1;
1127 static_tf_broadcaster_.sendTransform(b2d_msg);
1130 q_d2do.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1131 d2do_msg.header.stamp = transform_ts_;
1134 d2do_msg.transform.translation.x = 0;
1135 d2do_msg.transform.translation.y = 0;
1136 d2do_msg.transform.translation.z = 0;
1137 d2do_msg.transform.rotation.x = q_d2do.getX();
1138 d2do_msg.transform.rotation.y = q_d2do.getY();
1139 d2do_msg.transform.rotation.z = q_d2do.getZ();
1140 d2do_msg.transform.rotation.w = q_d2do.
getW();
1141 static_tf_broadcaster_.sendTransform(d2do_msg);
1144 b2i_msg.header.stamp = transform_ts_;
1145 b2i_msg.header.frame_id = base_frame_id_;
1147 b2i_msg.transform.translation.x = color2ir_extrinsic_.translation[2];
1148 b2i_msg.transform.translation.y = -color2ir_extrinsic_.translation[0];
1149 b2i_msg.transform.translation.z = -color2ir_extrinsic_.translation[1];
1150 b2i_msg.transform.rotation.x = 0;
1151 b2i_msg.transform.rotation.y = 0;
1152 b2i_msg.transform.rotation.z = 0;
1153 b2i_msg.transform.rotation.w = 1;
1154 static_tf_broadcaster_.sendTransform(b2i_msg);
1157 q_i2io.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1158 i2io_msg.header.stamp = transform_ts_;
1161 i2io_msg.transform.translation.x = 0;
1162 i2io_msg.transform.translation.y = 0;
1163 i2io_msg.transform.translation.z = 0;
1164 i2io_msg.transform.rotation.x = q_i2io.getX();
1165 i2io_msg.transform.rotation.y = q_i2io.getY();
1166 i2io_msg.transform.rotation.z = q_i2io.getZ();
1167 i2io_msg.transform.rotation.w = q_i2io.
getW();
1168 static_tf_broadcaster_.sendTransform(i2io_msg);
1174 void BaseNodelet::publishDynamicTransforms()
1188 q.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1191 frame_id_[RS_STREAM_COLOR], optical_frame_id_[RS_STREAM_COLOR]));
1195 color2depth_extrinsic_.translation[2],
1196 -color2depth_extrinsic_.translation[0],
1197 -color2depth_extrinsic_.translation[1]));
1204 q.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1207 frame_id_[RS_STREAM_DEPTH], optical_frame_id_[RS_STREAM_DEPTH]));
1211 color2ir_extrinsic_.translation[2],
1212 -color2ir_extrinsic_.translation[0],
1213 -color2ir_extrinsic_.translation[1]));
1220 q.
setRPY(-M_PI/2, 0.0, -M_PI/2);
1223 frame_id_[RS_STREAM_INFRARED], optical_frame_id_[RS_STREAM_INFRARED]));
1229 void BaseNodelet::prepareTransforms()
1232 ROS_INFO_STREAM(nodelet_name_ <<
" - Publishing camera transforms (/tf)");
1234 ros::Rate loop_rate(tf_publication_rate_);
1241 publishDynamicTransforms();
1250 void BaseNodelet::checkError()
1262 void BaseNodelet::wrappedSystem(
const std::vector<std::string>& string_argv)
1267 char * argv[string_argv.size() + 1];
1269 for (
size_t i = 0; i < string_argv.size(); ++i)
1271 argv[i] =
const_cast<char*
>(string_argv[i].c_str());
1273 argv[string_argv.size()] = NULL;
1280 " - Failed to fork system command:" 1281 << boost::algorithm::join(string_argv,
" ")
1282 << strerror(errno));
1287 setpgid(getpid(), getpid());
1292 execvpe(argv[0], argv, environ);
1294 _exit(EXIT_FAILURE);
1299 system_proc_groups_.push(pid);
1302 if (system_proc_groups_.size() > 10)
1304 killpg(system_proc_groups_.front(), SIGHUP);
1305 system_proc_groups_.pop();
1311 std::string BaseNodelet::checkFirmwareValidation(
const std::string& fw_type,
1312 const std::string& current_fw,
1313 const std::string& camera_name,
1314 const std::string& camera_serial_number)
1318 std::cout << elem.first <<
" ; " << elem.second << std::endl;
1321 std::string warning_msg =
"";
1322 std::string cam_name = camera_name +
"_" + fw_type;
1323 auto it = CAMERA_NAME_TO_VALIDATED_FIRMWARE.find(cam_name);
1324 if (it == CAMERA_NAME_TO_VALIDATED_FIRMWARE.end())
1326 warning_msg =
"Camera " + cam_name +
" not found!";
1330 std::string validated_firmware = it->second;
1331 if (current_fw != validated_firmware)
1333 warning_msg = camera_serial_number +
"'s current " + fw_type +
" firmware is " + current_fw +
1334 ", Validated " + fw_type +
" firmware is " + validated_firmware;
const std::string PC_TOPIC
const std::string DEFAULT_IR_FRAME_ID
void rs_set_device_option(rs_device *device, rs_option option, double value, rs_error **error)
const std::string DEFAULT_DEPTH_FRAME_ID
RS_CAPABILITIES_MOTION_EVENTS
const std::string & get_failed_args() const
const bool ENABLE_TF_DYNAMIC
const std::string COLOR_NAMESPACE
const char * rs_get_device_info(const rs_device *device, rs_camera_info info, rs_error **error)
GLint GLint GLsizei GLsizei height
const float MILLIMETER_METERS
GLint GLint GLint GLint GLint GLint y
const std::string DEFAULT_COLOR_FRAME_ID
void rs_set_frame_callback_cpp(rs_device *device, rs_stream stream, rs_frame_callback *callback, rs_error **error)
RS_CAPABILITIES_ADAPTER_BOARD
const std::string STREAM_DESC[STREAM_COUNT]
const std::string CAMERA_IS_POWERED_SERVICE
PLUGINLIB_EXPORT_CLASS(depth_image_proc::ConvertMetricNodelet, nodelet::Nodelet)
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
std::string getName(void *handle)
const std::string DEFAULT_IR_OPTICAL_FRAME_ID
const char * rs_option_to_string(rs_option option)
void setPointCloud2Fields(int n_fields,...)
TFSIMD_FORCE_INLINE const tfScalar & getW() const
const int MAP_START_VALUES_SIZE
void rs_get_device_option_range(rs_device *device, rs_option option, double *min, double *max, double *step, rs_error **error)
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
const char * rs_get_error_message(const rs_error *error)
CameraPublisher advertiseCamera(const std::string &base_topic, uint32_t queue_size, bool latch=false)
const std::string DEFAULT_COLOR_OPTICAL_FRAME_ID
void setRPY(const tfScalar &roll, const tfScalar &pitch, const tfScalar &yaw)
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
const void * get_data() const
const std::string IR_TOPIC
double rs_get_device_option(rs_device *device, rs_option option, rs_error **error)
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
ROSCPP_DECL bool isShuttingDown()
const std::string COLOR_TOPIC
const std::string DEFAULT_BASE_FRAME_ID
RS_CAMERA_INFO_MOTION_MODULE_FIRMWARE_VERSION
const char * rs_get_device_firmware_version(const rs_device *device, rs_error **error)
void rs_free_error(rs_error *error)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
const char * rs_get_device_usb_port_id(const rs_device *device, rs_error **error)
void rs_get_device_extrinsics(const rs_device *device, rs_stream from, rs_stream to, rs_extrinsics *extrin, rs_error **error)
#define ROS_WARN_STREAM(args)
const double TF_PUBLICATION_RATE
int rs_get_device_count(const rs_context *context, rs_error **error)
const std::string DEPTH_TOPIC
RS_STREAM_RECTIFIED_COLOR
const std::string DEFAULT_DEPTH_OPTICAL_FRAME_ID
const std::string DEPTH_NAMESPACE
int rs_supports(rs_device *device, rs_capabilities capability, rs_error **error)
const char * rs_get_device_name(const rs_device *device, rs_error **error)
int rs_device_supports_option(const rs_device *device, rs_option option, rs_error **error)
#define ROS_INFO_STREAM(args)
GLint GLint GLsizei width
const char * rs_get_failed_args(const rs_error *error)
const std::string IR_NAMESPACE
double get_timestamp() const
void rs_get_stream_intrinsics(const rs_device *device, rs_stream stream, rs_intrinsics *intrin, rs_error **error)
const std::string CAMERA_FORCE_POWER_SERVICE
void rs_enable_stream_preset(rs_device *device, rs_stream stream, rs_preset preset, rs_error **error)
const ros::Time & getTimestamp(const T &t)
GLdouble GLdouble GLdouble GLdouble q
ROSCPP_DECL void shutdown()
int rs_is_device_streaming(const rs_device *device, rs_error **error)
const std::string CAMERA_SET_POWER_SERVICE
#define ROS_ERROR_STREAM(args)
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
const std::string SETTINGS_SERVICE
void setPointCloud2FieldsByString(int n_fields,...)
const std::string & get_failed_function() const
const std::map< std::string, std::string > CAMERA_NAME_TO_VALIDATED_FIRMWARE(MAP_START_VALUES, MAP_START_VALUES+MAP_START_VALUES_SIZE)
GLint GLint GLint GLint GLint x
sensor_msgs::ImagePtr toImageMsg() const
const std::string DEFAULT_MODE
void rs_delete_context(rs_context *context, rs_error **error)
const stringpair MAP_START_VALUES[]
const char * rs_get_failed_function(const rs_error *error)
void rs_enable_stream(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
rs_context * rs_create_context(int api_version, rs_error **error)
RS_CAMERA_INFO_ADAPTER_BOARD_FIRMWARE_VERSION