diff --git a/.gitignore b/.gitignore index 8b4d2f3d1dd56c435c2034481b9f8e5b2af0a8e4..47d7e8668a818bb6c8bc9664772af85c5175d1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,33 @@ pps_ws/build/ pps_ws/devel/ pps_ws/src/CMakeLists.txt + +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpstack.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/radiodriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/exceptions.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpdriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/usbdriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/udpdriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/debugdriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/serialdriver.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/platformservice.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/param.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/commander.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/log.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/console.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toccache.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/mem.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toc.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/crazyradio.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/cfusb.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/utils/callbacks.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/utils/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/boottypes.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/__init__.pyc +./pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/cloader.pyc +./pps_ws/src/d_fall_pps/crazyradio/leapsdk/__init__.pyc + diff --git a/pps_ws/src/d_fall_gui/CMakeLists.txt b/pps_ws/src/d_fall_gui/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e291b71a36414d1f870d39692b74801e1a8c4ff --- /dev/null +++ b/pps_ws/src/d_fall_gui/CMakeLists.txt @@ -0,0 +1,199 @@ +cmake_minimum_required(VERSION 2.8.3) +project(d_fall_gui) + +## Add support for C++11, supported in ROS Kinetic and newer +# add_definitions(-std=c++11) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED COMPONENTS + roscpp + rospy + std_msgs +) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend tag for "message_generation" +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependency has been pulled in +## but can be declared for certainty nonetheless: +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs +# ) + +################################################ +## Declare ROS dynamic reconfigure parameters ## +################################################ + +## To declare and build dynamic reconfigure parameters within this +## package, follow these steps: +## * In the file package.xml: +## * add a build_depend and a run_depend tag for "dynamic_reconfigure" +## * In this file (CMakeLists.txt): +## * add "dynamic_reconfigure" to +## find_package(catkin REQUIRED COMPONENTS ...) +## * uncomment the "generate_dynamic_reconfigure_options" section below +## and list every .cfg file to be processed + +## Generate dynamic reconfigure parameters in the 'cfg' folder +# generate_dynamic_reconfigure_options( +# cfg/DynReconf1.cfg +# cfg/DynReconf2.cfg +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES d_fall_gui +# CATKIN_DEPENDS roscpp rospy std_msgs +# DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +# include_directories(include) +include_directories( + ${catkin_INCLUDE_DIRS} +) + +## Declare a C++ library +# add_library(${PROJECT_NAME} +# src/${PROJECT_NAME}/d_fall_gui.cpp +# ) + +## Add cmake target dependencies of the library +## as an example, code may need to be generated before libraries +## either from message generation or dynamic reconfigure +# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Declare a C++ executable +## With catkin_make all packages are built within a single CMake context +## The recommended prefix ensures that target names across packages don't collide +# add_executable(${PROJECT_NAME}_node src/d_fall_gui_node.cpp) + +## Rename C++ executable without prefix +## The above recommended prefix causes long target names, the following renames the +## target back to the shorter version for ease of user use +## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" +# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") + +## Add cmake target dependencies of the executable +## same as for the library above +# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Specify libraries to link a library or executable target against +# target_link_libraries(${PROJECT_NAME}_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_d_fall_gui.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/pps_ws/src/d_fall_gui/package.xml b/pps_ws/src/d_fall_gui/package.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe725eedbacd8e466e5e27fa4b61fb9828a1b1bd --- /dev/null +++ b/pps_ws/src/d_fall_gui/package.xml @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<package> + <name>d_fall_gui</name> + <version>0.0.0</version> + <description>The d_fall_gui package</description> + + <!-- One maintainer tag required, multiple allowed, one person per tag --> + <!-- Example: --> + <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> + <maintainer email="crazyflie@todo.todo">crazyflie</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>TODO</license> + + + <!-- Url tags are optional, but multiple are allowed, one per tag --> + <!-- Optional attribute type can be: website, bugtracker, or repository --> + <!-- Example: --> + <!-- <url type="website">http://wiki.ros.org/d_fall_gui</url> --> + + + <!-- Author tags are optional, multiple are allowed, one per tag --> + <!-- Authors do not have to be maintainers, but could be --> + <!-- Example: --> + <!-- <author email="jane.doe@example.com">Jane Doe</author> --> + + + <!-- The *_depend tags are used to specify dependencies --> + <!-- Dependencies can be catkin packages or system dependencies --> + <!-- Examples: --> + <!-- Use build_depend for packages you need at compile time: --> + <!-- <build_depend>message_generation</build_depend> --> + <!-- Use buildtool_depend for build tool packages: --> + <!-- <buildtool_depend>catkin</buildtool_depend> --> + <!-- Use run_depend for packages you need at runtime: --> + <!-- <run_depend>message_runtime</run_depend> --> + <!-- Use test_depend for packages you need only for testing: --> + <!-- <test_depend>gtest</test_depend> --> + <buildtool_depend>catkin</buildtool_depend> + <build_depend>roscpp</build_depend> + <build_depend>rospy</build_depend> + <build_depend>std_msgs</build_depend> + <run_depend>roscpp</run_depend> + <run_depend>rospy</run_depend> + <run_depend>std_msgs</run_depend> + + + <!-- The export tag contains other, unspecified, tags --> + <export> + <!-- Other tools can request additional information be placed here --> + + </export> +</package> diff --git a/pps_ws/src/d_fall_pps/CMakeLists.txt b/pps_ws/src/d_fall_pps/CMakeLists.txt index 0550d2dc9c9f84ecbb5e9aa9cfdb3529cb542dde..e8cc07f1936cba7c48e33c96daec53baec72de24 100644 --- a/pps_ws/src/d_fall_pps/CMakeLists.txt +++ b/pps_ws/src/d_fall_pps/CMakeLists.txt @@ -62,6 +62,8 @@ add_message_files( AngleCommand.msg RateCommand.msg Setpoint.msg + CrazyflieContext.msg + AreaBounds.msg ) ## Generate services in the 'srv' folder @@ -75,6 +77,7 @@ add_service_files( MotorController.srv AngleController.srv RateController.srv + CentralManager.srv ) ## Generate actions in the 'action' folder @@ -159,6 +162,7 @@ include_directories( add_executable(ViconDataPublisher src/ViconDataPublisher.cpp) add_executable(PPSClient src/PPSClient.cpp) add_executable(SafeControllerService src/SafeControllerService.cpp) +add_executable(CentralManagerService src/CentralManagerService.cpp) ## Rename C++ executable without prefix ## The above recommended prefix causes long target names, the following renames the @@ -184,6 +188,8 @@ target_link_libraries(PPSClient ${catkin_LIBRARIES}) target_link_libraries(SafeControllerService ${catkin_LIBRARIES}) +target_link_libraries(CentralManagerService ${catkin_LIBRARIES}) + ############# ## Install ## ############# diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/__init__.pyc deleted file mode 100644 index a5ca6d4071705a3ae3b59a286df950bbcbb51bb7..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/__init__.pyc deleted file mode 100755 index 7a9308cd970b3857545387746bf010b61da7192f..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/boottypes.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/boottypes.pyc deleted file mode 100755 index 90d465f1d2cbc96f07d096ca87420d253950c703..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/boottypes.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/cloader.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/cloader.pyc deleted file mode 100755 index 2e08af236fe20c0ef672a99b002bf7af340b8cea..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/bootloader/cloader.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/__init__.pyc deleted file mode 100644 index 1d052e26d093f2d2af461e4f7305e6843adeba19..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/commander.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/commander.pyc deleted file mode 100644 index 8c878db97973dab1c6de56c815a53f19287b7151..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/commander.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/console.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/console.pyc deleted file mode 100644 index 1a8c8c2f279ac0c46bc4c8048ae830c7e0bbfcd1..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/console.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/log.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/log.pyc deleted file mode 100644 index 5fd1124b09b2bf380993fdf3f869e6755d087817..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/log.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/mem.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/mem.pyc deleted file mode 100644 index c4343391b200d15a226cc52046ce297a6e8b47e6..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/mem.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/param.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/param.pyc deleted file mode 100644 index f804a69a9f074702fb526631e73d0d01aa742de1..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/param.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/platformservice.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/platformservice.pyc deleted file mode 100644 index 8e52e53c5ddb19fd7b056fbfd10099ba065fafb7..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/platformservice.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toc.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toc.pyc deleted file mode 100644 index c4aeffa7a142105eb313e0067d3be5011c1398f6..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toc.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toccache.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toccache.pyc deleted file mode 100644 index e5b628ed00701329883b82d40698b14eb32a18cd..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crazyflie/toccache.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/__init__.pyc deleted file mode 100644 index 47b409e54ba811525f2e198f5b5c5b337b68ad59..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpdriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpdriver.pyc deleted file mode 100644 index 5db88fa87e5e1b8d9a5c3613c0b188a8e6a7cbf5..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpdriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpstack.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpstack.pyc deleted file mode 100644 index ec186b246738c1e481340ff0969dcfadfc5fe543..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/crtpstack.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/debugdriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/debugdriver.pyc deleted file mode 100644 index f97e1180c96b4e355311a8106d298493719a4c42..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/debugdriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/exceptions.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/exceptions.pyc deleted file mode 100644 index eaceba555ada6016b0e18416fa742354f22f4dc5..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/exceptions.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/radiodriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/radiodriver.pyc deleted file mode 100644 index ec96f252e92283b12ef806a1e36b4866a655a017..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/radiodriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/serialdriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/serialdriver.pyc deleted file mode 100644 index 7dccc6413750c3c141518887764df6ca7856b3e1..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/serialdriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/udpdriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/udpdriver.pyc deleted file mode 100644 index 981031d8fb3899920cd996450f5043489367bd4a..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/udpdriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/usbdriver.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/usbdriver.pyc deleted file mode 100644 index 00e521d81c13456e1fffd28d828eb77c36f42175..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/crtp/usbdriver.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/__init__.pyc deleted file mode 100644 index 439cbca53e07ce314914a57bf924c6c86fc1d6f9..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/cfusb.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/cfusb.pyc deleted file mode 100644 index 7b7678b9858a809ce8fbb7a05aa8ac7012a9eab4..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/cfusb.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/crazyradio.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/crazyradio.pyc deleted file mode 100644 index d1e265c341b2a469db40734587773f7e90c769e3..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/drivers/crazyradio.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/__init__.pyc deleted file mode 100644 index 7c1192880b3f121662f5fcb0f624294c7bba6b2c..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/callbacks.pyc b/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/callbacks.pyc deleted file mode 100644 index 79876aa959683ac1070d0dc0f785b469ba986413..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/cflib/utils/callbacks.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/crazyradio/leapsdk/__init__.pyc b/pps_ws/src/d_fall_pps/crazyradio/leapsdk/__init__.pyc deleted file mode 100755 index e6513482535ac9c98b047a49e71c2c2a61f75aa9..0000000000000000000000000000000000000000 Binary files a/pps_ws/src/d_fall_pps/crazyradio/leapsdk/__init__.pyc and /dev/null differ diff --git a/pps_ws/src/d_fall_pps/launch/studentParams.yaml b/pps_ws/src/d_fall_pps/launch/studentParams.yaml index a8384c2c4a8a161a1bfcdc6ee97b099681fd3b9a..739ad896c79613e1f29aa0c9997d1c38c3d79e7e 100644 --- a/pps_ws/src/d_fall_pps/launch/studentParams.yaml +++ b/pps_ws/src/d_fall_pps/launch/studentParams.yaml @@ -1,6 +1,10 @@ TeamName: 'Two' CrazyFlieName: "cfTwo" CrazyFlieAddress: "radio://0/99/2M" +SafeController: "" +SafeControllerType: "" +CustomController: "" +CustomControllerType: "" #controllertypes to add with adjustable #motor, angle and rate diff --git a/pps_ws/src/d_fall_pps/msg/AreaBounds.msg b/pps_ws/src/d_fall_pps/msg/AreaBounds.msg new file mode 100755 index 0000000000000000000000000000000000000000..4230649fcaf859ca7391a10e637bbf1a255bbc01 --- /dev/null +++ b/pps_ws/src/d_fall_pps/msg/AreaBounds.msg @@ -0,0 +1,7 @@ +float32 xmin +float32 xmax +float32 ymin +float32 ymax +float32 zmin +float32 zmax + diff --git a/pps_ws/src/d_fall_pps/msg/CrazyflieContext.msg b/pps_ws/src/d_fall_pps/msg/CrazyflieContext.msg new file mode 100755 index 0000000000000000000000000000000000000000..87df011ced8a56f0fa83aec3a4207af53fb7a232 --- /dev/null +++ b/pps_ws/src/d_fall_pps/msg/CrazyflieContext.msg @@ -0,0 +1 @@ +AreaBounds localArea diff --git a/pps_ws/src/d_fall_pps/src/CentralManagerService.cpp b/pps_ws/src/d_fall_pps/src/CentralManagerService.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2cb409def71d7f60f688b5bf55d9646d7b9a5a08 --- /dev/null +++ b/pps_ws/src/d_fall_pps/src/CentralManagerService.cpp @@ -0,0 +1,46 @@ +// The service that manages the context of the student groups. +// Copyright (C) 2017 Cyrill Burgener, Marco Mueller, Philipp Friedli +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +#include "ros/ros.h" +#include "d_fall_pps/CrazyflieContext.h" +#include "d_fall_pps/CentralManager.h" + +using namespace d_fall_pps; + + +//receive request from students (containing (maybe among other things) their name) +//send them back the CrazyflieContext (containing (maybe among other things) the area to fly in) +bool returnCrazyflieContext(CentralManager::Request &request, CentralManager::Response &response) { + ROS_INFO("central manager"); + + return true; +} + + + + + +int main(int argc, char* argv[]) { + ros::init(argc, argv, "CentralManagerService"); + + ros::NodeHandle nodeHandle("~"); + + ros::ServiceServer service = nodeHandle.advertiseService("CentralManager", returnCrazyflieContext); + ROS_INFO("CentralManagerService ready"); + ros::spin(); + + return 0; +} diff --git a/pps_ws/src/d_fall_pps/src/PPSClient.cpp b/pps_ws/src/d_fall_pps/src/PPSClient.cpp index 7f24b704a3672d5b3b347d436c3c1ae116f68235..276b2824ed9b03658e5f16a24c3c8dddb83bd52d 100644 --- a/pps_ws/src/d_fall_pps/src/PPSClient.cpp +++ b/pps_ws/src/d_fall_pps/src/PPSClient.cpp @@ -29,6 +29,8 @@ #include "d_fall_pps/AngleCommand.h" #include "d_fall_pps/RateCommand.h" #include "d_fall_pps/MotorCommand.h" +#include "d_fall_pps/CrazyflieContext.h" + using namespace d_fall_pps; @@ -47,23 +49,18 @@ ros::Publisher motorCommandPublisher; //ros::NodeHandle nodeHandle; +//acceptance test for crazyflie position and attitude +bool safetyCheck(ViconData data){ + CrazyflieContext CrazyflieContext; + + return true; +} + + //extract data from "data" and publish/add to service for controller //not void: sould give back controlldata -void ppsClientToController(ViconData data){ +void ppsClientToController(ViconData data, bool autocontrol){ if(data.crazyflieName == cflie){ - /* unnecessairy: just send data!!!!! - d_fall_pps::ViconData myDataToPublish; - myDataToPublish.crazyflieName = data.crazyflieName; - myDataToPublish.x = data.x; - myDataToPublish.y = data.y; - myDataToPublish.z = data.z; - myDataToPublish.roll = data.roll; - myDataToPublish.pitch = data.pitch; - myDataToPublish.yaw = data.yaw; - myDataToPublish.acquiringTime = data.acquiringTime; - */ - - //TODO: //Some way of choosing the correct controller: Safe or Custom //using the area data @@ -106,13 +103,15 @@ void viconCallback(const d_fall_pps::ViconData& data){ //debugging //++callbackCalls; //ROS_INFO("Callback called #%d",callbackCalls); - //ROS_INFO("Recived Pitch in this callback: %f", data.pitch); + //ROS_INFO("Received Pitch in this callback: %f", data.pitch); //ROS_INFO("received data:"); ROS_INFO_STREAM(data); //ROS_INFO("My teamname is:"); ROS_INFO_STREAM(team); //ROS_INFO("My crazyflie is:"); ROS_INFO_STREAM(cflie); - //extract data from "data" and publish/add to service for controller - ppsClientToController(data); + //forward data to safety check + bool autocontrolOn = safetyCheck(data); + + ppsClientToController(data, autocontrolOn); } @@ -192,9 +191,9 @@ int main(int argc, char* argv[]){ //ros::Publishers to advertise on the three command type topics - angleCommandPublisher = nodeHandle.advertise <d_fall_pps::AngleCommand>("AngleCommand", 1000); - rateCommandPublisher = nodeHandle.advertise<d_fall_pps::RateCommand>("RateCommand", 1000); - motorCommandPublisher = nodeHandle.advertise <d_fall_pps::MotorCommand>("MotorCommand", 1000); + angleCommandPublisher = nodeHandle.advertise <d_fall_pps::AngleCommand>("AngleCommand", 1); + rateCommandPublisher = nodeHandle.advertise<d_fall_pps::RateCommand>("RateCommand", 1); + motorCommandPublisher = nodeHandle.advertise <d_fall_pps::MotorCommand>("MotorCommand", 1); //service: now only one available: to add several services depending on controller diff --git a/pps_ws/src/d_fall_pps/srv/CentralManager.srv b/pps_ws/src/d_fall_pps/srv/CentralManager.srv new file mode 100644 index 0000000000000000000000000000000000000000..780867bac47e18592c9e0c60334c776641698983 --- /dev/null +++ b/pps_ws/src/d_fall_pps/srv/CentralManager.srv @@ -0,0 +1,4 @@ +string crazyflieName +--- +CrazyflieContext context +