Skip to Content
プログラミングROS ―Pythonによるロボットアプリケーション開発
book

プログラミングROS ―Pythonによるロボットアプリケーション開発

by Morgan Quigley, Brian Gerkey, William D. Smart, 河田 卓志, 松田 晃一, 福地 正樹, 由谷 哲夫
December 2017
Intermediate to advanced
480 pages
7h 13m
Japanese
O'Reilly Japan, Inc.
Content preview from プログラミングROS ―Pythonによるロボットアプリケーション開発

21章ロボットの振る舞いをデバッグする

ここまで読んで気づいたと思いますが、ロボットのアプリケーションは複雑になりがちです。通常のソフトウェアシステムで見られるような複雑さに加えて、センサーやアクチュエーターは複雑な物理世界(もしくはシミュレーションされた世界)と不確かな方法で情報のやり取りをしています。さらに、少なくともROSシステムでは、たくさんの独立したプロセスを持つ分散処理グラフが存在し、これらのプロセスはメッセージパッシングを用いてやり取りを非同期で行っています。つまり、事態を悪化させる要素はたくさん存在し、問題を見つけ出しにくくしているのです。

もし、すべてがそろって、[Go]ボタンを押しても、何も起こらなかったらどうすればいいのでしょうか?

幸いなことに、ROSはアプリケーションのデバッグを手助けする強力なツールを提供しています。本章では、最もよく使われるツールを扱い、その中で、いくつかのデバッグテクニックについて説明していきます。

21.1 ログメッセージ:/rosoutとrqt_console

ROSシステムが正しく動いていない場合は、他のソフトウェアの場合と同様に、最初にすべきことはエラーメッセージの確認です。運が良ければ、システムがその原因を教えてくれています。もちろん、ROSシステムは分散システムなので、単一のシステムを使っている場合よりもエラーメッセージが若干複雑になっています。

単一のシステムを動かしている場合は、システムからのエラーメッセージをダイアログボックスにポップアップ表示させたり(Webブラウザーのような、グラフィカルなアプリケーションの場合)、プログラムを実行しているターミナルに表示させたりしたい(コンパイラーのようなコンソールアプリケーションの場合)と思うかもしれません。しかし、ROSは分散コンピューティング環境であり、通常は数十個の独立したプロセスからなる複数なアプリケーション(そのほとんどは、グラフィカルインタフェースを持たない)が動いています。どうしたら、これらのプロセス全部からエラーメッセージを受け取ることができるのでしょうか? ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

Eve Porcello, Alex Banks, 尾崎 沙耶, あんどうやすし
行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

Stephen Wendel, 武山 政直, 相島 雅樹, 反中 望, 松村 草也

Publisher Resources

ISBN: 9784873118093Other