jsk-ros-pkg / jsk_roseus

ROS EusLisp Client
http://wiki.ros.org/roseus/Tutorials
16 stars 56 forks source link

ros::*comple-messages*をtにするとloadできなくなる #333

Open garaemon opened 9 years ago

garaemon commented 9 years ago

ros::_compile-messages_をtにするとload package://ができなくなります。

テストコード

#!/usr/bin/env roseus
(setq ros::*compile-message* t)
(ros::roseus-add-msgs "sensor_msgs")
(load "package://roseus/euslisp/roseus.l")

エラー

eustf roseus_c_util compiling file: /home/lueda/ros/hydro/src/jsk-ros-pkg/jsk_roseus/roseus//euslisp/roseus.l
;; loading roseus("86c171f") on euslisp((9.12 fc21 Fri Jun 12 03:48:19 JST 2015 fada0ef 1.0.6))
;; loading roseus("86c171f") on euslisp((9.12 fc21 Fri Jun 12 03:48:19 JST 2015 fada0ef 1.0.6))
; *keyword-package* is assumed to be global
; *compile-message* is assumed to be global
; *compile-message* is assumed to be global
/home/lueda/ros/hydro_parent/devel/share/euslisp/jskeus/eus/Linux64/bin/irteusgl: ERROR th=0  0x5a129a0 in (apply #'compile-file srcfile :o obj args)COMPILER:E: 

ちなみに、*compile-messages*をnilにすれば動く

#!/usr/bin/env roseus
(setq ros::*compile-message* t)
(ros::roseus-add-msgs "sensor_msgs")
(setq ros::*compile-message* nil)
(load "package://roseus/euslisp/roseus.l")
YoheiKakiuchi commented 9 years ago

そうですね,最近気がつきました.

#!/usr/bin/env roseus
(setq ros::*compile-message* t)
(ros::roseus-add-msgs "sensor_msgs")
(setq ros::*compile-message* nil)

roseus-add-msgs-with-compile関数か,roseus-add-msgsに:compile tにするような変更がひつようでしょうか.

k-okada commented 9 years ago

この問題そのものは compile-file-if-src-newer-so の引数(この形は多分コンパイルできない)+途中でファイルを消している(roseus.cppからできるroseus.soが消える) https://github.com/jsk-ros-pkg/jsk_roseus/blob/master/roseus/euslisp/roseus.l#L359

が原因におもいます.そもそもcompile-file-if-src-newer.so でファイルを消しているのはなぜでしょうか?

YoheiKakiuchi commented 9 years ago

packagename/hogehoge.lをコンパイルした時に、 コンパイルしたファイル名を pckagename_hogehoge.so したくて、 hogehoge.l をコンパイルしてできた hogehoge.so を packagename_hogehoge.so にコピーして、 hogehoge.so を消しているようです。

k-okada commented 9 years ago

とりあえずmvしなくても第二引数でディレクトリを指定できそうです. また,出力先はメッセージファイルのあるdevel/share/roseus/ros/はどうでしょうか.

https://github.com/k-okada/jsk_roseus/commit/a91c18e388aa05559acb478a49c64b36ea9bb1c6

YoheiKakiuchi commented 9 years ago

share/roseus/ros/ ここだと、debに入れた場合はパーミッションが必要なところにならないでしょうか?

garaemon commented 9 years ago

パッケージのコンパイル時にコンパイルするという作戦はどうでしょうか?

2015年7月17日金曜日、Yohei Kakiuchinotifications@github.comさんは書きました:

share/roseus/ros/ ここだと、debに入れた場合はパーミッションが必要なところにならないでしょうか?

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/jsk_roseus/issues/333#issuecomment-122161564 .

✉︎ from iPhone

k-okada commented 9 years ago

/opt/ros .. にある.msg から CMAKE_PREFIX_PATH/devel/share .. に .l をつくって,その.l から同じ位置に.soを作るので問題ないと思います.

問題あるとするとjadeで.lが/optにインストールされている場合かと思います.

◉ Kei Okada

On Fri, Jul 17, 2015 at 12:51 PM, Yohei Kakiuchi notifications@github.com wrote:

share/roseus/ros/ ここだと、debに入れた場合はパーミッションが必要なところにならないでしょうか?

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/jsk_roseus/issues/333#issuecomment-122161564 .

k-okada commented 9 years ago

デフォルトで ros::compile-messages を t にすればそうなると思います.

◉ Kei Okada

2015-07-17 12:53 GMT+09:00 Ryohei Ueda notifications@github.com:

パッケージのコンパイル時にコンパイルするという作戦はどうでしょうか?

2015年7月17日金曜日、Yohei Kakiuchinotifications@github.comさんは書きました:

share/roseus/ros/ ここだと、debに入れた場合はパーミッションが必要なところにならないでしょうか?

— Reply to this email directly or view it on GitHub < https://github.com/jsk-ros-pkg/jsk_roseus/issues/333#issuecomment-122161564>

.

✉︎ from iPhone

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/jsk_roseus/issues/333#issuecomment-122161946 .