6 Commits

Author SHA1 Message Date
5ec478c8cd Merge branch 'develop' 2014-05-27 14:51:24 -04:30
1a2017a65f Merge branch 'develop' 2014-05-15 12:14:03 -04:30
daaace0d3f Merge branch 'develop' 2014-04-04 10:29:28 -04:30
7ac89881a3 Merge branch 'develop' 2014-03-14 15:18:39 -04:30
ed84d124d5 Merge branch 'develop' 2014-02-11 17:50:46 -04:30
33f3d7b7b9 Merge branch 'release-14.01.10' 2014-01-09 08:26:42 -04:30
62 changed files with 34 additions and 282 deletions

View File

@@ -16,8 +16,8 @@
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ve.ucv.ciens.ccg.nxtar" package="ve.ucv.ciens.ccg.nxtar"
android:versionCode="140716" android:versionCode="140527"
android:versionName="14.07.16" > android:versionName="14.05.27" >
<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19" /> <uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19" />
@@ -32,7 +32,7 @@
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<application <application
android:icon="@drawable/ic_nxtar_core_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:allowBackup="true"> android:label="@string/app_name" android:allowBackup="true">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"

View File

@@ -1,43 +1,4 @@
NxtAR: A generic software architecture for Augmented Reality based mobile robot control. NxtAR-android
======================================================================================== =============
Android backend module Modulo 2 de mi trabajo especial de grado.
----------------------
### Abstract ###
NxtAR is a generic software architecture for the development of Augmented Reality games
and applications centered around mobile robot control. This is a reference implementation
with support for [LEGO Mindstorms NXT][1] mobile robots.
### Module description ###
The Android backend module is a concrete [LibGDX][2] application that implements the operating
system dependent parts of the NxtAR reference implementation. It is based around the [OpenCV][3]
Computer Vision and Machine Learning library. Currently this module supports Android (>= 3.1)
devices though it has been tested only on Android (>= 4.0). The module includes direct support for
the [OUYA][4] gaming console and other devices using OUYA gamepads.
### Module installation and usage. ###
Install the NxtAR-core_XXXXXX.apk file on your device. To use you need additionally an Android (>= 3.0)
phone and a LEGO Mindstorms NXT robot with the [LejOS][5] firmware installed. The [NxtAR-cam][6] module must be
installed on the device and the [NxtAR-bot][7] module must be installed on the robot. Then, to start the compiled
scenario follow these steps:
* Start the NxtAR-core application.
* Start the NxtAR-bot program on the robot.
* Calibrate the robot's light sensor following the on-screen instructions.
* When the robot displays *"Waiting for connection"* start the NxtAR-cam application and connect it with the robot.
* Press the *"Start video streaming"* button on the NxtAR-cam application.
* Press the *"Calibrate camera"* button on the NxtAR-core application and point the camera of the device running NxtAR-cam to an OpenCV checkerboard camera calibration pattern.
The camera calibration step can be repeated if needed.
[1]: http://www.lego.com/en-us/mindstorms/?domainredir=mindstorms.lego.com
[2]: http://libgdx.badlogicgames.com/
[3]: http://opencv.org/
[4]: https://www.ouya.tv/
[5]: http://www.lejos.org/nxj.php
[6]: https://github.com/sagge-miky/NxtAR-cam
[7]: https://github.com/sagge-miky/NxtAR-bot

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,29 +0,0 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
varying vec2 v_texCoords;
void main(){
vec4 texColor = texture2D(u_texture, v_texCoords);
if(texColor.a > 0.0)
texColor.a = 0.5;
gl_FragColor = texColor;
}

View File

@@ -1,26 +0,0 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
uniform mat4 u_projTrans;
attribute vec4 a_position;
attribute vec2 a_texCoord0;
varying vec2 v_texCoords;
void main(){
v_texCoords = a_texCoord0;
gl_Position = u_projTrans * a_position;
}

View File

@@ -1,18 +1,3 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef GL_ES #ifdef GL_ES
precision mediump float; precision mediump float;
#endif #endif

View File

@@ -1,18 +1,3 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
uniform mat4 u_projTrans; uniform mat4 u_projTrans;
attribute vec4 a_position; attribute vec4 a_position;

View File

@@ -80,61 +80,17 @@ void main(){
#ifdef SKINNING #ifdef SKINNING
// Do the skinning. // Do the skinning.
mat4 bones0; mat4 bones[4];
mat4 bones1; bones[0] = u_bone0;
mat4 bones2; bones[1] = u_bone1;
mat4 bones3; bones[2] = u_bone2;
bones0 = u_bone0; bones[3] = u_bone3;
bones1 = u_bone1;
bones2 = u_bone2;
bones3 = u_bone3;
int index;
mat4 skinning = mat4(0.0); mat4 skinning = mat4(0.0);
skinning += (a_boneWeight0.y) * bones[int(a_boneWeight0.x)];
index = int(a_boneWeight0.x); skinning += (a_boneWeight1.y) * bones[int(a_boneWeight1.x)];
if(index == 0){ skinning += (a_boneWeight2.y) * bones[int(a_boneWeight2.x)];
skinning += (a_boneWeight0.y) * bones0; skinning += (a_boneWeight3.y) * bones[int(a_boneWeight3.x)];
}else if(index == 1){
skinning += (a_boneWeight0.y) * bones1;
}else if(index == 2){
skinning += (a_boneWeight0.y) * bones2;
}else if(index == 3){
skinning += (a_boneWeight0.y) * bones3;
}
index = int(a_boneWeight1.x);
if(index == 0){
skinning += (a_boneWeight1.y) * bones0;
}else if(index == 1){
skinning += (a_boneWeight1.y) * bones1;
}else if(index == 2){
skinning += (a_boneWeight1.y) * bones2;
}else if(index == 3){
skinning += (a_boneWeight1.y) * bones3;
}
index = int(a_boneWeight2.x);
if(index == 0){
skinning += (a_boneWeight2.y) * bones0;
}else if(index == 1){
skinning += (a_boneWeight2.y) * bones1;
}else if(index == 2){
skinning += (a_boneWeight2.y) * bones2;
}else if(index == 3){
skinning += (a_boneWeight2.y) * bones3;
}
index = int(a_boneWeight3.x);
if(index == 0){
skinning += (a_boneWeight3.y) * bones0;
}else if(index == 1){
skinning += (a_boneWeight3.y) * bones1;
}else if(index == 2){
skinning += (a_boneWeight3.y) * bones2;
}else if(index == 3){
skinning += (a_boneWeight3.y) * bones3;
}
// Transform the model. // Transform the model.
transformedPosition = u_geomTrans * skinning * a_position; transformedPosition = u_geomTrans * skinning * a_position;

View File

@@ -1,27 +0,0 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
uniform vec2 u_scaling;
varying vec2 v_texCoords;
void main(){
gl_FragColor = texture2D(u_texture, v_texCoords * u_scaling);
}

View File

@@ -1,27 +0,0 @@
/*
* Copyright (C) 2014 Miguel Angel Astor Romero
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
uniform mat4 u_projTrans;
uniform float u_displacement;
attribute vec4 a_position;
attribute vec2 a_texCoord0;
varying vec2 v_texCoords;
void main(){
v_texCoords = a_texCoord0 + u_displacement;
gl_Position = u_projTrans * a_position;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=STATIC #SHARED OPENCV_LIB_TYPE:=STATIC #SHARED
include C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\OpenCV.mk include C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\OpenCV.mk
#include C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\jni\OpenCV-tegra3.mk
LOCAL_MODULE := cvproc LOCAL_MODULE := cvproc
LOCAL_SRC_FILES := cv_proc.cpp marker.cpp LOCAL_SRC_FILES := cv_proc.cpp marker.cpp
@@ -30,62 +31,62 @@ include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_java LOCAL_MODULE := ocv_tegra_java
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libopencv_java.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libopencv_java.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_info LOCAL_MODULE := ocv_tegra_info
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libopencv_info.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libopencv_info.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_220 LOCAL_MODULE := ocv_tegra_native_camera_220
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r2.2.0.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r2.2.0.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_233 LOCAL_MODULE := ocv_tegra_native_camera_233
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r2.3.3.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r2.3.3.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_301 LOCAL_MODULE := ocv_tegra_native_camera_301
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r3.0.1.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r3.0.1.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_400 LOCAL_MODULE := ocv_tegra_native_camera_400
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.0.0.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.0.0.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_403 LOCAL_MODULE := ocv_tegra_native_camera_403
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.0.3.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.0.3.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_411 LOCAL_MODULE := ocv_tegra_native_camera_411
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.1.1.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.1.1.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ocv_tegra_native_camera_420 LOCAL_MODULE := ocv_tegra_native_camera_420
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.2.0.so LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.2.0.so
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_SHARED_LIBRARY)

View File

@@ -77,7 +77,7 @@ int hammDistMarker(cv::Mat);
cv::Mat rotate(cv::Mat); cv::Mat rotate(cv::Mat);
int decodeMarker(cv::Mat &, int &); int decodeMarker(cv::Mat &);
void renderMarkers(markers_vector &, cv::Mat &); void renderMarkers(markers_vector &, cv::Mat &);
@@ -92,11 +92,9 @@ void warpMarker(Marker &, cv::Mat &, cv::Mat &);
******************************************************************************/ ******************************************************************************/
void getAllMarkers(markers_vector & valid_markers, cv::Mat & img){ void getAllMarkers(markers_vector & valid_markers, cv::Mat & img){
int rotations = 0;
cv::Mat gray, thresh, cont, mark; cv::Mat gray, thresh, cont, mark;
contours_vector contours; contours_vector contours;
markers_vector markers; markers_vector markers;
cv::Point2f point;
#ifdef DESKTOP #ifdef DESKTOP
std::ostringstream oss; std::ostringstream oss;
#endif #endif
@@ -118,32 +116,10 @@ void getAllMarkers(markers_vector & valid_markers, cv::Mat & img){
for(int i = 0; i < markers.size(); i++){ for(int i = 0; i < markers.size(); i++){
warpMarker(markers[i], gray, mark); warpMarker(markers[i], gray, mark);
int code = decodeMarker(mark, rotations); int code = decodeMarker(mark);
if(code != -1){ if(code != -1){
markers[i].code = code; markers[i].code = code;
// If the decoder detected the marker is rotated then reorder the points
// so that the orientation calculations always use the correct top of the marker.
if(rotations > 0){
while(rotations > 0){
for(int r = 0; r < 1; r++){
point = markers[i].points.at(markers[i].points.size() - 1);
markers[i].points.pop_back();
markers[i].points.insert(markers[i].points.begin(), point);
}
rotations--;
}
}
// Rotate 180 degrees.
for(int r = 0; r < 2; r++){
point = markers[i].points.at(markers[i].points.size() - 1);
markers[i].points.pop_back();
markers[i].points.insert(markers[i].points.begin(), point);
}
valid_markers.push_back(markers[i]); valid_markers.push_back(markers[i]);
} }
} }
@@ -458,13 +434,11 @@ cv::Mat rotate(cv::Mat in){
* Decode a marker image and return it's code. Returns -1 if the image is * Decode a marker image and return it's code. Returns -1 if the image is
* not a valid marker. * not a valid marker.
*/ */
int decodeMarker(cv::Mat & marker, int & rotations){ int decodeMarker(cv::Mat & marker){
bool found = false; bool found = false;
int code = 0; int code = 0;
cv::Mat bits; cv::Mat bits;
rotations = 0;
// Verify that the outer rim of marker cells are all black. // Verify that the outer rim of marker cells are all black.
for(int y = 0; y < 7; y++){ for(int y = 0; y < 7; y++){
int inc = (y == 0 || y == 6) ? 1 : 6; int inc = (y == 0 || y == 6) ? 1 : 6;
@@ -504,7 +478,6 @@ int decodeMarker(cv::Mat & marker, int & rotations){
if(hammDistMarker(bits) != 0){ if(hammDistMarker(bits) != 0){
for(int r = 1; r < 4; r++){ for(int r = 1; r < 4; r++){
bits = rotate(bits); bits = rotate(bits);
rotations++;
if(hammDistMarker(bits) != 0) continue; if(hammDistMarker(bits) != 0) continue;
else{ found = true; break;} else{ found = true; break;}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
--> -->
<resources> <resources>
<string name="app_name">NxtAR-core</string> <string name="app_name">NxtAR</string>
<string name="ocv_failed">Error al inicializar OpenCV</string> <string name="ocv_failed">No se pudo inicializar OpenCV</string>
<string name="ocv_success">OpenCV inicializado con éxito</string> <string name="ocv_success">OpenCV inicializado con exito</string>
</resources> </resources>

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
--> -->
<resources> <resources>
<string name="app_name">NxtAR-core</string> <string name="app_name">NxtAR</string>
<string name="ocv_failed">Failed to initialize OpenCV</string> <string name="ocv_failed">Failed to initialize OpenCV</string>
<string name="ocv_success">OpenCV initialized successfully</string> <string name="ocv_success">OpenCV initialized successfully</string>
</resources> </resources>

View File

@@ -231,8 +231,8 @@ public class MainActivity extends AndroidApplication implements ActionResolver,
// Configure LibGDX. // Configure LibGDX.
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
cfg.useAccelerometer = true; cfg.useAccelerometer = false;
cfg.useCompass = true; cfg.useCompass = false;
cfg.useWakelock = true; cfg.useWakelock = true;
// Launch the LibGDX core game class. // Launch the LibGDX core game class.