tank.launch を実行するとprocess has died

ROS環境におけるChoreonoidの実行(ROS環境におけるChoreonoidの実行 — Choreonoid 開発版 ドキュメント)の中にある、tank.launch の実行を行うとprocess has died となってしまいます。
rosrun choreonoid_ros choreonoid に関しては正常に実行出来てます。

解決策についてご教授いただきたいです。

Ubuntu 18.04
ROS melodic
Choreonoid環境がROSディレクトリ内と外に2つ存在。

process[choreonoid_joy-1]: started with pid [2033]
process[choreonoid-2]: started with pid [2035]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[choreonoid-2] process has died [pid 2035, exit code -6, cmd /home/shoma/catkin_ws/devel/lib/choreonoid_ros/choreonoid /home/shoma/catkin_ws/src/choreonoid_ros_samples/project/ROS-Tank.cnoid --start-simulation __name:=choreonoid __log:=/home/shoma/.ros/log/986bcb8e-1003-11ec-a65e-c809a8d9b8e0/choreonoid-2.log].
log file: /home/shoma/.ros/log/986bcb8e-1003-11ec-a65e-c809a8d9b8e0/choreonoid-2*.log

roslaunch choreonoid_ros choreonoid.launch で起動させた後、
GUI上でFile→OpenProjectからROS-Tank.cnoidを開いても上記と同じ挙動が現れます。

以下の記事を参考に、

  • デバッグモードでビルド
  • gdbで当該launchを実行
  • gdbコマンドでrunと入力

していただきくと、デバッガ上で実行できると思います。同様のエラーが起こると思いますので、その結果を貼っていただけますと助かります。

Yuki様
ありがとうございます。


【追記】
xterm を用いるとgdbの起動が出来ました。
以下エラー文です。

(gdb) r
Starting program: /home/shoma/catkin_ws/devel/lib/choreonoid_ros/choreonoid /home/shoma/catkin_ws/src/choreonoid_ros_samples/project/ROS-Tank.cnoid --start-simulation __name:=choreonoid __log:=/home/shoma/.ros/log/cedda0b4-105a-11ec-a65e-c809a8d9b8e0/choreonoid-3.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeb09f700 (LWP 29330)]
[New Thread 0x7fffea89e700 (LWP 29331)]
[New Thread 0x7fffea09d700 (LWP 29332)]
[New Thread 0x7fffe989c700 (LWP 29333)]
[New Thread 0x7fffe909b700 (LWP 29334)]
[New Thread 0x7fffe889a700 (LWP 29335)]
[New Thread 0x7fffd3fff700 (LWP 29336)]
[New Thread 0x7fffd37fe700 (LWP 29337)]
[New Thread 0x7fffd2ffd700 (LWP 29338)]
[New Thread 0x7fffd27fc700 (LWP 29339)]
[New Thread 0x7fffd1ffb700 (LWP 29340)]
[New Thread 0x7fffd17fa700 (LWP 29341)]
[New Thread 0x7fffb8ac6700 (LWP 29342)]
[New Thread 0x7fffaa7fa700 (LWP 29343)]
[New Thread 0x7fffa9ff9700 (LWP 29344)]
[New Thread 0x7fffa3fff700 (LWP 29345)]
[New Thread 0x7fffa0a04700 (LWP 29347)]
[New Thread 0x7fff97fff700 (LWP 29348)]
[New Thread 0x7fff977fe700 (LWP 29349)]
[New Thread 0x7fff96ffd700 (LWP 29350)]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Thread 1 "choreonoid" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

勝手な憶測ですが、bodyファイルの読み込みがうまくできていないように見えます。


tank.launch にgdbオプションをつけて実行しましたが、gdbの起動すらしませんでした。

$ roslaunch choreonoid_ros_samples tank.launch
... logging to /home/shoma/.ros/log/986bcb8e-1003-11ec-a65e-c809a8d9b8e0/roslaunch-shoma-book-24459.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://shoma-book:46549/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    choreonoid (choreonoid_ros/choreonoid)
    choreonoid_joy (choreonoid_joy/node)

ROS_MASTER_URI=http://localhost:11311

process[choreonoid_joy-1]: started with pid [24483]
process[choreonoid-2]: started with pid [24484]

そのためchoreonoid.launch にgdbオプションをつけて実行し、GUI上でtank.cnoidを開いたときのエラーを以下に示します。

エラーと見られるところ

[tcsetpgrp failed in terminal_inferior: Invalid argument]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Thread 1 "choreonoid" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

全文

$ roslaunch choreonoid_ros choreonoid.launch  
... logging to /home/shoma/.ros/log/986bcb8e-1003-11ec-a65e-c809a8d9b8e0/roslaunch-shoma-book-22808.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://shoma-book:37631/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    choreonoid (choreonoid_ros/choreonoid)

ROS_MASTER_URI=http://localhost:11311

process[choreonoid-1]: started with pid [22833]
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/shoma/catkin_ws/devel/lib/choreonoid_ros/choreonoid...done.
(gdb) r
Starting program: /home/shoma/catkin_ws/devel/lib/choreonoid_ros/choreonoid __name:=choreonoid __log:=/home/shoma/.ros/log/986bcb8e-1003-11ec-a65e-c809a8d9b8e0/choreonoid-1.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fffeb09f700 (LWP 22851)]
[New Thread 0x7fffea89e700 (LWP 22852)]
[New Thread 0x7fffea09d700 (LWP 22853)]
[New Thread 0x7fffe989c700 (LWP 22854)]
[New Thread 0x7fffe909b700 (LWP 22855)]
[New Thread 0x7fffe889a700 (LWP 22856)]
[New Thread 0x7fffdbfff700 (LWP 22857)]
[New Thread 0x7fffdb7fe700 (LWP 22858)]
[New Thread 0x7fffdaffd700 (LWP 22859)]
[New Thread 0x7fffda7fc700 (LWP 22860)]
[New Thread 0x7fffd9ffb700 (LWP 22861)]
[New Thread 0x7fffd97fa700 (LWP 22862)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fffb4ac6700 (LWP 22863)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fffaa7fa700 (LWP 22865)]
[New Thread 0x7fffa9ff9700 (LWP 22866)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fffa3fff700 (LWP 22867)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fffa0a04700 (LWP 22869)]
[New Thread 0x7fff97fff700 (LWP 22870)]
[New Thread 0x7fff977fe700 (LWP 22871)]
[New Thread 0x7fff96ffd700 (LWP 22872)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fff7effe700 (LWP 22909)]
[New Thread 0x7fff7e7fd700 (LWP 22910)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fff77b90700 (LWP 22912)]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
[New Thread 0x7fff77182700 (LWP 22913)]
[Thread 0x7fff7e7fd700 (LWP 22910) exited]
[Thread 0x7fff7effe700 (LWP 22909) exited]
[tcsetpgrp failed in terminal_inferior: Invalid argument]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Thread 1 "choreonoid" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

ご確認ありがとうございます。gdbからはあまり情報取れませんでしたね……。

choreonoidの画面中央下部のメッセージは取れますでしょうか?それが見えれば、cnoidファイルをどこまで読み込めたかがわかると思います。

ちなみに、こちらの手元(ROS Melodic環境)では、問題なく当該launchを立ち上げることができました。

ありがとうございます。
こちらで毎回フリーズして落ちます。

@Yuki_Onishi
ビルドしたときに以下のメッセージが表示されることに気が付きました。

なにか関係ありそうですか?

Warnings   << choreonoid_ros:make /home/shoma/catkin_ws/logs/choreonoid_ros/build.make.000.log 
/usr/bin/ld: warning: libboost_system.so.1.58.0, needed by /home/shoma/catkin_ws/devel/lib/libCnoidBase.so, may conflict with libboost_system.so.1.65.1

@Yuki_Onishi
よくわからなかったので、クリーンインストールすることに致しました。
ご協力ありがとうございました。

私の環境でも正常に動作しました。またご提示いただいた警告メッセージも出ておりません。
ひょっとすると古いソースコードを使われているかもしれないので、関連ソースパッケージについて最新のコミットにアップデートできないか試してみていただけますでしょうか。

@nakaoka
ありがとうございます。
一応、Choreonoid関連、caktin ワークスペースを削除し、改めてドキュメント通りに作り直しました。
しかしながら、挙動の変化が見られませんでした…。

... logging to /home/shoma/.ros/log/a9c64b6c-15fc-11ec-a498-c809a8d9b8e0/roslaunch-shoma-book-7849.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://shoma-book:33599/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    choreonoid (choreonoid_ros/choreonoid)
    choreonoid_joy (choreonoid_joy/node)

auto-starting new master
process[master]: started with pid [7867]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a9c64b6c-15fc-11ec-a498-c809a8d9b8e0
process[rosout-1]: started with pid [7885]
started core service [/rosout]
process[choreonoid_joy-2]: started with pid [7891]
process[choreonoid-3]: started with pid [7893]
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[choreonoid-3] process has died [pid 7893, exit code -6, cmd /home/shoma/trust_ws/devel/lib/choreonoid_ros/choreonoid /home/shoma/catkin_ws/src/choreonoid/choreonoid_ros_samples/project/ROS-Tank.cnoid --start-simulation __name:=choreonoid __log:=/home/shoma/.ros/log/a9c64b6c-15fc-11ec-a498-c809a8d9b8e0/choreonoid-3.log].
log file: /home/shoma/.ros/log/a9c64b6c-15fc-11ec-a498-c809a8d9b8e0/choreonoid-3*.log
^C[choreonoid_joy-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

根本的な解決に至ることができなくて非常に恐縮なんですが、OSのクリーンインストールをしたことで無事解決に至りました。

本当にありがとうございました。