Skip to content

Commit

Permalink
Merge pull request #363 from Intermodalics/feature/update_to_support_…
Browse files Browse the repository at this point in the history
…tango_m20

Feature/update to support tango m20
  • Loading branch information
Perrine Aguiar authored Aug 11, 2017
2 parents 50d78db + e37895a commit fb7b64a
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

#include <glog/logging.h>
#include <tango_client_api/tango_client_api.h>
#include <tango_support_api/tango_support_api.h>
#include <tango_support/tango_support.h>

namespace tango_helper {
bool IsTangoVersionOk(JNIEnv* env, jobject activity) {
int version;
TangoErrorType result = TangoSupport_GetTangoVersion(env, activity, &version);
TangoErrorType result = TangoSupport_getTangoVersion(env, activity, &version);
if (result != TANGO_SUCCESS || version < TANGO_CORE_MINIMUM_VERSION) {
LOG(ERROR) << "Tango Core version is out of "
"date, minimum version required: " << TANGO_CORE_MINIMUM_VERSION <<
Expand Down
4 changes: 2 additions & 2 deletions tango_ros_common/tango_ros_native/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LOCAL_CFLAGS += -O2 --std=c++11 -pthread -fPIC -fexceptions -frtti -Wunused-par
LOCAL_LDLIBS += -landroid -lm -llog -lz
LOCAL_WHOLE_STATIC_LIBRARIES := libimage_transport_plugins libcompressed_image_transport
LOCAL_STATIC_LIBRARIES += roscpp_android_ndk miniglog
LOCAL_SHARED_LIBRARIES := tango_3d_reconstruction tango_client_api tango_support_api
LOCAL_SHARED_LIBRARIES := tango_3d_reconstruction tango_client_api tango_support
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include ${LOCAL_PATH}/../tango_ros_messages/include
LOCAL_DISABLE_FATAL_LINKER_WARNINGS=true
include $(BUILD_STATIC_LIBRARY)
Expand All @@ -21,4 +21,4 @@ $(call import-module,miniglog)
$(call import-add-path, $(PROJECT_ROOT)/../third_party/tango_api)
$(call import-module,tango_3d_reconstruction)
$(call import-module,tango_client_api)
$(call import-module,tango_support_api)
$(call import-module,tango_support)
4 changes: 2 additions & 2 deletions tango_ros_common/tango_ros_native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find_package(catkin REQUIRED COMPONENTS
tango_3d_reconstruction
tango_client_api
tango_ros_messages
tango_support_api
tango_support
tf
tf2_geometry_msgs
tf2_ros
Expand All @@ -34,7 +34,7 @@ generate_dynamic_reconfigure_options(

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS dynamic_reconfigure glog_catkin image_geometry image_transport roscpp sensor_msgs tango_3d_reconstruction tango_client_api tango_ros_messages tango_support_api tf tf2_geometry_msgs tf2_ros
CATKIN_DEPENDS dynamic_reconfigure glog_catkin image_geometry image_transport roscpp sensor_msgs tango_3d_reconstruction tango_client_api tango_ros_messages tango_support tf tf2_geometry_msgs tf2_ros
LIBRARIES tango_ros_native
DEPENDS OpenCV
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <string>

#include <tango_3d_reconstruction/tango_3d_reconstruction_api.h>
#include <tango_support_api/tango_support_api.h>
#include <tango_support/tango_support.h>

#include <nav_msgs/OccupancyGrid.h>
#include <ros/ros.h>
Expand Down Expand Up @@ -50,11 +50,11 @@ Tango3DR_Status TangoSetup3DRConfig(
Tango3DR_CameraCalibration* t3dr_color_camera_intrinsics);

void UpdateMesh(const Tango3DR_ReconstructionContext& t3dr_context,
TangoSupportPointCloudManager* point_cloud_manager,
TangoSupportImageBufferManager* image_buffer_manager,
Tango3DR_Pose* last_camera_depth_pose,
Tango3DR_Pose* last_camera_color_pose,
Tango3DR_GridIndexArray* t3dr_updated_indices);
TangoSupport_PointCloudManager* point_cloud_manager,
TangoSupport_ImageBufferManager* image_buffer_manager,
Tango3DR_Pose* last_camera_depth_pose,
Tango3DR_Pose* last_camera_color_pose,
Tango3DR_GridIndexArray* t3dr_updated_indices);

void ExtractMeshAndConvertToMarkerArray(
const Tango3DR_ReconstructionContext& t3dr_context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define TANGO_ROS_CONVERSIONS_HELPER_H_
#include <tango_3d_reconstruction/tango_3d_reconstruction_api.h>
#include <tango_client_api/tango_client_api.h>
#include <tango_support_api/tango_support_api.h>
#include <tango_support/tango_support.h>

#include <geometry_msgs/TransformStamped.h>
#include <nav_msgs/OccupancyGrid.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <tango_3d_reconstruction/tango_3d_reconstruction_api.h>
#include <tango_client_api/tango_client_api.h>
#include <tango_support_api/tango_support_api.h>
#include <tango_support/tango_support.h>

#include <opencv2/core/core.hpp>

Expand Down Expand Up @@ -283,9 +283,9 @@ class TangoRosNode : public ::nodelet::Nodelet {
// Context for a 3D Reconstruction. Maintains the state of a single
// mesh being reconstructed.
Tango3DR_ReconstructionContext t3dr_context_;
TangoSupportPointCloudManager* point_cloud_manager_;
TangoSupport_PointCloudManager* point_cloud_manager_;
Tango3DR_Pose last_camera_depth_pose_;
TangoSupportImageBufferManager* image_buffer_manager_;
TangoSupport_ImageBufferManager* image_buffer_manager_;
Tango3DR_Pose last_camera_color_pose_;
Tango3DR_CameraCalibration t3dr_color_camera_intrinsics_;
double t3dr_resolution_;
Expand Down
4 changes: 2 additions & 2 deletions tango_ros_common/tango_ros_native/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<build_depend>tango_3d_reconstruction</build_depend>
<build_depend>tango_client_api</build_depend>
<build_depend>tango_ros_messages</build_depend>
<build_depend>tango_support_api</build_depend>
<build_depend>tango_support</build_depend>
<build_depend>tf</build_depend>
<build_depend>tf2_geometry_msgs</build_depend>
<build_depend>tf2_ros</build_depend>
Expand All @@ -43,7 +43,7 @@
<run_depend>tango_3d_reconstruction</run_depend>
<run_depend>tango_client_api</run_depend>
<run_depend>tango_ros_messages</run_depend>
<run_depend>tango_support_api</run_depend>
<run_depend>tango_support</run_depend>
<run_depend>tf</run_depend>
<run_depend>tf2_geometry_msgs</run_depend>
<run_depend>tf2_ros</run_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ Tango3DR_Status TangoSetup3DRConfig(
}

void UpdateMesh(const Tango3DR_ReconstructionContext& t3dr_context,
TangoSupportPointCloudManager* const point_cloud_manager,
TangoSupportImageBufferManager* const image_buffer_manager,
Tango3DR_Pose* last_camera_depth_pose,
Tango3DR_Pose* last_camera_color_pose,
Tango3DR_GridIndexArray* t3dr_updated_indices) {
TangoSupport_PointCloudManager* point_cloud_manager,
TangoSupport_ImageBufferManager* image_buffer_manager,
Tango3DR_Pose* last_camera_depth_pose,
Tango3DR_Pose* last_camera_color_pose,
Tango3DR_GridIndexArray* t3dr_updated_indices) {
// Get latest point cloud.
TangoPointCloud* last_point_cloud;
TangoSupport_getLatestPointCloud(point_cloud_manager, &last_point_cloud);
Expand All @@ -152,11 +152,11 @@ void UpdateMesh(const Tango3DR_ReconstructionContext& t3dr_context,
t3dr_image.data = last_color_image_buffer->data;
// Get updated mesh segment indices.
Tango3DR_Status result =
Tango3DR_update(t3dr_context, &t3dr_depth, last_camera_depth_pose,
Tango3DR_updateFromPointCloud(t3dr_context, &t3dr_depth, last_camera_depth_pose,
&t3dr_image, last_camera_color_pose,
t3dr_updated_indices);
if (result != TANGO_3DR_SUCCESS) {
LOG(ERROR) << "Tango3DR_update failed with error code "
LOG(ERROR) << "Tango3DR_updateFromPointCloud failed with error code "
<< result;
}
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/tango_api/tango-examples-c
Submodule tango-examples-c updated 93 files
+2 −2 cpp_augmented_reality_example/app/src/main/jni/Android.mk
+6 −16 cpp_augmented_reality_example/app/src/main/jni/augmented_reality_app.cc
+1 −1 cpp_augmented_reality_example/app/src/main/jni/scene.cc
+1 −1 ...a_description/src/main/java/com/projecttango/examples/cpp/helloareadescription/AreaDescriptionActivity.java
+2 −2 cpp_basic_examples/hello_area_description/src/main/jni/Android.mk
+2 −2 cpp_basic_examples/hello_area_description/src/main/jni/hello_area_description_app.cc
+2 −2 cpp_basic_examples/hello_depth_perception/src/main/jni/Android.mk
+2 −2 cpp_basic_examples/hello_depth_perception/src/main/jni/hello_depth_perception/hello_depth_perception_app.h
+2 −2 cpp_basic_examples/hello_depth_perception/src/main/jni/hello_depth_perception_app.cc
+2 −2 cpp_basic_examples/hello_motion_tracking/src/main/jni/Android.mk
+2 −2 cpp_basic_examples/hello_motion_tracking/src/main/jni/hello_motion_tracking/tango_handler.h
+1 −1 cpp_basic_examples/hello_motion_tracking/src/main/jni/tango_handler.cc
+2 −2 cpp_basic_examples/hello_video/src/main/jni/Android.mk
+1 −1 cpp_basic_examples/hello_video/src/main/jni/hello_video/hello_video_app.h
+3 −3 cpp_basic_examples/hello_video/src/main/jni/hello_video_app.cc
+ cpp_marker_detection_example/app/src/main/assets/earth.png
+ cpp_marker_detection_example/app/src/main/assets/moon.png
+4 −3 cpp_marker_detection_example/app/src/main/jni/Android.mk
+12 −28 cpp_marker_detection_example/app/src/main/jni/marker_detection_app.cc
+173 −0 cpp_marker_detection_example/app/src/main/jni/marker_object.cc
+0 −71 cpp_marker_detection_example/app/src/main/jni/mesh_object.cc
+19 −42 cpp_marker_detection_example/app/src/main/jni/scene.cc
+3 −4 cpp_marker_detection_example/app/src/main/jni/tango-marker-detection/marker_detection_app.h
+76 −0 cpp_marker_detection_example/app/src/main/jni/tango-marker-detection/marker_object.h
+0 −81 cpp_marker_detection_example/app/src/main/jni/tango-marker-detection/mesh_object.h
+4 −7 cpp_marker_detection_example/app/src/main/jni/tango-marker-detection/scene.h
+ cpp_marker_detection_example/app/src/main/res/drawable-xxhdpi/ic_launcher.png
+ cpp_marker_detection_example/ar_markers.pdf
+2 −2 cpp_mesh_builder_example/app/src/main/jni/Android.mk
+2 −2 cpp_mesh_builder_example/app/src/main/jni/mesh_builder/mesh_builder_app.h
+13 −11 cpp_mesh_builder_example/app/src/main/jni/mesh_builder_app.cc
+1 −1 cpp_mesh_builder_example/app/src/main/jni/scene.cc
+ cpp_mesh_builder_example/app/src/main/res/drawable-xxhdpi/ic_launcher.png
+2 −2 cpp_motion_tracking_example/app/src/main/jni/Android.mk
+3 −3 cpp_motion_tracking_example/app/src/main/jni/motion_tracking_app.cc
+1 −1 cpp_motion_tracking_example/app/src/main/jni/scene.cc
+2 −2 cpp_motion_tracking_example/app/src/main/jni/tango-motion-tracking/motion_tracking_app.h
+2 −2 cpp_plane_fitting_example/app/src/main/jni/Android.mk
+11 −46 cpp_plane_fitting_example/app/src/main/jni/plane_fitting_application.cc
+1 −1 cpp_plane_fitting_example/app/src/main/jni/tango-plane-fitting/plane_fitting.h
+2 −11 cpp_plane_fitting_example/app/src/main/jni/tango-plane-fitting/plane_fitting_application.h
+ cpp_plane_fitting_example/app/src/main/res/drawable-xxhdpi/ic_launcher.png
+1 −1 cpp_point_cloud_example/app/src/main/java/com/projecttango/examples/cpp/pointcloud/TangoJNINative.java
+3 −2 cpp_point_cloud_example/app/src/main/jni/Android.mk
+9 −8 cpp_point_cloud_example/app/src/main/jni/point_cloud_app.cc
+3 −3 cpp_point_cloud_example/app/src/main/jni/tango-point-cloud/point_cloud_app.h
+ cpp_point_cloud_example/app/src/main/res/drawable-xxhdpi/ic_launcher.png
+4 −2 cpp_point_to_point_example/app/src/main/jni/Android.mk
+27 −31 cpp_point_to_point_example/app/src/main/jni/point_to_point_application.cc
+6 −5 cpp_point_to_point_example/app/src/main/jni/tango-point-to-point/point_to_point_application.h
+2 −2 cpp_rgb_depth_sync_example/app/src/main/jni/Android.mk
+4 −4 cpp_rgb_depth_sync_example/app/src/main/jni/camera_texture_drawable.cc
+2 −2 cpp_rgb_depth_sync_example/app/src/main/jni/rgb-depth-sync/camera_texture_drawable.h
+3 −3 cpp_rgb_depth_sync_example/app/src/main/jni/rgb-depth-sync/rgb_depth_sync_application.h
+2 −2 cpp_rgb_depth_sync_example/app/src/main/jni/rgb-depth-sync/scene.h
+4 −3 cpp_rgb_depth_sync_example/app/src/main/jni/rgb_depth_sync_application.cc
+1 −1 cpp_rgb_depth_sync_example/app/src/main/jni/scene.cc
+2 −2 cpp_video_stabilization_experiment/app/src/main/jni/Android.mk
+1 −1 cpp_video_stabilization_experiment/app/src/main/jni/scene.cc
+2 −2 cpp_video_stabilization_experiment/app/src/main/jni/tango-video-stabilization/scene.h
+2 −2 cpp_video_stabilization_experiment/app/src/main/jni/tango-video-stabilization/video_stabilization_app.h
+3 −3 cpp_video_stabilization_experiment/app/src/main/jni/video_stabilization_app.cc
+ cpp_video_stabilization_experiment/app/src/main/res/drawable-xxhdpi/ic_launcher.png
+150 −49 tango_3d_reconstruction/include/tango_3d_reconstruction_api.h
+ tango_3d_reconstruction/lib/arm64-v8a/libtango_3d_reconstruction.so
+ tango_3d_reconstruction/lib/armeabi-v7a/libtango_3d_reconstruction.so
+19 −17 tango_client_api/include/tango_client_api.h
+ tango_client_api/lib/arm64-v8a/libtango_client_api.so
+ tango_client_api/lib/armeabi-v7a/libtango_client_api.so
+37 −0 tango_depth_interpolation/Android.mk
+229 −0 tango_depth_interpolation/include/tango_depth_interpolation.h
+ tango_depth_interpolation/lib/arm64-v8a/libtango_depth_interpolation.so
+ tango_depth_interpolation/lib/armeabi-v7a/libtango_depth_interpolation.so
+37 −0 tango_geometry_detection/Android.mk
+252 −0 tango_geometry_detection/include/tango_geometry_detection.h
+ tango_geometry_detection/lib/arm64-v8a/libtango_geometry_detection.so
+ tango_geometry_detection/lib/armeabi-v7a/libtango_geometry_detection.so
+5 −5 tango_gl/include/tango-gl/util.h
+5 −5 tango_gl/include/tango-gl/video_overlay.h
+10 −9 tango_gl/src/util.cc
+5 −5 tango_gl/src/video_overlay.cc
+4 −4 tango_markers/Android.mk
+134 −0 tango_markers/include/tango_markers.h
+ tango_markers/lib/arm64-v8a/libtango_markers.so
+ tango_markers/lib/armeabi-v7a/libtango_markers.so
+37 −0 tango_support/Android.mk
+633 −0 tango_support/include/tango_support.h
+ tango_support/lib/arm64-v8a/libtango_support.so
+ tango_support/lib/armeabi-v7a/libtango_support.so
+37 −0 tango_transform_helpers/Android.mk
+149 −0 tango_transform_helpers/include/tango_transform_helpers.h
+ tango_transform_helpers/lib/arm64-v8a/libtango_transform_helpers.so
+ tango_transform_helpers/lib/armeabi-v7a/libtango_transform_helpers.so
1 change: 1 addition & 0 deletions third_party/tango_api/tango_support/Android.mk
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cmake_minimum_required(VERSION 2.8.3)
project(tango_support_api)
project(tango_support)

find_package(catkin REQUIRED tango_client_api)
find_package(JNI REQUIRED)

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS tango_client_api
LIBRARIES tango_support_api
LIBRARIES tango_support
)

include_directories(
Expand All @@ -16,15 +16,15 @@ include_directories(
${catkin_INCLUDE_DIRS}
)

add_library(tango_support_api
src/tango_support_api.cpp
add_library(tango_support
src/tango_support.cpp
)

target_link_libraries(tango_support_api
target_link_libraries(tango_support
${catkin_LIBRARIES}
)

install(TARGETS tango_support_api
install(TARGETS tango_support
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand Down
1 change: 1 addition & 0 deletions third_party/tango_api/tango_support/lib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package>
<name>tango_support_api</name>
<name>tango_support</name>
<version>0.0.0</version>
<description>Single-header tango_support_api library.</description>
<description>Single-header tango_support library.</description>
<license>Apache</license>

<maintainer email="tango-help@google.com"> </maintainer>
Expand Down
1 change: 1 addition & 0 deletions third_party/tango_api/tango_support/src/tango_support.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "tango_support/tango_support.h"
1 change: 0 additions & 1 deletion third_party/tango_api/tango_support_api/Android.mk

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion third_party/tango_api/tango_support_api/lib

This file was deleted.

This file was deleted.

0 comments on commit fb7b64a

Please sign in to comment.