camera.cpp
Go to the documentation of this file.
2 
6 
8 
9 ParameterSet::ParameterSet(const std::string& name, const NxLibItem& defaultParameters)
10 {
11  // Create a new NxLib node where we will store the parameters for this set and
12  // overwrite it with the default settings.
13  node = NxLibItem()["rosParameterSets"][name];
14  node << defaultParameters;
15 }
16 
17 Camera::Camera(ros::NodeHandle const& n, std::string serial, std::string fileCameraPath, bool fixed,
18  std::string cameraFrame, std::string targetFrame, std::string linkFrame)
19  : fileCameraPath(std::move(fileCameraPath))
20  , serial(std::move(serial))
21  , fixed(fixed)
22  , cameraFrame(std::move(cameraFrame))
23  , linkFrame(std::move(linkFrame))
24  , targetFrame(std::move(targetFrame))
25  , nh(n)
26 {
27  transformListener = make_unique<tf2_ros::TransformListener>(tfBuffer);
28  transformBroadcaster = make_unique<tf2_ros::TransformBroadcaster>();
29 
30  isFileCamera = !this->fileCameraPath.empty();
31 
32  accessTreeServer = ::make_unique<AccessTreeServer>(nh, "access_tree", boost::bind(&Camera::onAccessTree, this, _1));
34  ::make_unique<ExecuteCommandServer>(nh, "execute_command", boost::bind(&Camera::onExecuteCommand, this, _1));
36  ::make_unique<GetParameterServer>(nh, "get_parameter", boost::bind(&Camera::onGetParameter, this, _1));
38  ::make_unique<SetParameterServer>(nh, "set_parameter", boost::bind(&Camera::onSetParameter, this, _1));
39 
40  statusPublisher = nh.advertise<diagnostic_msgs::DiagnosticArray>("/diagnostics", 1);
41 
42  cameraNode = NxLibItem()[itmCameras][itmBySerialNo][this->serial];
44 
45  defaultParameters = NxLibItem()["rosDefaultParameters"];
46 }
47 
49 {
50  accessTreeServer->start();
51  executeCommandServer->start();
52 
53  getParameterServer->start();
54  setParameterServer->start();
55 }
56 
57 bool Camera::loadSettings(const std::string& jsonFile, bool saveAsDefaultParameters)
58 {
59  if (jsonFile.empty())
60  return true;
61 
62  std::ifstream file(jsonFile);
63  if (file.is_open() && file.rdbuf())
64  {
65  std::stringstream buffer;
66  buffer << file.rdbuf();
67  std::string const& jsonSettings = buffer.str();
68 
69  NxLibItem tmpParameters = NxLibItem()["rosTemporaryParameters"];
70  try
71  {
72  tmpParameters.setJson(jsonSettings);
73  }
74  catch (NxLibException&)
75  {
76  ROS_ERROR("The file '%s' does not contain valid JSON", jsonFile.c_str());
77  return false;
78  }
79 
80  try
81  {
82  if (tmpParameters[itmParameters].exists())
83  {
84  // The file contains the entire camera node.
85  cameraNode[itmParameters] << tmpParameters[itmParameters];
86  }
87  else
88  {
89  // The file contains only the parameter node.
90  cameraNode[itmParameters].setJson(jsonSettings, true);
91  }
92  tmpParameters.erase();
93 
94  NxLibCommand synchronize(cmdSynchronize, serial);
95  synchronize.parameters()[itmCameras] = serial;
96  synchronize.execute();
97 
99  if (saveAsDefaultParameters)
101  }
102  catch (NxLibException& e)
103  {
105  return false;
106  }
107  }
108  else
109  {
110  ROS_ERROR("Could not open the file '%s'", jsonFile.c_str());
111  return false;
112  }
113 
114  return true;
115 }
116 
117 void Camera::onAccessTree(const ensenso_camera_msgs::AccessTreeGoalConstPtr& goal)
118 {
120 
121  loadParameterSet(goal->parameter_set);
122 
123  NxLibItem item(goal->path);
124 
125  bool treeChanged = false;
126  if (goal->erase)
127  {
128  item.erase();
129  treeChanged = true;
130  }
131  else if (goal->set_null)
132  {
133  item.setNull();
134  treeChanged = true;
135  }
136  else if (!goal->json_value.empty())
137  {
138  item.setJson(goal->json_value);
139  treeChanged = true;
140  }
141 
142  if (treeChanged)
143  {
144  saveParameterSet(goal->parameter_set);
145  }
146 
147  ensenso_camera_msgs::AccessTreeResult result;
148 
149  result.exists = false;
150  if (item.exists())
151  {
152  result.exists = true;
153 
154  result.json_value = item.asJson();
155  try
156  {
157  // This could load any image that does not belong to the node's camera,
158  // so we do not know its frame.
159  result.binary_data = *imageFromNxLibNode(item, "");
160  }
161  catch (NxLibException&)
162  {
163  } // The item was not binary.
164  }
165 
166  accessTreeServer->setSucceeded(result);
167 
168  FINISH_NXLIB_ACTION(AccessTree)
169 }
170 
171 void Camera::onExecuteCommand(const ensenso_camera_msgs::ExecuteCommandGoalConstPtr& goal)
172 {
174 
175  loadParameterSet(goal->parameter_set);
176 
177  NxLibCommand command(goal->command);
178  command.parameters().setJson(goal->parameters);
179  command.execute();
180 
181  ensenso_camera_msgs::ExecuteCommandResult result;
182  result.result = command.result().asJson();
183 
184  executeCommandServer->setSucceeded(result);
185 
186  FINISH_NXLIB_ACTION(ExecuteCommand)
187 }
188 
189 void Camera::onGetParameter(ensenso_camera_msgs::GetParameterGoalConstPtr const& goal)
190 {
192 
193  ensenso_camera_msgs::GetParameterResult result;
194 
195  loadParameterSet(goal->parameter_set);
196 
197  result.stamp = ros::Time::now();
198  for (auto const& key : goal->keys)
199  {
200  result.results.push_back(*readParameter(key));
201  }
202 
203  getParameterServer->setSucceeded(result);
204 
205  FINISH_NXLIB_ACTION(GetParameter)
206 }
207 
209 {
210  return cameraNode[itmStatus].exists() && cameraNode[itmStatus][itmAvailable].exists() &&
211  cameraNode[itmStatus][itmAvailable].asBool();
212 }
213 
215 {
216  return cameraNode[itmStatus].exists() && cameraNode[itmStatus][itmOpen].exists() &&
217  cameraNode[itmStatus][itmOpen].asBool();
218 }
219 
220 void Camera::publishStatus(ros::TimerEvent const& event) const
221 {
222  std::lock_guard<std::mutex> lock(nxLibMutex);
223 
224  diagnostic_msgs::DiagnosticStatus cameraStatus;
225  cameraStatus.name = "Camera";
226  cameraStatus.hardware_id = serial;
227  cameraStatus.level = diagnostic_msgs::DiagnosticStatus::OK;
228  cameraStatus.message = "OK";
229 
230  if (!cameraIsOpen())
231  {
232  cameraStatus.level = diagnostic_msgs::DiagnosticStatus::ERROR;
233  cameraStatus.message = "Camera is no longer open";
234  }
235 
236  diagnostic_msgs::DiagnosticArray status;
237  status.header.stamp = ros::Time::now();
238  status.status.push_back(cameraStatus);
239  statusPublisher.publish(status);
240 }
241 
242 void Camera::fillBasicCameraInfoFromNxLib(sensor_msgs::CameraInfoPtr const& info) const
243 {
244  info->header.frame_id = cameraFrame;
245 
246  info->width = cameraNode[itmSensor][itmSize][0].asInt();
247  info->height = cameraNode[itmSensor][itmSize][1].asInt();
248 
249  info->binning_x = cameraNode[itmParameters][itmCapture][itmBinning].asInt();
250  info->binning_y = info->binning_x;
251 }
252 
253 void Camera::updateTransformations(tf2::Transform const& targetFrameTransformation) const
254 {
255  cameraNode[itmLink][itmTarget] = TARGET_FRAME_LINK + "_" + serial;
256  writePoseToNxLib(targetFrameTransformation, NxLibItem()[itmLinks][TARGET_FRAME_LINK + "_" + serial]);
257 }
258 
259 void Camera::updateGlobalLink(ros::Time time, std::string frame, bool useCachedTransformation) const
260 {
261  if (frame.empty())
262  {
263  frame = targetFrame;
264  }
265 
266  // Transformation are represented in the NxLib as follows.
267  // The camera's link node contains the calibration data from e.g. the hand
268  // eye calibration. This is always used when it is present.
269  // The transformation between the link frame and the target frame (in
270  // which the data is returned) is fetched from TF and written to a global link node
271  // of the NxLib.
272  // The link in the camera node has to reference this global link, if it exists. (e.g. when the linkFrame
273  // is different from the targetFrame)
274 
275  if (linkFrame == frame)
276  {
277  // The frame is the target frame already. So the camera does not need a reference to a global link.
278  cameraNode[itmLink][itmTarget] = "";
279  return;
280  }
281 
282  cameraNode[itmLink][itmTarget] = TARGET_FRAME_LINK + "_" + serial;
283 
284  // Update the transformation to the target frame in the NxLib according to
285  // the current information from TF. Only if the link frame and target frame differs.
286  geometry_msgs::TransformStamped transform;
287  if (useCachedTransformation && transformationCache.count(frame) != 0)
288  {
289  transform = transformationCache[frame];
290  }
291  else
292  {
294  transformationCache[frame] = transform;
295  }
296  tf2::Transform tfTrafo;
297  tf2::convert(transform.transform, tfTrafo);
298  NxLibItem()[itmLinks][TARGET_FRAME_LINK + "_" + serial].setNull();
299  NxLibItem()[itmLinks].setNull();
300  writePoseToNxLib(tfTrafo, NxLibItem()[itmLinks][TARGET_FRAME_LINK + "_" + serial]);
301 }
302 
303 std::vector<geometry_msgs::TransformStamped> Camera::estimatePatternPoses(ros::Time imageTimestamp,
304  std::string const& targetFrame) const
305 {
306  updateGlobalLink(imageTimestamp, targetFrame);
307 
308  NxLibCommand estimatePatternPose(cmdEstimatePatternPose, serial);
309  estimatePatternPose.parameters()[itmAverage] = false;
310  estimatePatternPose.parameters()[itmFilter][itmCameras] = serial;
311  estimatePatternPose.parameters()[itmFilter][itmUseModel] = true;
312  estimatePatternPose.parameters()[itmFilter][itmType] = valStatic;
313  estimatePatternPose.parameters()[itmFilter][itmValue] = true;
314  estimatePatternPose.execute();
315 
316  int numberOfPatterns = estimatePatternPose.result()[itmPatterns].count();
317 
318  std::vector<geometry_msgs::TransformStamped> result;
319  result.reserve(numberOfPatterns);
320 
321  for (int i = 0; i < numberOfPatterns; i++)
322  {
323  result.push_back(
324  poseFromNxLib(estimatePatternPose.result()[itmPatterns][i][itmPatternPose], cameraFrame, targetFrame));
325  }
326 
327  return result;
328 }
329 
330 geometry_msgs::TransformStamped Camera::estimatePatternPose(ros::Time imageTimestamp, std::string const& targetFrame,
331  bool latestPatternOnly) const
332 {
333  updateGlobalLink(imageTimestamp, targetFrame);
334 
335  NxLibCommand estimatePatternPose(cmdEstimatePatternPose, serial);
336  if (latestPatternOnly)
337  {
338  estimatePatternPose.parameters()[itmAverage] = false;
339 
340  int patternCount = NxLibItem()[itmParameters][itmPatternCount].asInt();
341  estimatePatternPose.parameters()[itmFilter][itmOr][0][itmAnd][0][itmType] = valIndex;
342  estimatePatternPose.parameters()[itmFilter][itmOr][0][itmAnd][0][itmValue] = patternCount - 1;
343  }
344  else
345  {
346  estimatePatternPose.parameters()[itmAverage] = true;
347  }
348  estimatePatternPose.execute();
349 
350  ROS_ASSERT(estimatePatternPose.result()[itmPatterns].count() == 1);
351 
352  return poseFromNxLib(estimatePatternPose.result()[itmPatterns][0][itmPatternPose], cameraFrame, targetFrame);
353 }
354 
355 ensenso_camera_msgs::ParameterPtr Camera::readParameter(std::string const& key) const
356 {
357  auto message = boost::make_shared<ensenso_camera_msgs::Parameter>();
358  message->key = key;
359  if (parameterExists(key))
360  {
361  // The parameter is mapped to an NxLib node.
362 
363  ParameterMapping parameterMapping = parameterInformation.at(key);
364  NxLibItem node = parameterMapping.node(cameraNode);
365 
366  if (node.exists())
367  {
368  switch (parameterMapping.type)
369  {
370  case ParameterType::Bool:
371  message->bool_value = node.asBool();
372  break;
374  message->float_value = node.asDouble();
375  break;
377  message->string_value = node.asString();
378  break;
379  }
380  }
381  else
382  {
383  ROS_WARN("Reading the parameter %s, but the camera does not support it!", key.c_str());
384  }
385  }
386  else
387  {
388  ROS_ERROR("Unknown parameter '%s'!", key.c_str());
389  }
390 
391  return message;
392 }
393 
394 void Camera::writeParameter(ensenso_camera_msgs::Parameter const& parameter)
395 {
396  if (parameterExists(parameter.key))
397  {
398  // The parameter is mapped to an NxLib node.
399 
400  ParameterMapping parameterMapping = parameterInformation.at(parameter.key);
401  NxLibItem node = parameterMapping.node(cameraNode);
402 
403  if (!node.exists())
404  {
405  ROS_WARN("Writing the parameter %s, but the camera does not support it!", parameter.key.c_str());
406  return;
407  }
408 
409  switch (parameterMapping.type)
410  {
411  case ParameterType::Bool:
412  node.set<bool>(parameter.bool_value);
413  break;
415  node.set<double>(parameter.float_value);
416  break;
418  node.set<std::string>(parameter.string_value);
419  }
420  }
421  else
422  {
423  ROS_ERROR("Unknown parameter '%s'!", parameter.key.c_str());
424  }
425 }
426 
428 {
429  if (isFileCamera && !cameraNode.exists())
430  {
431  try
432  {
433  if (serial.size() > 15)
434  {
435  ROS_ERROR("The serial '%s' is too long!", serial.c_str());
436  return false;
437  }
438 
439  NxLibCommand createCamera(cmdCreateCamera, serial);
440  createCamera.parameters()[itmSerialNumber] = serial;
441  createCamera.parameters()[itmFolderPath] = fileCameraPath;
442  createCamera.execute();
443 
444  createdFileCamera = true;
445  }
446  catch (NxLibException& e)
447  {
448  ROS_ERROR("Failed to create the file camera!");
450  return false;
451  }
452  }
453 
454  if (!cameraNode.exists())
455  {
456  ROS_ERROR("The camera '%s' could not be found", serial.c_str());
457  return false;
458  }
459  if (!cameraIsAvailable())
460  {
461  ROS_ERROR("The camera '%s' is already in use", serial.c_str());
462  return false;
463  }
464 
465  try
466  {
467  NxLibCommand open(cmdOpen, serial);
468  open.parameters()[itmCameras] = serial;
469  open.execute();
470  }
471  catch (NxLibException& e)
472  {
473  ROS_ERROR("Error while opening the camera '%s'!", serial.c_str());
475  return false;
476  }
477 
480 
481  ROS_INFO("Opened camera with serial number '%s'.", serial.c_str());
482  return true;
483 }
484 
486 {
487  std::lock_guard<std::mutex> lock(nxLibMutex);
488 
489  try
490  {
491  NxLibCommand close(cmdClose, serial);
492  close.parameters()[itmCameras] = serial;
493  close.execute();
494 
496  {
497  NxLibCommand deleteCmd(cmdDeleteCamera, serial);
498  deleteCmd.parameters()[itmCameras] = serial;
499  deleteCmd.execute();
500  }
501  }
502  catch (NxLibException&)
503  {
504  }
505 }
506 
508 {
509  defaultParameters << cameraNode[itmParameters];
510 }
511 
512 void Camera::saveParameterSet(std::string name)
513 {
514  if (name.empty())
515  {
516  name = DEFAULT_PARAMETER_SET;
517  }
518 
519  ParameterSet& parameterSet = parameterSets.at(name);
520 
521  parameterSet.node.erase();
522  parameterSet.node << cameraNode[itmParameters];
523 }
524 
525 void Camera::loadParameterSet(std::string name)
526 {
527  if (name.empty())
528  {
529  name = DEFAULT_PARAMETER_SET;
530  }
531 
532  ROS_DEBUG("Loading parameter set '%s'", name.c_str());
533 
534  if (parameterSets.count(name) == 0)
535  {
536  // The parameter set was never used before. Create it by copying the
537  // default settings.
538  parameterSets.insert(std::make_pair(name, ParameterSet(name, defaultParameters)));
539  }
540 
541  ParameterSet const& parameterSet = parameterSets.at(name);
542 
543  bool changedParameters = false;
544  if (name != currentParameterSet)
545  {
546  cameraNode[itmParameters] << parameterSet.node;
547  changedParameters = true;
548  }
549 
550  if (changedParameters)
551  {
552  NxLibCommand synchronize(cmdSynchronize, serial);
553  synchronize.parameters()[itmCameras] = serial;
554  synchronize.execute();
555  }
556 
557  currentParameterSet = name;
558 }
559 
561 {
563 }
564 
566 {
567  // The camera link is the calibrated link from camera to link
568  if (cameraFrame == linkFrame)
569  {
570  return;
571  }
572 
573  bool cameraLinkExists = cameraNode[itmLink][itmTarget].exists();
574 
575  if (cameraLinkExists)
576  {
577  transformBroadcaster->sendTransform(stampedLinkToCamera());
578  }
579 }
580 
581 geometry_msgs::TransformStamped Camera::stampedLinkToCamera()
582 {
584  // Need the inverse, because we want to publish the other way around
585  // E.g. Instead of camera->link, we want link->camera
586  // We also need the camera always to be the child frame
587  geometry_msgs::TransformStamped transformStamped = fromTfTransform(transform.inverse(), linkFrame, cameraFrame);
588  return transformStamped;
589 }
590 
592 {
593  // The Nxlib will always give the transfrom from the Camera to the Link target in Camera Coordinates.
594  tf2::Transform transform;
595  try
596  {
597  transform = poseFromNxLib(cameraNode[itmLink]);
598  }
599  catch (NxLibException const& e)
600  {
601  ROS_WARN("Link does not exists.Therefore we cannot publish a transform to any target. Error message: %s",
602  e.getErrorText().c_str());
603  }
604 
605  if (!isValid(transform))
606  {
607  transform.setIdentity();
608  ROS_WARN("Did not find a good transform from %s to %s. Transform has been set to identity", cameraFrame.c_str(),
609  linkFrame.c_str());
610  }
611 
612  return transform;
613 }
614 
616 {
618 }
619 
621 {
623 }
sensor_msgs::ImagePtr imageFromNxLibNode(NxLibItem const &node, std::string const &frame)
std::string const DEFAULT_PARAMETER_SET
Definition: camera.h:57
std::map< std::string, ParameterSet > parameterSets
Definition: camera.h:225
NxLibItem node
Definition: camera.h:156
std::string targetFrame
Definition: camera.h:201
virtual void initStatusTimer()
Definition: camera.cpp:620
void publish(const boost::shared_ptr< M > &message) const
bool parameterExists(std::string const &key)
Definition: parameters.h:87
void updateTransformations(tf2::Transform const &targetFrameTransformation) const
Definition: camera.cpp:253
ros::NodeHandle nh
Definition: camera.h:203
std::map< std::string, ParameterMapping > const parameterInformation
Definition: parameters.h:52
VersionInfo getCurrentNxLibVersion()
void updateGlobalLink(ros::Time time=ros::Time::now(), std::string frame="", bool useCachedTransformation=false) const
Definition: camera.cpp:259
geometry_msgs::TransformStamped stampedLinkToCamera()
Definition: camera.cpp:581
double const POSE_TF_INTERVAL
Definition: camera.h:46
std::string const TARGET_FRAME_LINK
Definition: camera.h:62
virtual geometry_msgs::TransformStamped lookupTransform(const std::string &target_frame, const std::string &source_frame, const ros::Time &time, const ros::Duration timeout) const
NxLibItem node(NxLibItem const &cameraNode)
Definition: parameters.h:33
virtual void publishStatus(ros::TimerEvent const &event) const
Definition: camera.cpp:220
double const STATUS_INTERVAL
Definition: camera.h:40
void publishCameraLink()
Definition: camera.cpp:565
ros::Publisher statusPublisher
Definition: camera.h:205
virtual bool open()
Definition: camera.cpp:427
ros::Timer cameraPosePublisher
Definition: camera.h:207
std::string cameraFrame
Definition: camera.h:199
NxLibItem defaultParameters
Definition: camera.h:223
bool cameraIsOpen() const
Definition: camera.cpp:214
#define ROS_WARN(...)
virtual std::vector< geometry_msgs::TransformStamped > estimatePatternPoses(ros::Time imageTimestamp=ros::Time::now(), std::string const &targetFrame="") const
Definition: camera.cpp:303
void setIdentity()
std::mutex nxLibMutex
Definition: camera.h:194
void writePoseToNxLib(tf2::Transform const &pose, NxLibItem const &node)
double const TRANSFORMATION_REQUEST_TIMEOUT
Definition: camera.h:51
std::unique_ptr< SetParameterServer > setParameterServer
Definition: camera.h:217
virtual void updateCameraInfo()=0
virtual void initTfPublishTimer()
Definition: camera.cpp:615
std::string serial
Definition: camera.h:190
ROSLIB_DECL std::string command(const std::string &cmd)
#define ROS_INFO(...)
tf2::Transform getCameraToLinkTransform()
Definition: camera.cpp:591
void publishCurrentLinks(ros::TimerEvent const &timerEvent=ros::TimerEvent())
Definition: camera.cpp:560
Camera(ros::NodeHandle const &n, std::string serial, std::string fileCameraPath, bool fixed, std::string cameraFrame, std::string targetFrame, std::string linkFrame)
Definition: camera.cpp:17
void onGetParameter(ensenso_camera_msgs::GetParameterGoalConstPtr const &goal)
Definition: camera.cpp:189
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
Transform inverse() const
virtual geometry_msgs::TransformStamped estimatePatternPose(ros::Time imageTimestamp=ros::Time::now(), std::string const &targetFrame="", bool latestPatternOnly=false) const
Definition: camera.cpp:330
void onAccessTree(ensenso_camera_msgs::AccessTreeGoalConstPtr const &goal)
Definition: camera.cpp:117
virtual void writeParameter(ensenso_camera_msgs::Parameter const &parameter)
Definition: camera.cpp:394
bool isValid(tf2::Transform const &pose)
std::string fileCameraPath
Definition: camera.h:183
std::unique_ptr< ExecuteCommandServer > executeCommandServer
Definition: camera.h:215
bool isFileCamera
Definition: camera.h:182
NxLibItem cameraNode
Definition: camera.h:191
virtual void startServers() const
Definition: camera.cpp:48
VersionInfo nxLibVersion
Definition: camera.h:188
bool createdFileCamera
Definition: camera.h:186
geometry_msgs::TransformStamped fromTfTransform(tf2::Transform const &transform, std::string parentFrame, std::string childFrame)
bool cameraIsAvailable() const
Definition: camera.cpp:208
void onExecuteCommand(ensenso_camera_msgs::ExecuteCommandGoalConstPtr const &goal)
Definition: camera.cpp:171
tf2_ros::Buffer tfBuffer
Definition: camera.h:210
virtual void onSetParameter(ensenso_camera_msgs::SetParameterGoalConstPtr const &goal)=0
void loadParameterSet(std::string name)
Definition: camera.cpp:525
std::string linkFrame
Definition: camera.h:200
#define LOG_NXLIB_EXCEPTION(EXCEPTION)
Definition: camera.h:69
ParameterSet(std::string const &name, NxLibItem const &defaultParameters)
Definition: camera.cpp:9
tf2::Transform poseFromNxLib(NxLibItem const &node)
void saveDefaultParameterSet()
Definition: camera.cpp:507
static Time now()
#define START_NXLIB_ACTION(ACTION_NAME, ACTION_SERVER)
Definition: camera.h:91
ros::Timer statusTimer
Definition: camera.h:206
void convert(const A &a, B &b)
std::unique_ptr< AccessTreeServer > accessTreeServer
Definition: camera.h:214
ROSCPP_DECL bool exists(const std::string &service_name, bool print_failure_reason)
std::map< std::string, geometry_msgs::TransformStamped > transformationCache
Definition: camera.h:220
std::unique_ptr< GetParameterServer > getParameterServer
Definition: camera.h:216
void saveParameterSet(std::string name)
Definition: camera.cpp:512
void fillBasicCameraInfoFromNxLib(sensor_msgs::CameraInfoPtr const &info) const
Definition: camera.cpp:242
#define ROS_ASSERT(cond)
virtual ensenso_camera_msgs::ParameterPtr readParameter(std::string const &key) const
Definition: camera.cpp:355
#define FINISH_NXLIB_ACTION(ACTION_NAME)
Definition: camera.h:102
std::string currentParameterSet
Definition: camera.h:226
ParameterType type
Definition: parameters.h:25
#define ROS_ERROR(...)
bool loadSettings(std::string const &jsonFile, bool saveAsDefaultParameters=false)
Definition: camera.cpp:57
std::unique_ptr< tf2_ros::TransformListener > transformListener
Definition: camera.h:211
#define ROS_DEBUG(...)
std::unique_ptr< tf2_ros::TransformBroadcaster > transformBroadcaster
Definition: camera.h:212
void close()
Definition: camera.cpp:485


ensenso_camera
Author(s): Ensenso
autogenerated on Thu Feb 6 2020 03:48:46