From e1c12fbd8b10db4b2fd1956ef330fe25dffed139 Mon Sep 17 00:00:00 2001 From: yzrobot Date: Mon, 12 Aug 2019 18:26:46 +0200 Subject: [PATCH] catkin package --- CMakeLists.txt | 37 ++++---------- Makefile | 1 - README.md | 4 +- joystick_remapper.launch | 12 ----- launch/joystick_remapper.launch | 15 ++++++ mainpage.dox | 50 ------------------- manifest.xml | 19 ------- package.xml | 18 +++++++ .../joystick_remapper.py | 0 9 files changed, 45 insertions(+), 111 deletions(-) delete mode 100644 Makefile delete mode 100644 joystick_remapper.launch create mode 100644 launch/joystick_remapper.launch delete mode 100644 mainpage.dox delete mode 100644 manifest.xml create mode 100644 package.xml rename joystick_remapper.py => scripts/joystick_remapper.py (100%) mode change 100644 => 100755 diff --git a/CMakeLists.txt b/CMakeLists.txt index f8f1c9c..9ad4beb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,30 +1,11 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) +cmake_minimum_required(VERSION 2.8.3) +project(joystick_remapper) -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) +find_package(catkin REQUIRED COMPONENTS + rospy + sensor_msgs +) -rosbuild_init() - -#set the default path for built executables to the "bin" directory -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -#set the default path for built libraries to the "lib" directory -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) - -#uncomment if you have defined messages -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() - -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) +catkin_package( + CATKIN_DEPENDS rospy sensor_msgs +) diff --git a/Makefile b/Makefile deleted file mode 100644 index b75b928..0000000 --- a/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/README.md b/README.md index 0a230b4..02ff016 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# joystick_remapper \ No newline at end of file +# joystick_remapper + +http://wiki.ros.org/joystick_remapper/Tutorials/UsingJoystickRemapper \ No newline at end of file diff --git a/joystick_remapper.launch b/joystick_remapper.launch deleted file mode 100644 index 37d0af7..0000000 --- a/joystick_remapper.launch +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/launch/joystick_remapper.launch b/launch/joystick_remapper.launch new file mode 100644 index 0000000..5907fc8 --- /dev/null +++ b/launch/joystick_remapper.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/mainpage.dox b/mainpage.dox deleted file mode 100644 index 3a8ce3a..0000000 --- a/mainpage.dox +++ /dev/null @@ -1,50 +0,0 @@ -/** -\mainpage -\htmlinclude manifest.html - -\b joystick_remapper contains a node that can be used to remap a joystick's buttons for ROS publishing. Different types of joystick often use different button numbers for different positions on the joystick. After remapping, any "weird" joysticks could be remapped to the default joystick settings, or all joysticks could be remapped to any other configuration. - -
- -\subsection joystick_remapper joystick_remapper - -\b joystick_remapper maps a joystick output from one topic to another, and can change buttons and axis mappings. The button and axis mappings are set as private parameters to the node. The input/output topics should be remapped by the user. - -This example shows how a Logitech joystick can be remapped to have the same button mappings as a PS3 joystick. (Only buttons relavent for controlling the PR2 have been remapped). -\verbatim - - - - - - - - - - -\endverbatim - -Remapping parameters are given as strings, with each value in the string giving the new axis or button number. For example: - -\verbatim -2 3 0 1 -\endverbatim -Maps button (or axis) 2 to output button 0, 3->1, 0->2 and 1->3. Any axis or buttons that are not remapped are left in original order. Note that axes and button indices start from zero. - -If "=" is given as the remapping parameter, or none is given, the joystick buttons or axes are not remapped. - -\subsubsection topic ROS topics - -Subscribes to (name / type): -- joy_source/Joy : Joystick source. Should be remapped appropriately. - -Publishes to (name / type): -- joy_dest/Joy : Joystick output. Should be remapped appropriately. - -\subsubsection params ROS parameters -- \b "~button_mapping" str : Mappings of joystick buttons. -- \b "~axis_mapping" str : Mappings of joystick axes - - - -*/ \ No newline at end of file diff --git a/manifest.xml b/manifest.xml deleted file mode 100644 index 8c26d2f..0000000 --- a/manifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - This node can be used to remap the buttons and axes of a joystick to - get them into a standard form that other nodes can then use - independently of which joystick is actually being used. - - Blaise Gassend - BSD - - http://ros.org/wiki/joystick_remapper - - - - - - - - - diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..2434fb2 --- /dev/null +++ b/package.xml @@ -0,0 +1,18 @@ + + + joystick_remapper + 0.0.1 + This node can be used to remap the buttons and axes of a joystick to get them into a standard form that other nodes can then use independently of which joystick is actually being used. + Blaise Gassend + Thomas Duvinage + BSD + + catkin + + rospy + sensor_msgs + + rospy + sensor_msgs + joy + diff --git a/joystick_remapper.py b/scripts/joystick_remapper.py old mode 100644 new mode 100755 similarity index 100% rename from joystick_remapper.py rename to scripts/joystick_remapper.py