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

Building driver on Debian Wheezy with boost 1.49 #18

Open
wants to merge 1 commit 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
27 changes: 15 additions & 12 deletions bebop_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.3)
project(bebop_driver)

add_definitions(-std=c++11 -D__STDC_CONSTANT_MACROS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should find an alternative to using c++11 since it's not allowed for packages targeted for ROS Indigo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, this is because boost:atomic is not supported by Boost < 1.53


## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
Expand Down Expand Up @@ -54,18 +56,19 @@ roslint_cpp(
# Build ARDroneSDK3 through their custom build manager (ARSDKBuildUtils)
# TODO: Replace ExternalProject with a catkin package wrapper or a cmake macro.
# the build time is unnecessarily long due to many git checkout ./SDK3Build.py performs.
include(ExternalProject)
ExternalProject_Add(ARSDKBuildUtils
GIT_REPOSITORY https://github.com/ARDroneSDK3/ARSDKBuildUtils.git
GIT_TAG ARSDK3_version_3_6
PREFIX ${CATKIN_DEVEL_PREFIX}
CONFIGURE_COMMAND echo "No configure"
BUILD_COMMAND ./SDK3Build.py -t Unix
INSTALL_COMMAND echo "No install"
BUILD_IN_SOURCE 1
)

set(ARDRONESDK3_PATH "${CATKIN_DEVEL_PREFIX}/src/ARSDKBuildUtils/Targets/Unix/Install")
#include(ExternalProject)
#ExternalProject_Add(ARSDKBuildUtils
# GIT_REPOSITORY https://github.com/ARDroneSDK3/ARSDKBuildUtils.git
# GIT_TAG ARSDK3_version_3_6
# PREFIX ${CATKIN_DEVEL_PREFIX}
# CONFIGURE_COMMAND echo "No configure"
# BUILD_COMMAND ./SDK3Build.py -t Unix
# INSTALL_COMMAND echo "No install"
# BUILD_IN_SOURCE 1
#)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change needs to be reverted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a feature, we can disable this and provide an option to set path to ARSDKBuildUtils/Targets/Unix/Install which should consequently disable external build of the SDK.


set(ARDRONESDK3_PATH "/home/edison/bebop_sdk_ws/ARSDKBuildUtils/Targets/Unix/Install")
#set(ARDRONESDK3_PATH "${CATKIN_DEVEL_PREFIX}/src/ARSDKBuildUtils/Targets/Unix/Install")

include_directories(
${catkin_INCLUDE_DIRS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ class PilotingSettingsMaxDistance : public AbstractSetting
::boost::lock_guard<boost::mutex> lock(mutex_);

arg = NULL;
// manual edit to a bug in upstream XML
HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSETTINGSSTATE_MAXDISTANCECHANGED_CURRENT, arg);
if (arg)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
#include <string>
#include <ros/ros.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include <boost/thread/locks.hpp>

namespace bebop_driver
{
Expand Down Expand Up @@ -100,4 +100,4 @@ class AbstractSetting: public AbstractCommand
} // namespace cb
} // namespace bebop_driver

#endif // BEBOP_COMMON_COMMANDS_H
#endif // BEBOP_COMMON_COMMANDS_H
6 changes: 3 additions & 3 deletions bebop_driver/include/bebop_driver/bebop.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
#include <vector>
#include <utility>
#include <map>
#include <atomic>

#include <boost/shared_ptr.hpp>
#include <boost/atomic.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>

Expand Down Expand Up @@ -85,8 +85,8 @@ class Bebop
{
private:
static const char* LOG_TAG;
boost::atomic<bool> is_connected_;
boost::atomic<bool> is_streaming_started_;
std::atomic<bool> is_connected_;
std::atomic<bool> is_streaming_started_;
ARDISCOVERY_Device_t* device_ptr_;
ARCONTROLLER_Device_t* device_controller_ptr_;
eARCONTROLLER_ERROR error_;
Expand Down
4 changes: 2 additions & 2 deletions bebop_driver/scripts/meta/last_build_info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Last auto-generation build info:

- Source hash 7e2f55fafcd45ba2380ca2574a08b7359c005f47
- Date 2015-09-14 19:19:40.743928
- Generator generate.py @ 40b8351
- Date 2015-10-29 18:14:51.109917
- Generator generate.py @ 61239d4
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
#include <string>
#include <ros/ros.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include <boost/thread/locks.hpp>

namespace bebop_driver
{
Expand Down Expand Up @@ -100,4 +100,4 @@ public:
} // namespace cb
} // namespace bebop_driver

#endif // BEBOP_COMMON_COMMANDS_H
#endif // BEBOP_COMMON_COMMANDS_H