kochigami / cultural_festival

new repository for cultural festival
0 stars 1 forks source link

CMakeLists.txtをあげてほしい #16

Closed YuOhara closed 9 years ago

YuOhara commented 9 years ago

CMakeLists.txt と package.xmlを載せて欲しいです。

kochigami commented 9 years ago

githubにあげているパッケージ名と、自分のローカル環境でのパッケージ名が違ったので、 まず自分のローカル環境のパッケージ名をcultural_festivalに変更し、 roscd cultural_festival CMakeList.txt, manifest.xmlのパッケージ名を書き換えました。 make すると、

mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake .. CMake Error: The current CMakeCache.txt directory /home/kochigami/ros/groovy/cultural_festival/build/CMakeCache.txt is different than the directory /home/kochigami/ros/groovy/object_learn_using_sift/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The source "/home/kochigami/ros/groovy/cultural_festival/CMakeLists.txt" does not match the source "/home/kochigami/ros/groovy/object_learn_using_sift/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory. make: *\ [all] エラー 1

となってしまうので、 cmake /home/kochigami/ros/groovy/cultural_festival/ を行なって、 make, rosmakeが通ることを確認しました。

この状態でCMakeList.txtとmanifest.xmlを載せます。 何か不備があったら申し訳ございません。

kochigami commented 9 years ago

launchファイル cultural_festival.launch が実行できなくなってしまいました。

ResourceNotFound: object_learn_using_sift と前のパッケージの名前が出て、 ROSのPATHを一生懸命辿っているので、 どこかで使っているのだと思いますが、まだどこだか分かりません。

kochigami commented 9 years ago

object_learn_using_siftという名前を全てcultural_festivalに変更し、launchファイルが動くようになりました。 この時に、 CMakeList.txtの rosbuild_add_executable(object_learn_using_sift ~/ros/groovy/cultural_festival/src/object_learn_using_sift.cpp)の中身の実行ファイル名もcultural_festivalに変更してしまい、 それに気づかずobject_learn_using_siftを実行し、うまく動かないという失敗をしました。 今後気をつけます。