43 #ifndef _BTA_TOF_DRIVER_HPP_ 44 #define _BTA_TOF_DRIVER_HPP_ 52 #include <sensor_msgs/Image.h> 53 #include <sensor_msgs/CameraInfo.h> 54 #include <sensor_msgs/SetCameraInfo.h> 56 #include <sensor_msgs/PointCloud2.h> 59 #include <geometry_msgs/TransformStamped.h> 66 #include <pcl/point_types.h> 67 #include <pcl/conversions.h> 76 #include <bta_tof_driver/bta_tof_driverConfig.h> 77 #include <dynamic_reconfigure/server.h> 86 typedef bta_tof_driver::bta_tof_driverConfig
Config;
142 static void BTA_CALLCONV
infoEventCb(BTA_EventId eventId, int8_t *msg) {
143 ROS_DEBUG(
" Callback: infoEvent (%d) %s\n", eventId, msg);
166 sensor_msgs::PointCloud2Ptr
_xyz;
180 void callback(bta_tof_driver::bta_tof_driverConfig &config, uint32_t level);
201 std::string
getDataType(BTA_DataFormat dataFormat);
268 #endif //_BTA_TOF_DRIVER_HPP_ std::string calibFileName_
image_transport::CameraPublisher pub_amp_
void close()
Closes the connection to the device.
uint8_t tcpDeviceIpAddr_[6]
camera_info_manager::CameraInfoManager cim_tof_
static void BTA_CALLCONV infoEventCb(BTA_EventId eventId, int8_t *msg)
ros::NodeHandle nh_private_
uint8_t udpControlOutIpAddr_[6]
geometry_msgs::TransformStamped transformStamped
boost::shared_ptr< ReconfigureServer > reconfigure_server_
image_transport::CameraPublisher pub_dis_
sensor_msgs::PointCloud2Ptr _xyz
uint8_t udpDataIpAddr_[6]
virtual ~BtaRos()
Class destructor.
int connectCamera()
Helper for connect to the device.
size_t getDataSize(BTA_DataFormat dataFormat)
Returns the size of the data based in BTA_DataFormat.
boost::mutex connect_mutex_
void publishData()
Publish the data based on set up parameters.
bta_tof_driver::bta_tof_driverConfig Config
dynamic_reconfigure::Server< Config > ReconfigureServer
void parseConfig()
Reads configuration from the server parameters.
image_transport::ImageTransport it_
tf2_ros::StaticTransformBroadcaster pub_tf
float getUnit2Meters(BTA_Unit unit)
Gives the conversion value to meters from the BTA_Unit.
BtaRos(ros::NodeHandle nh_camera, ros::NodeHandle nh_private, std::string nodeName)
Class constructor.
std::string uartPortName_
uint8_t udpControlInIpAddr_[6]
void callback(bta_tof_driver::bta_tof_driverConfig &config, uint32_t level)
Callback for rqt_reconfigure. It is called any time we change a parameter in the visual interface...
std::string getDataType(BTA_DataFormat dataFormat)
Returns the data encoding flat based in BTA_DataFormat.
int initialize()
Initializes the device and parameters.