Closed Yone-Tech closed 5 years ago
jog_launchパッケージへのパスが通っていないか、jog_launchの中にtra1.launchが存在しないのどちらかのように見えます。
ワークスペースを作成してこのパッケージを利用されていると思います。
https://github.com/tork-a/jog_control#install-from-source の最後の行の
$ source devel/setup.bash
にあたる、
自分のワークスペース配下のdevelの下のsetup.bashを実行しておく必要があります。
ご回答ありがとうございます。 結果は同じエラーとなりました。
techno@techno:~$ roslaunch jog_launch tra1.launch
[tra1.launch] is neither a launch file in package [jog_launch] nor is [jog_launch] a launch file name
The traceback for the exception was written to the log file
パスを確認すると下記のように出力されたためパスは通っていると考えてよいでしょうか。
$ echo $ROS_PACKAGE_PATH
/home/techno/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
ファイルが存在していませんでした。 /opt/ros/indigo/includeの中にjog_launchフォルダはありませんでした。
インストール手順を説明いたします。 基本は手順に沿って行いましたが少し変更しています。
$ source /opt/ros/indigo/setup.bash ←kinekteをindigoに書き換え
$ mkdir -p ws/src
$ cd ws
$ wstool init src
$ wstool set -t src jog_control --git http://github.com/tork-a/jog_control
$ wstool update -t src
$ rosdep install -r --from-path src --ignore-src
ここまでは実行でき次のコマンドはエラーとなるため
$ catkin build
catkin: コマンドが見つかりません
代わりに
$ catkin_make
を実行しました。すると
省略
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "fake_joint_launch"
with any of the following names:
fake_joint_launchConfig.cmake
fake_joint_launch-config.cmake
Add the installation prefix of "fake_joint_launch" to CMAKE_PREFIX_PATH or
set "fake_joint_launch_DIR" to a directory containing one of the above
files. If "fake_joint_launch" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
jog_control/jog_launch/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/techno/ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/techno/ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
とエラーになったため ダウンロードしたfake_jointをws/srcに入れ再度
$ catkin_make
中略
[100%] Building CXX object jog_control/jog_controller/CMakeFiles/jog_controller.dir/src/moc_jog_slider.cxx.o
Linking CXX executable /home/techno/ws/devel/lib/fake_joint_driver/fake_joint_driver_node
[100%] Built target fake_joint_driver_node
Linking CXX executable /home/techno/ws/devel/lib/jog_controller/jog_joint_node
[100%] Built target jog_joint_node
Linking CXX shared library /home/techno/ws/devel/lib/libjog_controller.so
[100%] Built target jog_controller
Linking CXX executable /home/techno/ws/devel/lib/jog_controller/jog_frame_node
[100%] Built target jog_frame_node
techno@techno:~/ws$ source devel/setup.bash
と行いました。
$ catkin_makeを実行ではだめなのでしょうか。 よろしくお願いたします。
ファイルが存在していませんでした。 /opt/ros/indigo/includeの中にjog_launchフォルダはありませんでした。
gitからソースコードをワークスペースに落として来て使っているはずなので、
launchファイルがあるべき場所は
自分のワークスペース配下/src/jog_control/jog_launch/launch
フォルダの下になります。
パスについては、roscd
して、移動した場所が、
自分のワークスペース配下/devel
になっているのであれば、
そのターミナルのパスは通っていると判断できます。
そうなると、本当にtra1.launchファイルが自分のワークスペース配下に無いために今回のエラーが出ていると考えられます。
$ wstool set -t src jog_control --git http://github.com/tork-a/jog_control
$ wstool update -t src
の後に、srcフォルダの中にjog_controlの一式が入っているか確認して、入っていなければダウンロードに失敗しているので、もう一度updateしてみてください。
(別件ですが、jog_control、indigoで動作するのか私は存じ上げないです)。
jog_controlはindigoでも動作するはずですが、今回のエラーはそれ以前のところで起動できていないです。対処法としては、 @Moirai のとおりで、jog_launchパッケージがあるか、確認してみてください。
ご回答ありがとうございます。 roscdすると /opt/ros/indigo$ となりました。 自分のワークスペース配下/devel とならなかったためこの点が不具合だと思います。 設定方法をお教え頂けますでしょうか。 お手数おかけしますがよろしくお願い申し上げます。
インストール手順を最後まで行い、
$ source devel/setup.bash
を実行しても
techno@techno:~$ roscd
techno@techno:/opt/ros/indigo$
と変化がありませんでした。
「自分のワークスペース配下のdevelの下のsetup.bashを実行しておく必要があります。」
というのは
$ source devel/setup.bash
であっているでしょうか。何かコマンドを追加する必要があるのでしょうか。
自分のワークスペース配下/src/jog_control/jog_launch/launch/tra1.launch はありました。 お手数おかけしますがよろしくお願い申し上げます。
自分のワークスペースの下のdevelの下のsetup.bashをsourceします。 cdした場所にいるのなら、 source ワークスペース名/devel/setup.bash ですね。 単に、Linuxで言うところの絶対パスを正しく指定せずに、sourceしているから自分のワークスペース配下のsetup.bashが動いていないのだと思います。
ご回答ありがとうございます。
techno@techno:~$ source ws/devel/setup.bash
bash: /home/techno/ws/devel/_setup_util.py: 許可がありません
Failed to run '"/home/techno/ws/devel/_setup_util.py" ': return code 126
とエラーが出てきます。 ファイルのプロパティを見ますとアクセス権はありました。 解決策を教えていただけますでしょうか。よろしくお願い申し上げます。
ワークスペースと_setup_util.pyの ls -la した結果を貼ってください。
以下のようになりました。よろしくお願いいたします。
techno@techno:~$ ls -la ws
合計 24
drwx------ 5 techno techno 4096 2月 28 11:19 .
drwxr-xr-x 30 techno techno 4096 2月 28 14:21 ..
-rw------- 1 techno techno 98 2月 28 11:19 .catkin_workspace
drwx------ 9 techno techno 4096 2月 28 11:19 build
drwx------ 5 techno techno 4096 2月 28 11:19 devel
drwx------ 4 techno techno 4096 2月 28 11:19 src
techno@techno:~/ws/devel$ ls -la _setup_util.py
-rw------- 1 techno techno 12433 2月 28 11:19 _setup_util.py
権限の付き方がおかしいようです. ワークスペースをtechnoのユーザで作り直すか 今あるwsにtechnoの権限を付与すればいいのではと思います.
jog_control起動できました。ありがとうございます。 しかし、jog_controlのパネルが表示できません。 手順通りにrviz起動後にjog_controlを起動させました。 Addボタンを押しても見当たりません。 お手数ですが、ご教示くださいますようよろしくお願いいたします。
rvizのプラグイン(パネル)が表示できない場合、ビルドできていない可能性が高いです。 ワークスペースでもう一度、
$ catkin_make (catkin_toolsを使っている場合は、catkin build)
$ source devel/setup.bash
とします。fake_jointパッケージが無い、というエラーがまだ解決できていないでしょうか?その場合は、
$ cd ws/src
$ git clone https://github.com/tork-a/fake_joint.git
とする、もしくは、ネットがつながってない場合はzipファイルをダウンロードするなどしてソースコードを取得し、fake_jointパッケージも併せてビルドするようにしてみてください。
jog_controlパネル表示できjog動作を実現できました。 単純にパネル表示方法の知識不足でした。
Moirai様、7675t様ご教示頂きありがとうございました。 基本的な質問ばかりで大変お手数お掛けしました。大変勉強になりました。 ありがとうございました。
よかったです.おつかれさまでした. 解決したらissueをcloseしておいてください.
TRA1実機にてjog_controlを起動しようとしましたがエラーになりました。 対応策を教えて頂けますでしょうか。 ROSバージョンはindigoです
下記コマンドを実行しました。
Rviz起動後
$ roslaunch jog_launch tra1.launch
を実行しましたがエラーが発生しました。どのように対処すればよろしいでしょうか。 また、上記エラーのlogファイルはどこに作成されますでしょうか。