14 #ifndef TANGO_ROS_NODELET_H_ 15 #define TANGO_ROS_NODELET_H_ 18 #include <condition_variable> 28 #include <opencv2/core/core.hpp> 32 #include <geometry_msgs/TransformStamped.h> 35 #include <nav_msgs/OccupancyGrid.h> 39 #include <sensor_msgs/CameraInfo.h> 40 #include <sensor_msgs/LaserScan.h> 41 #include <sensor_msgs/PointCloud2.h> 42 #include <tango_ros_messages/GetMapName.h> 43 #include <tango_ros_messages/GetMapUuids.h> 44 #include <tango_ros_messages/LoadOccupancyGrid.h> 45 #include <tango_ros_messages/SaveMap.h> 46 #include <tango_ros_messages/TangoConnect.h> 49 #include <visualization_msgs/MarkerArray.h> 51 #include "tango_ros_native/PublisherConfig.h" 138 bool GetAvailableMapUuidsList(std::vector<std::string>& uuid_list);
143 bool GetMapNameFromUuid(
const std::string& map_uuid, std::string& map_name);
149 void TangoDisconnect();
151 void StartPublishing();
154 void StopPublishing();
176 void UpdateAndPublishTangoStatus(
const TangoStatus& status);
178 void PublishStaticTransforms();
180 void PublishDevicePose();
181 void PublishPointCloud();
182 void PublishLaserScan();
183 void PublishFisheyeImage();
184 void PublishColorImage();
190 void DynamicReconfigureCallback(PublisherConfig &config, uint32_t level);
192 bool GetMapNameServiceCallback(
const tango_ros_messages::GetMapName::Request& req,
193 tango_ros_messages::GetMapName::Response& res);
196 bool GetMapUuidsServiceCallback(
const tango_ros_messages::GetMapUuids::Request& req,
197 tango_ros_messages::GetMapUuids::Response& res);
200 bool LoadOccupancyGridServiceCallback(
const tango_ros_messages::LoadOccupancyGrid::Request& req,
201 tango_ros_messages::LoadOccupancyGrid::Response& res);
204 bool SaveMapServiceCallback(
const tango_ros_messages::SaveMap::Request& req,
205 tango_ros_messages::SaveMap::Response& res);
207 bool TangoConnectServiceCallback(
208 const tango_ros_messages::TangoConnect::Request& request,
209 tango_ros_messages::TangoConnect::Response& response);
227 bool tango_data_available_ =
true;
228 double time_offset_ = 0.;
229 bool publish_pose_on_tf_ =
true;
230 bool use_tf_static_ =
true;
231 bool enable_depth_ =
true;
232 bool enable_color_camera_ =
true;
233 bool enable_3dr_mesh_ =
true;
234 bool enable_3dr_occupancy_grid_ =
true;
235 bool fisheye_camera_available_ =
true;
255 double laser_scan_max_height_ = 1.0;
256 double laser_scan_min_height_ = -1.0;
257 double laser_scan_max_range_ = 4.0;
258 double laser_scan_min_range_ = 0.3;
303 #endif // TANGO_ROS_NODELET_H_ const std::string GET_MAP_UUIDS_SERVICE_NAME
uint8_t t3dr_occupancy_grid_threshold_
std_msgs::Header fisheye_image_header_
TangoSupport_ImageBufferManager * image_buffer_manager_
const float LASER_SCAN_ANGLE_MIN
ros::Publisher area_description_T_start_of_service_publisher_
std::shared_ptr< image_transport::ImageTransport > image_transport_
std::atomic_bool run_threads_
image_transport::Publisher fisheye_rectified_image_publisher_
Tango3DR_Pose last_camera_color_pose_
ros::ServiceServer get_map_uuids_service_
image_transport::CameraPublisher fisheye_camera_publisher_
const std::string DATASET_DIRECTORY_PARAM_NAME
std::thread publish_thread
ros::ServiceServer tango_connect_service_
const std::string AREA_DESCRIPTION_FRAME_ID_PARAM_NAME
const std::string ENABLE_DEPTH_PARAM_NAME
const std::string OCCUPANCY_GRID_DIRECTORY_PARAM_NAME
ros::Publisher mesh_marker_publisher_
const std::string LASER_SCAN_FRAME_ID
const std::string LOCALIZATION_MAP_UUID_PARAM_NAME
const std::string PUBLISH_POSE_ON_TF_PARAM_NAME
TangoSupport_PointCloudManager * point_cloud_manager_
const std::string ENABLE_COLOR_CAMERA_PARAM_NAME
ros::ServiceServer get_map_name_service_
image_transport::Publisher color_rectified_image_publisher_
const std::string COLOR_MESH_TOPIC_NAME
const std::string CONNECT_SERVICE_NAME
ros::ServiceServer save_map_service_
const std::string STATIC_OCCUPANCY_GRID_TOPIC_NAME
sensor_msgs::PointCloud2 point_cloud_
std::shared_ptr< camera_info_manager::CameraInfoManager > color_camera_info_manager_
const std::string SAVE_MAP_SERVICE_NAME
const std::string COLOR_IMAGE_TOPIC_NAME
nav_msgs::OccupancyGrid occupancy_grid_
sensor_msgs::CameraInfo color_camera_info_
const std::string CREATE_NEW_MAP_PARAM_NAME
std::mutex data_available_mutex
cv::Mat color_image_rect_
Tango3DR_Pose last_camera_depth_pose_
const std::string DATASET_DEFAULT_DIRECTORY
geometry_msgs::TransformStamped area_description_T_start_of_service_
const std::string USE_TF_STATIC_PARAM_NAME
Tango3DR_CameraCalibration t3dr_color_camera_intrinsics_
ros::Publisher tango_status_publisher_
geometry_msgs::TransformStamped device_T_camera_depth_
TangoConfig tango_config_
TangoStatus tango_status_
PublishThread fisheye_image_thread_
image_transport::CameraPublisher color_camera_publisher_
std::thread ros_spin_thread_
PublishThread mesh_thread_
const float LASER_SCAN_TIME_INCREMENT
const std::string TANGO_STATUS_TOPIC_NAME
std::atomic_bool new_point_cloud_available_for_t3dr_
const std::string AREA_DESCRIPTION_T_START_OF_SERVICE_TOPIC_NAME
sensor_msgs::CameraInfo fisheye_camera_info_
const std::string START_OF_SERVICE_T_DEVICE_TOPIC_NAME
cv::Mat fisheye_image_rect_
const std::string GET_MAP_NAME_SERVICE_NAME
ros::Publisher occupancy_grid_publisher_
ros::Publisher point_cloud_publisher_
const float LASER_SCAN_ANGLE_MAX
geometry_msgs::TransformStamped device_T_camera_fisheye_
const std::string LASER_SCAN_TOPIC_NAME
sensor_msgs::LaserScan laser_scan_
PublishThread color_image_thread_
PublishThread laser_scan_thread_
const std::string DATASET_UUID_PARAM_NAME
const std::string FISHEYE_RECTIFIED_IMAGE_TOPIC_NAME
const std::string START_OF_SERVICE_FRAME_ID_PARAM_NAME
const std::string LOCALIZATION_MODE_PARAM_NAME
const std::string ENABLE_3DR_MESH_PARAM_NAME
const std::string POINT_CLOUD_TOPIC_NAME
image_geometry::PinholeCameraModel color_camera_model_
const std::string OCCUPANCY_GRID_DEFAULT_DIRECTORY
ros::Publisher static_occupancy_grid_publisher_
Tango3DR_ReconstructionContext t3dr_context_
std::condition_variable data_available
ros::ServiceServer load_occupancy_grid_service_
std::string area_description_frame_id_
ros::Publisher start_of_service_T_device_publisher_
geometry_msgs::TransformStamped device_T_camera_color_
const float LASER_SCAN_SCAN_TIME
struct _Tango3DR_ReconstructionContext * Tango3DR_ReconstructionContext
const std::string FISHEYE_IMAGE_TOPIC_NAME
std_msgs::Header color_image_header_
tf::TransformBroadcaster tf_broadcaster_
std::shared_ptr< camera_info_manager::CameraInfoManager > fisheye_camera_info_manager_
PublishThread point_cloud_thread_
const std::string COLOR_RECTIFIED_IMAGE_TOPIC_NAME
const std::string ENABLE_3DR_OCCUPANCY_GRID_PARAM_NAME
ros::NodeHandle node_handle_
ros::Publisher laser_scan_publisher_
const float LASER_SCAN_ANGLE_INCREMENT
tf::StampedTransform camera_depth_T_laser_
geometry_msgs::TransformStamped start_of_service_T_device_
const int NUMBER_OF_STATIC_TRANSFORMS
std::string start_of_service_frame_id_
const std::string LOAD_OCCUPANCY_GRID_SERVICE_NAME
const std::string OCCUPANCY_GRID_TOPIC_NAME
PublishThread device_pose_thread_
tf2_ros::StaticTransformBroadcaster tf_static_broadcaster_