Skip to content

Commit

Permalink
added definitions with structure compatible with catkin/rosmod
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwatkins committed Aug 16, 2017
1 parent 94c1e66 commit 29a4ee2
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8.3)
project(definitions)

## Start Global Marker

## End Global Marker

## Check C++11 / C++0x
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "-std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "-std=c++0x")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

include_directories(.)
77 changes: 77 additions & 0 deletions src/definitions/include/definitions/definitions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
enum class DS4 : int {
LEFT_ANALOG_X = 0,
LEFT_ANALOG_Y = 1,
RIGHT_ANALOG_X = 2,
RIGHT_ANALOG_Y = 3,
L2_ANALOG = 4,
R2_ANALOG = 5,
DPAD_UP = 6,
DPAD_DOWN = 7,
DPAD_LEFT = 8,
DPAD_RIGHT = 9,
BUTTON_CROSS = 10,
BUTTON_CIRCLE = 11,
BUTTON_SQUARE = 12,
BUTTON_TRIANGLE = 13,
BUTTON_L1 = 14,
BUTTON_L2 = 15,
BUTTON_L3 = 16,
BUTTON_R1 = 17,
BUTTON_R2 = 18,
BUTTON_R3 = 19,
BUTTON_SHARE = 20,
BUTTON_OPTIONS = 21,
BUTTON_TRACKPAD =22,
BUTTON_PS = 23,
MOTION_Y = 24,
MOTION_X = 25,
MOTION_Z = 26,
ORIENTATION_ROLL = 27,
ORIENTATION_YAW = 28,
ORIENTATION_PITCH = 29,
TRACKPAD_TOUCH0_ID = 30,
TRACKPAD_TOUCH0_ACTIVE = 31,
TRACKPAD_TOUCH0_X = 32,
TRACKPAD_TOUCH0_Y = 33,
TRACKPAD_TOUCH1_ID = 34,
TRACKPAD_TOUCH1_ACTIVE = 35,
TRACKPAD_TOUCH1_X = 36,
TRACKPAD_TOUCH_Y = 37,
TIMESTAMP = 38,
BATTERY = 39,
PLUG_USB = 40,
PLUG_AUDIO = 41,
PLUG_MIC = 42
};

enum class QUATERNION : int {
W = 0,
X = 1,
Y = 2,
Z = 3
};

enum class VECTOR : int {
X = 0,
Y = 1,
Z = 2
};

enum class UNITY_QUATERNION : int {
X = 0,
Y = 1,
Z = 2,
W = 3
};

enum class UNITY_VECTOR : int {
X = 0,
Y = 1,
Z = 2
};

enum class PID : int {
KP = 0,
KD = 1,
KI = 2
};
19 changes: 19 additions & 0 deletions src/definitions/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<package>
<name>definitions</name>
<version>0.0.0</version>
<description>The defintions package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="dexter.a.watkins@vanderbilt.edu">Dexter Watkins</maintainer>

<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>MIT</license>
<buildtool_depend>catkin</buildtool_depend>
<export>
</export>
</package>
Binary file added src/lib-definitions.zip
Binary file not shown.

0 comments on commit 29a4ee2

Please sign in to comment.