Go to the documentation of this file.
12 #include <sensor_msgs/Image.h>
13 #include <sensor_msgs/PointCloud2.h>
18 #include <compressed_depth_image_transport/rvl_codec.h>
19 #include <boost/thread/thread.hpp>
95 catch (
const std::exception& e)
97 std::cerr <<
"Error getting next frame" << e.what() <<
'\n';
101 if (inframe ==
nullptr)
107 if (new_output_frame ==
nullptr)
121 delete new_output_frame;
124 if (new_output_frame !=
nullptr)
170 "Configuration variables: ab_threshold: %d, confidence_threshold: %d, jblf_filter_state: %d, jblf_filter_size: "
171 "%d, radial_filter_min_threshold: %d, radial_filter_max_threshold: %d",
197 int main(
int argc,
char** argv)
199 ros::init(argc, argv,
"adi_3dtof_adtf31xx");
207 boost::thread read_input_thread;
208 bool thread_spawn_status =
true;
213 catch (
const std::exception& e)
215 thread_spawn_status =
false;
216 std::cerr <<
"Exception when trying to spawn read_input_thread : " << e.what() <<
'\n';
220 boost::thread process_output_thread;
225 catch (
const std::exception& e)
227 thread_spawn_status =
false;
228 std::cerr <<
"Exception when trying to spawn process_output_thread : " << e.what() <<
'\n';
234 while ((
ros::ok()) && (thread_spawn_status))
256 if (thread_spawn_status)
263 read_input_thread.join();
265 catch (
const std::exception& e)
267 std::cerr <<
" Exception in read_input_thread.join() : " << e.what() <<
'\n';
274 process_output_thread.join();
276 catch (
const std::exception& e)
278 std::cerr <<
" Exception in process_output_thread.join() : " << e.what() <<
'\n';
This is the class for adtf31xx sensor node output information.
void initSettingsForDynamicReconfigure()
Dynamic reconfigure initialization.
int compressed_conf_frame_size_
bool enable_depth_ab_compression_
unsigned short * getDepthFrame() const
Get the depth image frame.
int confidence_threshold_
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ros::Time curr_frame_timestamp_
void readInputAbort()
Function to read Abort flag, this function will be called by the main function to exit the thread.
int CompressRVL(const unsigned short *input, unsigned char *output, int numPixels)
void processOutput()
The output process function, this is running a loop which reads the frame from the putput queue,...
ROSCPP_DECL void spinOnce()
This is the class for adtf31xx sensor frame.
int radial_filter_max_threshold_
int compressed_depth_frame_size_
#define PROFILE_FUNCTION_END(ID)
IInputSensor * input_sensor_
void adtf31xxSensorPushOutputNode(ADI3DToFADTF31xxOutputInfo *new_output_node)
This function pushes the debug node to the output queue. If the queue is full, then the last item in ...
short * getXYZFrame() const
Get point cloud frame.
#define INIT_FUNCTION_PROFILE()
void updateDynamicReconfigureVariablesInputThread()
updates the parameter of input image based on dynamic reconfigure.
unsigned short * conf_frame_
void dynamicallyReconfigureVariables(adi_3dtof_adtf31xx::ADTF31xxSensorParamsConfig &config, uint32_t level)
new values from dynamic reconfigure are copied to a structure variable here, actual update to individ...
adi_3dtof_adtf31xx::ADTF31xxSensorParamsConfig dynamic_reconfigure_config_
ADI3DToFADTF31xxFrameInfo * adtf31xxSensorGetNextFrame()
Function to read the next frame from the input Queue.
void processOutputAbort()
This function sets the abort flag for the output thread, the function is normally called by the main ...
ros::Time getFrameTimestamp() const
Get Frame Timestamp.
int main(int argc, char **argv)
This is main function.
bool readNextFrame()
This function is the entry point to the sensor node.
unsigned short * ab_frame_
int radial_filter_min_threshold_
#define ROS_INFO_STREAM(args)
#define FLUSH_FUNCTION_PROFILE()
void readInput()
This function reads the frmae from the sensor. This runs in a loop, reading the frames and adding the...
#define CLOSE_FUNCTION_PROFILE()
#define PROFILE_FUNCTION_START(ID)
void shutDownAllNodes()
This function shuts down all the nodes running in a roscore.
unsigned short * depth_frame_
unsigned short * conf_frame_
This is main class for this package.
unsigned short * getConfFrame() const
Get Confidence frame.
unsigned short * ab_frame_
unsigned short * depth_frame_
unsigned char * compressed_depth_frame_
unsigned short * getABFrame() const
Get the AB image frame.
unsigned char * compressed_conf_frame_