Macros | Functions | Variables
camera.cpp File Reference
#include "ensenso_camera/camera.h"
#include <cmath>
#include <fstream>
#include <set>
#include <string>
#include <vector>
#include <diagnostic_msgs/DiagnosticArray.h>
#include <pcl_conversions/pcl_conversions.h>
#include <sensor_msgs/distortion_models.h>
#include "pcl_ros/point_cloud.h"
#include "ensenso_camera/helper.h"
#include "ensenso_camera/image_utilities.h"
#include "ensenso_camera/parameters.h"
#include "ensenso_camera/pose_utilities.h"
#include "ensenso_camera/conversion.h"
Include dependency graph for camera.cpp:

Go to the source code of this file.

Macros

#define FINISH_NXLIB_ACTION(ACTION_NAME)
 
#define LOG_NXLIB_EXCEPTION(EXCEPTION)
 
#define PREEMPT_ACTION_IF_REQUESTED
 
#define START_NXLIB_ACTION(ACTION_NAME, ACTION_SERVER)
 

Functions

bool checkNxLibVersion (int major, int minor)
 

Variables

std::string const DEFAULT_PARAMETER_SET = "default"
 
int const ERROR_CODE_TF = 101
 
int const ERROR_CODE_UNKNOWN_EXCEPTION = 100
 
double const STATUS_INTERVAL = 3.0
 
std::string const TARGET_FRAME_LINK = "Workspace"
 
double const TRANSFORMATION_REQUEST_TIMEOUT = 0.1
 

Macro Definition Documentation

#define FINISH_NXLIB_ACTION (   ACTION_NAME)
Value:
} /* NOLINT */ \
catch (NxLibException & e) \
{ \
ROS_ERROR("NxLibException %d (%s) for item %s", e.getErrorCode(), e.getErrorText().c_str(), \
e.getItemPath().c_str()); \
ensenso_camera_msgs::ACTION_NAME##Result result; \
result.error.code = e.getErrorCode(); \
result.error.message = e.getErrorText(); \
server->setAborted(result); \
return; \
} /* NOLINT */ \
catch (tf::TransformException & e) \
{ \
ROS_ERROR("TF Exception: %s", e.what()); \
ensenso_camera_msgs::ACTION_NAME##Result result; \
result.error.code = ERROR_CODE_TF; \
result.error.message = e.what(); \
server->setAborted(result); \
return; \
} /* NOLINT */ \
catch (std::exception & e) \
{ \
ROS_ERROR("Unknown Exception: %s", e.what()); \
ensenso_camera_msgs::ACTION_NAME##Result result; \
result.error.code = ERROR_CODE_UNKNOWN_EXCEPTION; \
result.error.message = e.what(); \
server->setAborted(result); \
return; \
}
int const ERROR_CODE_TF
Definition: camera.cpp:45
#define LOG_NXLIB_EXCEPTION(EXCEPTION)
Definition: camera.cpp:47
int const ERROR_CODE_UNKNOWN_EXCEPTION
Definition: camera.cpp:44

Definition at line 80 of file camera.cpp.

#define LOG_NXLIB_EXCEPTION (   EXCEPTION)
Value:
try \
{ \
if (EXCEPTION.getErrorCode() == NxLibExecutionFailed) \
{ \
NxLibItem executionNode(EXCEPTION.getItemPath()); \
ROS_ERROR("%s: %s", executionNode[itmResult][itmErrorSymbol].asString().c_str(), \
executionNode[itmResult][itmErrorText].asString().c_str()); \
} /* NOLINT */ \
} /* NOLINT */ \
catch (...) \
{ \
} /* NOLINT */ \
ROS_DEBUG("Current NxLib tree: %s", NxLibItem().asJson(true).c_str());

Definition at line 47 of file camera.cpp.

#define PREEMPT_ACTION_IF_REQUESTED
Value:
if (server->isPreemptRequested()) \
{ \
server->setPreempted(); \
return; \
}

Definition at line 112 of file camera.cpp.

#define START_NXLIB_ACTION (   ACTION_NAME,
  ACTION_SERVER 
)
Value:
ROS_DEBUG("Received a " #ACTION_NAME " request."); \
auto& server = ACTION_SERVER; \
if (server->isPreemptRequested()) \
{ \
server->setPreempted(); \
return; \
} /* NOLINT */ \
std::lock_guard<std::mutex> lock(nxLibMutex); \
try \
{
#define ROS_DEBUG(...)

Definition at line 69 of file camera.cpp.

Function Documentation

bool checkNxLibVersion ( int  major,
int  minor 
)

Check whether the NxLib has at least the given version.

Definition at line 122 of file camera.cpp.

Variable Documentation

std::string const DEFAULT_PARAMETER_SET = "default"

The name of the parameter set that is used when an action was not given a parameter set explicitly.

Definition at line 35 of file camera.cpp.

int const ERROR_CODE_TF = 101

Definition at line 45 of file camera.cpp.

int const ERROR_CODE_UNKNOWN_EXCEPTION = 100

Definition at line 44 of file camera.cpp.

double const STATUS_INTERVAL = 3.0

The interval at which we publish diagnostic messages containing the camera status.

Definition at line 24 of file camera.cpp.

std::string const TARGET_FRAME_LINK = "Workspace"

The name of the target frame in the NxLib.

Definition at line 40 of file camera.cpp.

double const TRANSFORMATION_REQUEST_TIMEOUT = 0.1

The maximum time that we wait for a tf transformation to become available.

Definition at line 29 of file camera.cpp.



ensenso_camera
Author(s): Ensenso
autogenerated on Thu May 16 2019 02:44:23