Ask Your Question
0

node not built, but executable is built?

asked 2015-07-06 14:23:21 -0600

dshimano gravatar image

Hi, I'm trying to "pull" PTAM out of the TUM ARDrone package, so that I can build a package just using the stateestimation node, and nothing else. The first step of this was to create a package called ptam which is a copy of TUM ARDrone but I commented out the instructions in the CMakeList.txt which build the other nodes. With a few more changes it built succesfully, and told me

Linking CXX executable /home/highbay-linux/ptam_ws/devel/lib/ptam/drone_stateestimation
[100%] Built target drone_stateestimation

Yet when I try to run rosrun ptam and hit TAB, nothing comes up, in fact when I run rosrun pTAB, it doesnt pull up ptam as an option. I sourced my workspace corectly, so I don't know why, if the target exacutable was built, I dont have any nodes to run?

Here is the amended CMakeList.txt


cmake_minimum_required(VERSION 2.8.3)
project(ptam)

## 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
  cv_bridge
  dynamic_reconfigure
  geometry_msgs
  message_generation
  message_runtime
  roscpp
  roslib
  rospy
  sensor_msgs
  std_msgs
  std_srvs
  tf
)


# Compile third party libs
include(ExternalProject)
ExternalProject_Add(thirdparty
    URL ${PROJECT_SOURCE_DIR}/thirdparty/thirdparty.tar.gz
    PREFIX ${CMAKE_BINARY_DIR}/thirdparty
    CONFIGURE_COMMAND ""
    BUILD_COMMAND make
    INSTALL_COMMAND ""
    BUILD_IN_SOURCE 1
)

# ------------------- add dynamic reconfigure api ------------------------------------
generate_dynamic_reconfigure_options(
#  cfg/AutopilotParams.cfg
#  cfg/GUIParams.cfg
  cfg/StateestimationParams.cfg
)

################################################
## Declare ROS messages, services and actions ##
################################################

## Generate messages in the 'msg' folder
add_message_files(FILES filter_state.msg)

## Generate services in the 'srv' folder
#add_service_files(
#   DIRECTORY srv
#   FILES
#   SetReference.srv
#   SetMaxControl.srv
#   SetInitialReachDistance.srv
#   SetStayWithinDistance.srv
#   SetStayTime.srv
#)

## Generate added messages 
generate_messages(DEPENDENCIES std_msgs)

###################################
## catkin specific configuration ##
###################################
catkin_package(CATKIN_DEPENDS message_runtime std_msgs ardrone_autonomy)

###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})

# --------------------------- stateestimation & PTAM --------------------------------
# set header ans source files
set(STATEESTIMATION_SOURCE_FILES       
    src/stateestimation/GLWindow2.cc
    src/stateestimation/GLWindowMenu.cc  
    src/stateestimation/main_stateestimation.cpp
    src/stateestimation/DroneKalmanFilter.cpp
    src/stateestimation/Predictor.cpp
  src/stateestimation/PTAMWrapper.cpp
  src/stateestimation/MapView.cpp
  src/stateestimation/EstimationNode.cpp
  src/stateestimation/PTAM/ATANCamera.cc
  src/stateestimation/PTAM/Bundle.cc
  src/stateestimation/PTAM/HomographyInit.cc
  src/stateestimation/PTAM/KeyFrame.cc
  src/stateestimation/PTAM/Map.cc
  src/stateestimation/PTAM/MapMaker.cc
  src/stateestimation/PTAM/MapPoint.cc
  src/stateestimation/PTAM/MiniPatch.cc
  src/stateestimation/PTAM/PatchFinder.cc
  src/stateestimation/PTAM/Relocaliser.cc
  src/stateestimation/PTAM/ShiTomasi.cc
  src/stateestimation/PTAM/SmallBlurryImage.cc
  src/stateestimation/PTAM/Tracker.cc
)
set(STATEESTIMATION_HEADER_FILES    
  src/stateestimation/GLWindow2.h 
  src/stateestimation/GLWindowMenu.h    
  src/stateestimation/MouseKeyHandler.h  
  src/HelperFunctions.h   
  src/stateestimation/DroneKalmanFilter.h        
  src/stateestimation/Predictor.h 
  src/stateestimation/PTAMWrapper.h
  src/stateestimation/MapView.h
  src/stateestimation/EstimationNode.h
  src/stateestimation/PTAM/ATANCamera.h
  src/stateestimation/PTAM/Bundle.h
  src/stateestimation/PTAM/customFixes.h
  src/stateestimation/PTAM/HomographyInit.h
  src/stateestimation/PTAM/KeyFrame.h
  src/stateestimation/PTAM/LevelHelpers.h
  src/stateestimation/PTAM/Map.h
  src/stateestimation/PTAM/MapMaker.h
  src/stateestimation/PTAM/MapPoint.h
  src/stateestimation/PTAM/MEstimator.h
  src/stateestimation/PTAM/MiniPatch.h
  src/stateestimation/PTAM/OpenGL.h
  src/stateestimation/PTAM/PatchFinder.h
  src/stateestimation/PTAM/Relocaliser.h
  src/stateestimation/PTAM/settingsCustom.h
  src/stateestimation ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-07 07:24:07 -0600

updated 2015-07-07 07:25:14 -0600

This happens to me especially when I add a new package and build it, then it could be that it is not in the index.

Try rospack find ptam or roscd ptam ... and then rosrun ptam and double tab

If you want to know if the executable has been built, check the devel/lib/ptam directory in your workspace there you should find the executable drone_stateestimation

edit flag offensive delete link more

Comments

Hi, Thanks for your answer. I can find the executable in devel/lib/ptam like you said, and it runs fine if I launch it as an executable, but rosrun still doesn't work. I can go to the ptam folder, but when I do rosrun double tab, nothing there, and rosrun ptam drone_stateestimation gets an error...

dshimano gravatar imagedshimano ( 2015-07-07 09:28:28 -0600 )edit

What you could also try is, deleting devel and build folder and do catkin_make again, sometimes it also got messed up for me somehow. Actually I have my own build command which, always deletes build and devel. Afterwards source /opt/ros/indigo/setup.bash and devel/setup.bash again... and try.

cyborg-x1 gravatar imagecyborg-x1 ( 2015-07-07 12:41:16 -0600 )edit

Oh and I just saw something unusual, maybe try to comment those ...

set_target_properties(drone_stateestimation PROPERTIES COMPILE_FLAGS "-D_LINUX -D_REENTRANT -Wall  -O3 -march=nocona -msse3")

especially -march could be interesting...

-> https://wiki.gentoo.org/wiki/GCC_opti...

cyborg-x1 gravatar imagecyborg-x1 ( 2015-07-07 12:44:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-06 14:23:21 -0600

Seen: 277 times

Last updated: Jul 07 '15