tango_3d_reconstruction_helper.h
Go to the documentation of this file.
00001 // Copyright 2017 Intermodalics All Rights Reserved.
00002 //
00003 // Licensed under the Apache License, Version 2.0 (the "License");
00004 // you may not use this file except in compliance with the License.
00005 // You may obtain a copy of the License at
00006 //
00007 //      http://www.apache.org/licenses/LICENSE-2.0
00008 //
00009 // Unless required by applicable law or agreed to in writing, software
00010 // distributed under the License is distributed on an "AS IS" BASIS,
00011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012 // See the License for the specific language governing permissions and
00013 // limitations under the License.
00014 #ifndef TANGO_3D_RECONSTRUCTION_HELPER_H_
00015 #define TANGO_3D_RECONSTRUCTION_HELPER_H_
00016 #include <string>
00017 
00018 #include <tango_3d_reconstruction/tango_3d_reconstruction_api.h>
00019 #include <tango_support/tango_support.h>
00020 
00021 #include <nav_msgs/OccupancyGrid.h>
00022 #include <ros/ros.h>
00023 #include <visualization_msgs/MarkerArray.h>
00024 
00025 namespace tango_3d_reconstruction_helper {
00026 const double TANGO_3DR_DEFAULT_RESOLUTION = 0.05; // meter
00027 const bool TANGO_3DR_DEFAULT_USE_SPACE_CLEARING = false;
00028 const int32_t TANGO_3DR_DEFAULT_MIN_NUM_VERTICES = 1; // Default value from TangoConfig
00029 const int32_t TANGO_3DR_DEFAULT_UPDATE_METHOD = 0; // TRAVERSAL_UPDATE
00030 const int32_t TANGO_3DR_DEFAULT_MAX_VOXEL_WEIGHT = 16383; // Default value from TangoConfig
00031 const double TANGO_3DR_DEFAULT_FLOORPLAN_MAX_ERROR = 0.; // meter
00032 // Default threshold to decide if a pixel value should correspond to a free or
00033 // occupied cell when converting the image of Tango 3D reconstruction to an
00034 // occupancy grid. Should be between 0 and 255:
00035 // pixel value <= threshold --> cell is free,
00036 // pixel value > threshold --> cell is occupied.
00037 const uint8_t TANGO_3DR_OCCUPANCY_GRID_DEFAULT_THRESHOLD = 180;
00038 
00039 const std::string TANGO_3DR_RESOLUTION_PARAM_NAME = "reconstruction/resolution_3d";
00040 const std::string TANGO_3DR_USE_SPACE_CLEARING_PARAM_NAME = "reconstruction/use_space_clearing";
00041 const std::string TANGO_3DR_MIN_NUM_VERTICES_PARAM_NAME = "reconstruction/min_num_vertices";
00042 const std::string TANGO_3DR_UPDATE_METHOD_PARAM_NAME = "reconstruction/update_method";
00043 const std::string TANGO_3DR_MAX_VOXEL_WEIGHT_PARAM_NAME = "reconstruction/max_voxel_weight";
00044 const std::string TANGO_3DR_FLOORPLAN_MAX_ERROR_PARAM_NAME = "reconstruction/floorplan_max_error";
00045 const std::string TANGO_3DR_OCCUPANCY_GRID_THRESHOLD_PARAM_NAME = "reconstruction/occupancy_grid_threshold";
00046 
00047 Tango3DR_Status TangoSetup3DRConfig(
00048     const ros::NodeHandle& node_handle, double* t3dr_resolution,
00049     Tango3DR_ReconstructionContext* t3dr_context,
00050     Tango3DR_CameraCalibration* t3dr_color_camera_intrinsics);
00051 
00052 void UpdateMesh(const Tango3DR_ReconstructionContext& t3dr_context,
00053                 TangoSupport_PointCloudManager* point_cloud_manager,
00054                 TangoSupport_ImageBufferManager* image_buffer_manager,
00055                 Tango3DR_Pose* last_camera_depth_pose,
00056                 Tango3DR_Pose* last_camera_color_pose,
00057                 Tango3DR_GridIndexArray* t3dr_updated_indices);
00058 
00059 void ExtractMeshAndConvertToMarkerArray(
00060     const Tango3DR_ReconstructionContext& t3dr_context,
00061     const Tango3DR_GridIndexArray& t3dr_updated_indices,
00062     double time_offset, const std::string& base_frame_id,
00063     visualization_msgs::MarkerArray* mesh_marker_array);
00064 
00065 bool ExtractFloorPlanImageAndConvertToOccupancyGrid(
00066     const Tango3DR_ReconstructionContext& t3dr_context,
00067     double time_offset, const std::string& base_frame_id,
00068     double t3dr_resolution, uint8_t threshold,
00069     nav_msgs::OccupancyGrid* occupancy_grid);
00070 
00071 } // namespace tango_3d_reconstruction_helper
00072 #endif  // TANGO_3D_RECONSTRUCTION_HELPER_H_


tango_ros_native
Author(s):
autogenerated on Thu Jun 6 2019 19:49:54