[Discourse.ros.org] [Local User Groups/ROS Japan Users Group] rostopicのコマンドをwebページ上からphpで送信したい。

24 views
Skip to first unread message

吉田太郎

unread,
Dec 18, 2017, 2:35:59 AM12/18/17
to ros-jap...@googlegroups.com
ramekabi
December 18

Raspberry上でApacheを動かし、ブラウザからHTMLファイルにアクセスしてphpと連携しrostopicのコマンドを送りたいのですが、上手くいきません。

再起動やシャットダウンのコマンドは動きました。
今の構成としてはhtmlファイルからphpにコマンドの内容を送信し、phpでshell_exec($command)を実行しています。

ROS Answersに似たような質問があったのですが、メンテナンス中らしく質問の内容を見ることができません。
どなたかお力添えをいただけませんか。


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

Tsuda

unread,
Dec 19, 2017, 6:30:58 PM12/19/17
to ros-jap...@googlegroups.com
Shinji
December 19

恐らく環境変数が設定されてないからと思います。

source setup.bash をして設定される環境変数を、PHPの実行環境にも設定すればよいのではないかと。


Visit Topic or reply to this email to respond.


Previous Replies

Geoffrey Biggs

unread,
Dec 19, 2017, 8:26:25 PM12/19/17
to ros-jap...@googlegroups.com
gbiggs
December 20

WebページでROSが利用したがる場合はrosbridgeroslibjsがおすすめです。

例えばトピックリストの取得はROSクラスのgetTopicsが利用できます。


Visit Topic or reply to this email to respond.


Previous Replies

Shinji
December 19

恐らく環境変数が設定されてないからと思います。

source setup.bash をして設定される環境変数を、PHPの実行環境にも設定すればよいのではないかと。

ramekabi
December 18
Reply all
Reply to author
Forward
0 new messages