Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake install rules #64

Open
wants to merge 2 commits into
base: indigo-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion bebop_description/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,18 @@ find_package(catkin REQUIRED COMPONENTS
catkin_package()

# TODO: Tests
# TODO: Install Rules

#############
## Install ##
#############

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

# Copy resources
install(DIRECTORY urdf/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/urdf
)
45 changes: 27 additions & 18 deletions bebop_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,26 +113,35 @@ target_link_libraries(bebop_driver_node
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark executables and/or libraries for installation
# install(TARGETS bebop_autonomy bebop_autonomy_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# Mark executables and/or libraries for installation
install(TARGETS bebop bebop_driver_node bebop_driver_nodelet
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 cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
# Copy config files
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
)

install(DIRECTORY data/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/data
)

install(FILES nodelet_plugins.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

#############
## Testing ##
Expand Down
11 changes: 10 additions & 1 deletion bebop_driver/src/bebop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,21 @@ void Bebop::Connect(ros::NodeHandle& nh, ros::NodeHandle& priv_nh, const std::st
error_discovery = ARDISCOVERY_Device_InitWifi(device_ptr_,
ARDISCOVERY_PRODUCT_ARDRONE, "Bebop",
bebop_ip_.c_str(), 44444);

if (error_discovery != ARDISCOVERY_OK)
{
throw std::runtime_error("Discovery failed: " + std::string(ARDISCOVERY_Error_ToString(error_discovery)));
}

error_discovery = ARDISCOVERY_Device_WifiSetDeviceToControllerPort(device_ptr_, 43210);
if (error_discovery == ARDISCOVERY_OK)
{
ARSAL_PRINT(ARSAL_PRINT_WARNING, LOG_TAG, "Set receiving port on host machine to 43210");
}
else
{
throw std::runtime_error("ARDISCOVERY_Device_WifiSetDeviceToControllerPort failed: " + std::string(ARDISCOVERY_Error_ToString(error_discovery)));
}

device_controller_ptr_ = ARCONTROLLER_Device_New(device_ptr_, &error_);
ThrowOnCtrlError(error_, "Creation of device controller failed: ");

Expand Down
15 changes: 14 additions & 1 deletion bebop_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ catkin_package(
CATKIN_DEPENDS bebop_msgs
)

# TODO: Install Rules
#############
## Install ##
#############

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

# Copy config files
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
)