Hello! I have a package I have been able to successfully build using catkin_make after setting up my package.xml and CMakeLists.txt. However, I have one problem. When I run catkin_make, it successfully makes the executable, but places the executable in catkin_ws/build/package_name. For example, I have made a small example below (**tbrandom and tbsub are my executables**):
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom$ ls
build devel src
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom$ cd build
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom/build$ ls
catkin catkin_make.cache cmake_install.cmake Makefile
catkin_generated CMakeCache.txt CTestTestfile.cmake test_results
CATKIN_IGNORE CMakeFiles gtest turtle_bot_random
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom/build$ cd turtle_bot_random
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom/build/turtle_bot_random$ ls
catkin_generated cmake_install.cmake Makefile tbsub
CMakeFiles CTestTestfile.cmake tbrandom
When I source the devel/setup.bash, and try to run the executable through the package, ROS cannot find the executable unless I copy the executable(s) made (in this example, tbrandom and tbsub) and copy them into `Desktop/Tree/Programming/ros/TurtleBotRandom/src/turtle_bot_random`. This is really annoying for bigger projects which require more compile time, and then require me to copy paste files in between to actually start testing to see if my code even works.
What could be the reason or a potential fix? Am I doing something wrong? I've only started toying with catkin last night.
MY CMAKELISTS.TXT FILE:
http://www.pastebin.ca/3086592
↧