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

Compilation dependency issues #84

Open
mtfurlan opened this issue Nov 11, 2019 · 0 comments
Open

Compilation dependency issues #84

mtfurlan opened this issue Nov 11, 2019 · 0 comments

Comments

@mtfurlan
Copy link

mtfurlan commented Nov 11, 2019

I had some issues getting autorally to build, here is how I got around those issues.

I'm runniung ubuntu 16.04 and using ros kinetic as the README instructs.

apt dependencies

  • I needed to also install libgeographic-dev

Dependencies outside of apt:

rosdep dependency issues

Pointgrey got bought by flir and some links broke, so a few dependencies stopped being able to be built: ros-drivers/pointgrey_camera_driver#187
I got around that by installing old snapshot builds for ros-kinetic-flir-camera-driver, ros-kinetic-pointgrey-camera-driver, and ros-kinetic-spinnaker-camera-driver.

GTSAM

While compiling GTSAM I had to add -DGTSAM_USE_SYSTEM_EIGEN=ON to the cmake command as GTSAM packages it's own version of the Eigen lib.

Library issues

autorally_core/src/StateEstimator/CMakeLists.txt asks for /usr/local/lib/libgtsam.so, while gtsam provided /usr/local/lib/libgtsam.so.4.0.2 and /usr/local/lib/libgtsam.so.4
I changed the CMakeLists.txt to ask for libgtsam.so and ran sudo ln -s /usr/local/lib/libgtsam.so.4.0.2 /usr/local/lib/libgtsam.so

The StateEstimator CMakeLists.txt also asks for /usr/local/lib/libGeographic.so, and libgeographic-dev put it at /usr/lib/x86_64-linux-gnu/libGeographic.so, so I changed it to ask for libGeographic.so
Diff:

diff --git a/autorally_core/src/StateEstimator/CMakeLists.txt b/autorally_core/src/StateEstimator/CMakeLists.txt
index 40b35ae..4249327 100644
--- a/autorally_core/src/StateEstimator/CMakeLists.txt
+++ b/autorally_core/src/StateEstimator/CMakeLists.txt
@@ -9,7 +9,7 @@ if(GTSAM_FOUND)
   include_directories(include ${catkin_INCLUDE_DIRS} "/usr/local/include")
 
   add_executable(StateEstimator StateEstimator.cpp)
-  target_link_libraries(StateEstimator ${catkin_LIBRARIES} ${ROS_LIBRARIES} /usr/local/lib/libgtsam.so /usr/local/lib/libGeographic.so ${TBB_LIBRARIES} ar_diagnostics)
+  target_link_libraries(StateEstimator ${catkin_LIBRARIES} ${ROS_LIBRARIES} libgtsam.so libGeographic.so ${TBB_LIBRARIES} ar_diagnostics)
   add_dependencies(StateEstimator autorally_msgs_gencpp)
 
   install(TARGETS StateEstimator

catkin workspaces

This was just an issue with me not knowing how catkin workspaces work, but I think at least some parts of the following would make the Clone or Fork Repositories section of the README more clear:

mkdir -p $HOME/catkin_ws/src
cd $HOME/catkin_ws/src
catkin_init_workspace
cd $HOME/catkin_ws
catkin_make
cd $HOME/catkin_ws/src
git clone https://github.com/AutoRally/imu_3dm_gx4.git
git clone https://github.com/AutoRally/autorally.git

At this point it builds, but I can't test much as gazbebo is has libGL errors and then segfaults.

@mtfurlan mtfurlan changed the title Dependancies Compilation dependency issues Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant