Giter Club home page Giter Club logo

choreonoid's People

Contributors

algoryxjosef avatar arntanguy avatar fkanehiro avatar ga-sakamoto avatar gergondet avatar hattorishizuko avatar haudren avatar jun0 avatar kayusawa avatar kindsenior avatar matsu-sh avatar mehdi-benallegue avatar mitsuharu-morisawa avatar norihiro-ito avatar ompugao avatar orikuma avatar rafaelxero avatar rkoyama1623-2021 avatar s-nakaoka avatar snozawa avatar ssr-yuki avatar susaikum avatar y-masutani avatar yoheikakiuchi avatar yosuke avatar ytazz avatar yuohara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

choreonoid's Issues

新規プロジェクト保存時に jointPositions: と initialJointPositions: の数が一致しません

新規プロジェクト保存時に、プロジェクトファイルの jointPositions: と initialJointPositions: の数が一致しません。
984e766 のコミットで追加されたコードによる警告の出力で当該問題に気付きました。
以下に JVRC-1 モデルを読み込み保存した際のプロジェクトファイルの抜粋を添付します。

          id: 3
          name: "JVRC-1"
          plugin: Body
          class: BodyItem
          data: 
            modelFile: "jvrc_models/model/JVRC-1/main.wrl"
            currentBaseLink: "PELVIS"
            rootPosition: [ 0, 0, 0.854 ]
            rootAttitude: [ 
              1, 0, 0, 
              0, 1, 0, 
              0, 0, 1 ]
            jointPositions: [ 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000 ]
            initialRootPosition: [ 0, 0, 0.854 ]
            initialRootAttitude: [ 
              1, 0, 0, 
              0, 1, 0, 
              0, 0, 1 ]
            initialJointPositions: [ 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000,  0.000000, 
               0.000000,  0.000000,  0.000000,  0.000000,  0.000000 ]
            zmp: [ 0, 0, 0 ]
            collisionDetection: true
            selfCollisionDetection: false
            isEditable: true

Request for new version release

start-jsk/rtmros_choreonoid#134
で議論されていることなのですが、

  • choreonoidのOpenRTMPlugin正しく上がらない
  • 原因は、"openrtmのソースでtrunkのバージョンが1.1.1 から 1.1.2へ最近変更された"こと

ということが起こっています。
choreonoidのdeb新しいversionをリリースしていただけないでしょうか?

CMakeList.txtでsourcesとheadersの登録の仕方を変更したい

#1 でmake install時に入れるべきファイルリストでの追加忘れがありましたが,他の部分にも同様の追加忘れがあるようです

今まではCMakeLists.txtで
set(headers
 file1
 file2
...
)
というように,ファイルをひとつづつ指定していますが,これだと追加忘れが起きやすいと思います.
choreonoid本体のみのビルドは通ると思いますが,外部プラグインを開発する際にヘッダファイル等の追加忘れがあるとビルドが通りません.
そこで
file(GLOB headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h")
(必要に応じてGLOBをGLOB_RECURSEに変更)
とすると追加忘れが起きにくいと思います.

また,src/Util/CMakeLists.txtのようにsourcesに含めたくないファイルや,リストの最後に追加しなければならないファイル等は以下のようにすれば対応できると思います.
file(GLOB sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
list(REMOVE_ITEM sources "CnoidUtil.cpp" "JoystickLinux.cpp" "JoystickWindows.cpp" "JoystickOSX.cpp" "ysjoyreader-objc.m")
set(sources ${sources} "CnoidUtil.cpp") # This file must be placed at the last position

以上のようにheaders,sourcesを指定した方が個人的には良いと思うのですが,ファイルをひとつずつ指定している何か特別な理由はありますでしょうか?
もし,無いようなら提案した様なやり方でheaders,sourcesを指定してみようと思うのですが,どうでしょうか?

宜しくお願いします.

Compilation error due to libpng

While trying to compile Choreonoid on Arch Linux, I get the following compilation error:

[  7%] Building CXX object src/Util/CMakeFiles/CnoidUtil.dir/ImageIO.cpp.o
In file included from /usr/include/pngconf.h:50:0,
                 from /usr/include/png.h:344,
                 from /home/user/dev/choreonoid/src/Util/ImageIO.cpp:11:
/home/user/dev/choreonoid/src/Util/ImageIO.cpp: In function ‘void {anonymous}::savePNG(const cnoid::Image&, const string&, bool)’:
/home/user/dev/choreonoid/src/Util/ImageIO.cpp:186:22: error: invalid use of incomplete type ‘png_struct {aka struct png_struct_def}’
     if(setjmp(png_ptr->jmpbuf)){
                      ^
In file included from /home/user/dev/choreonoid/src/Util/ImageIO.cpp:11:0:
/usr/include/png.h:459:16: note: forward declaration of ‘png_struct {aka struct png_struct_def}’
 typedef struct png_struct_def png_struct;
                ^

This feature was recently implemented in 4036b81.

The version of libpng is 1.6.20 on my system. I've got a patch on the way.

Use CTRL+S to save project and other save problems

During my experiments, I was trying to modify the project. However, by reflex I hit CTRL+S to save the project then closed the window.

The result is that my project was not saved.

Would there be any way to implement this behaviour? We could also add CTRL+SHIFT+S as "Save the Project As...".

It could also be nice to warn the user if the project has not been saved but this could become annoying if not deactivable.

Another problem is that when the project is a write-protected directory (Such as /usr/local/share/choreonoid-1.5), attempting to save it does not produce any meaningful error, but the project is not saved. The only output in the console is "Saving a project file has been finished."

Cheers,
Hervé

SimpleControllerPlugin と OpenRTCPlugin について

SimpleControllerPluginとOpenRTCPluginを両方同時にシミュレーションで使うことはできるでしょうか?
JVRCのチュートリアルにあるBodyRTCと
http://jvrc.github.io/tutorials/html-ja/index.html
SimpleControllerPluginで作ったプラグインを同時に使おうとしたのですが、
シミュレーションを走らせると、どちらかだけが有効になり同時に2つ使うことができませんでした。
図のように、BodyRTCとSimpleControllerを並列についかしてあり、シミュレーションを実行すると
チェックを入れてある方が使われます。両方チェックを入れると片方しか使われません。

cnoid_plugin

pcファイルで指定するライブラリが不足?

pkg-configを使ってChoreonoidのライブラリをリンクすると、boost-systemとboost-filesystemを更に追加でリンクする必要があります。
pcファイルに指定するライブラリの不足でしょうか。

時間経過におけるシミュレータのリアルタイムファクタの現象について

choreonoidを実行していて、一定時間が過ぎるとリアルタイムファクタが落ちるように感じます。
一時間くらい動かしているとrealtimefactorが0.16(1/6)くらいになっている感じです。
他のプログラムも同時に立ち上げているので、原因ははっきりとわかってませんが、
https://github.com/jsk-ros-pkg/jsk_control/issues/457 
(すいません。関係のない議論が多く混ざってます)

にあるように、
choreonoidで毎ステップのシミュレーション結果を保存していて遅くなる、といったことはあるでしょうか?

BodyRTCの設定ファイルの指定について

BodyRTCの設定ファイルをカレントディレクトリに置きたく,ファイルの場所をフルパスで/a/b/c/d.conf と書きました(パス名は仮のものです./a/b/cがカレントディレクトリ).メッセージビューにはそのファイルが読み込まれたと表示されます.プロジェクトを保存し,Choreonoidを再起動すると,BodyRTCのプロパティの設定ファイル名は,/a/b/c/d.conf ではなく,d.conf になっており,メッセージビューには,「"/usr/lib/choreonoid-1.5/rtc/d.conf" は存在しないか、開けません。」と表示されます.

使いにくいと思うのですが,どういう意図でこのような仕様になっているのでしょうか?

choreonoid が死んでしまう

start-jsk/rtmros_choreonoid#14
でissueになっていますが,choreonoidのsimulationをstartしたところでprogramが落ちてしまいます。

Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/choreonoid...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/choreonoid /home/leus/ros/hydro/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/jaxon_hg.cnoid
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe3e4d700 (LWP 12153)]
[New Thread 0x7fffe364c700 (LWP 12154)]
[New Thread 0x7fffe21db700 (LWP 12155)]
[New Thread 0x7fffce00b700 (LWP 12170)]
[New Thread 0x7fffcd80a700 (LWP 12171)]
[New Thread 0x7fffcd009700 (LWP 12172)]
[New Thread 0x7fffcc808700 (LWP 12173)]
HGcontroller0: onInitialize()
[New Thread 0x7fffc5f3c700 (LWP 12205)]
[Thread 0x7fffc5f3c700 (LWP 12205) exited]
[New Thread 0x7fffc573b700 (LWP 12206)]
[Thread 0x7fffc573b700 (LWP 12206) exited]
[New Thread 0x7fffb8253700 (LWP 12216)]
Warning : Three or more triangles is defined for a edge.
cloneMap.setNonNodeCloning(true);
[New Thread 0x7fffb4b04700 (LWP 12581)]
cloneMap.setNonNodeCloning(true);
[New Thread 0x7fff9f5c8700 (LWP 12582)]
cloneMap.setNonNodeCloning(true);
[New Thread 0x7fffb7572700 (LWP 12586)]
cloneMap.setNonNodeCloning(true);
[New Thread 0x7fff9edc7700 (LWP 12587)]
cloneMap.setNonNodeCloning(true);
[New Thread 0x7fff9e5c6700 (LWP 12591)]
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Program received signal SIGABRT, Aborted.
0x00007ffff5ec20d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0  0x00007ffff5ec20d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff5ec583b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff64f0d4d in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff64eed96 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff64eede1 in std::terminate() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff64ef046 in __cxa_rethrow ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff695816c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffff695cf67 in QCoreApplication::exec() ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffff7a11295 in ?? () from /usr/bin/../lib/libCnoidBase.so.1.5
#9  0x0000000000400f99 in main ()

これはどのようなエラーでしょうか?

関節スライダが表示されない

wrlを読み込んでアイテムビューをチェックして,シーンビューにロボットが表示されますが,関節スライダビューは空白のままです.この状態で「ラジアン」ボタンをクリックするとコアダンプします.シーンビューを編集モードにして,どこかのリンクをダブルクリックすると(偶然見つけましたが,これはどういう意味が割りつけられているのでしょうか?),関節スライダビューにスライダが出現します.

この現象は,qtconfigでGUIスタイルを「Cleanlook」にしていると発生します.「デスクトップの設定(デフォルト)」では問題ありません.qtconfigの設定は
http://choreonoid.org/ja/manuals/1.5/install/build-ubuntu.html#id5
で推奨されているものです.

Ubuntu 14.04 64bitでPPAからインストールしたものを使っています.

ボディモーションの自動更新

ボディモーションを自動更新にしていた場合,起動時にポーズからモーションを生成するようにしていただけませんか.それを忘れていて,戸惑うことが何度となくあります.

角**量ヤコビアンが欲しい

現状,src/Body/Jacobian.cppのcalcCMJacobian()で重心ヤコビアンを求めることはできますが,角**量ヤコビアンを求めるメソッドはないと思います.

Jacobian.cppを見ると
構造体SubMassと関数calcSubMassを改良してイナーシャに関する実装を追加する
 or
それらとよく似た構造体と関数を実装する(SubMassInertiaとcalcSubMassInertiaとか)
だけで比較的容易に角**量ヤコビアンを計算することができると思います.
(ver1.4では外部プラグインでそうしていました.)

角**量ヤコビアンを計算できると分解**量制御とかが実装できて非常に便利だと思いますが,みなさんどうでしょうか?

モデルを読み込んだらデフォルトで表示して欲しい

現状モデルを読み込んでもチェックを入れないと表示されませんが、デフォルトでチェックを入れるようにすると何か不都合ありますでしょうか。デフォルトで表示された方が使い勝手がよいと思うのですが。

choreonoidのdebとソースの違い?

今までdebのchoreonoidを使っていたのですが、
この度git clone してコンパイルして使ってみたところ、errorが出てロボットがヘタる(力が全く入ってない)ようになってしまいました。
やったことは、

git clone https://github.com/s-nakaoka/choreonoid.git
cd choreonoid
mkdir build
cd build
cmake ..
sudo make install

だけだったと思います。

choreonoid側の出力は、

Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidPythonPlugin.so"
Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidPythonSimScriptPlugin.so"
Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidBodyPlugin.so"
Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidSimpleControllerPlugin.so"
Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidPoseSeqPlugin.so"
Detecting plugin file "/usr/local/lib/choreonoid-1.5/libCnoidBalancerPlugin.so"
Body-plugin has been activated.
PoseSeq-plugin has been activated.
Python-plugin has been activated.
PythonSimScript-plugin has been activated.
SimpleController-plugin has been activated.
Balancer-plugin has been activated.

Loading project file "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/JVRC_VALVE.cnoid" ...
Task sequencer '' has been deactivated.
Restoring WorldItem "World"
Restoring BodyItem "JAXON_JVRC"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/jvrc_models/JAXON_JVRC/JAXON_JVRCmain_hrpsys_bush.wrl"
 -> ok!
Warning: OpenRTMPlugin is not loaded.
Warning: BodyRTCItem of OpenRTMPlugin is not a registered item type.
Warning: "BodyRTC" cannot be restored.
Restoring BodyItem "wall"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/jvrc_models/model/tasks/O1/wall.wrl"
 -> ok!
Restoring BodyItem "surface"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/jvrc_models/model/tasks/O1/surface.wrl"
 -> ok!
Restoring BodyItem "valve"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/model/tasks/VALVE/valve.wrl"
 -> ok!
Restoring BodyItem "drcbox"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/model/tasks/VALVE/drcbox.wrl"
 -> ok!
Restoring BodyItem "valve2"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/model/tasks/VALVE/valve.wrl"
 -> ok!
Restoring BodyItem "drcbox2"
Loading OpenHRP Model File "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/model/tasks/VALVE/drcbox.wrl"
 -> ok!
Restoring AISTSimulatorItem "AISTSimulator"
Warning: JVRCPlugin is not loaded.
Warning: JVRCManagerItem of JVRCPlugin is not a registered item type.
Warning: "JVRCManager" cannot be restored.
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
Restoring GLVisionSimulatorItem "GLVisionSimulator"
16 / 18 item(s) are loaded.
Warning: 2 item(s) are not correctly loaded.
Project "/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_ros_bridge_jvrc/config/JVRC_VALVE.cnoid" has been loaded.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "HEAD_LEFT_CAMERA" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "CHEST_CAMERA" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "HEAD_RANGE" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "LARM_CAMERA" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "RARM_CAMERA" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "LARM_CAMERA_N" of JAXON_JVRC as a target.
SubSimulatorItem "GLVisionSimulator" has been detected.
GLVisionSimulator detected vision sensor "RARM_CAMERA_N" of JAXON_JVRC as a target.
Simulation by AISTSimulator has started.

と出ています。terminalでの出力は
https://gist.github.com/YuOhara/b5f63f4417b44e956354
のようになっています。

SimpleControllerのbuildにおいてエラーになる

/usr/include/choreonoid-1.5/cnoid/SimpleControllerをincludeすると、
/usr/include/choreonoid-1.5/cnoid/src/SimpleControllerPlugin/library/SimpleController.hを読みに行くようですが、
/usr/include/choreonoid-1.5/cnoid/src/SimpleControllerPlugin/libraryにはexportdecl.h がなくエラーになります。
ソースには存在しているようです。

Loading an ill-formed hrpsys file set does not produce any errors

I am currently experimenting along loading hrpsys sequence file sets. Whenever the file has an incorrect number of elements per line or is ill-formed, the only error is:

Loading HRPSYS Sequence File Set "my_file.pos"
 -> failed.

Whereas I see in the source (Util/PlainSeqFormatLoader.cpp) that the loader should produce various error messages that ought to be outputted on loading (Body/BodyMotionUtil.cpp:146 loadHrpsysSeqFileSet) but the output stream is maybe incorrect ?

ubuntu12でのコンパイル

以下のようなエラーでubuntu12でのコンパイルができなくなりました。

src/Base/MovieRecorder.cpp:40:35: fatal error: X11/extensions/Xfixes.h: No such file or directory

何かパッケージを追加でインストールする必要がありますでしょうか。それともubuntu12はサポートの対象外でしょうか。

Loading a sequence file containing non-numbers crashes

I think everything is in the title: if an hrpsys .pos file contains some (unexpected) text, the application crashes right away, throwing:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target

I think the program should not crash on ill-formed input whatever the cause. Even if we can not predict all bad cases, returning a defaut error message should be enough.

Full backtrace here: https://gist.github.com/haudren/62dabc99fd759396938f

Cheers,
Hervé

ファイル保存時のエラーチェック

プロジェクトファイルなどを保存する際に、パーミッションの関係で保存できないディレクトリを指定すると、当然保存できないのですが、メッセージビューには保存できたかのようなメッセージが出ます。

jvrc/tutorials#8

Floating point exception when using the Kinematic Check tool

When I use the kinematic fault checker (In the tools menu), choreonoid crashes when attempting to check.

Workflow:

Open choreonoid
Add the HRP2 model (Open OpenHRP model)
Add a sample motion (Import hrpsys sequence file) i.e. a *.pos file
Tools -> Kinematic Checker -> Default settings -> Apply

Result:

Program received signal SIGFPE, Arithmetic exception.
0x00007fffe4fc62a1 in at (colIndex=0, rowIndex=0, this=0x1e48be0)
    at /home/herve/workspace/choreonoid_drc/choreonoid/src/Util/Deque2D.h:561
561         return buf[(offset + (rowIndex * colSize_)) % capacity_ + colIndex];

Backtrace:
https://gist.github.com/haudren/42ffc65ebad9244a3573

However, the fault checker does work properly whenever I use the sample GR0001 project. I suppose that there is a problem with either my setup, or with the hrpsys files that are not wrapped in a pseq.

Anyway I do not think the application should ever crash on SIGFPE during normal use.

I can send you the .cnoid file if you wish.

Thank you,
Hervé

外部のpythonインタープリタからchoreonoidに接続したい

PythonPluginを用いるとchoreonoidのPythonコンソールからchoreonoidを操作できると思います.
bash等で起動したipythonの補完やショートカット等がPythonコンソールからは効きません
bash等で外部から起動したpythonからchoreonoidを操作したいのですが、可能でしょうか?

LD_LIBRARY_PATHにlib/choreonoid-1.5を
PYTHONPATHにlib/choreonoid-1.5/pythonを
追加すると
from cnoid.BodyPlugin import *
といったモジュールのインポートはできるようになったのですが、
起動してあるchoreonoidのアイテムを取得しようとして
ItemTreeView.instance()
などとすると
choreonoid上のPythonコンソールでは<cnoid.Base.ItemTreeView object at ...>のようなオブジェクトが取得できますが、
外部から起動したpythonでは取得できず、続けて
ItemTreeView.instance().checkedItems(BodyItem)
とすると'NoneType' object has no attribute 'checkeditems'となります

32bit OSでコンパイルエラー

ubuntu 12.04, 14.04, 15.04の32bit版で以下のようなコンパイルエラーとなります。

/«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:357:65: error: no matching function for call to 'min(std::basic_string<char>::size_type, long unsigned int&)'
             maxLength = std::min(memberNames[i].size(),maxLength);
                                                                 ^
/«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:357:65: note: candidates are:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from /usr/include/boost/function/detail/prologue.hpp:13,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Util/SignalTemplate.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Util/Signal.h:186,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/include/cnoid/Signal:1,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Base/View.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/include/cnoid/View:1,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:5:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note:   template argument deduction/substitution failed:
/«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:357:65: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'long unsigned int')
             maxLength = std::min(memberNames[i].size(),maxLength);
                                                                 ^
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from /usr/include/boost/function/detail/prologue.hpp:13,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Util/SignalTemplate.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Util/Signal.h:186,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/include/cnoid/Signal:1,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/Base/View.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/include/cnoid/View:1,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.h:8,
                 from /«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:5:
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note:   template argument deduction/substitution failed:
/«BUILDDIR»/choreonoid-1.5.0+dfsg+20151223+508+17~ubuntu14.04.1/src/PythonPlugin/PythonConsoleView.cpp:357:65: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned int' and 'long unsigned int')
             maxLength = std::min(memberNames[i].size(),maxLength);

シミュレーション時のモデル間の摩擦係数の設定

シミュレータアイテムのプロパティビューでStatic frictionとSlip frictionを設定するとシミュレータ内にある全ての物体の摩擦係数を設定できると思っています.

一方,シミュレータ内に3つ以上の物体があるとき,3つの物体をA,B,Cとすると
A・B間,B・C間,C・A間で摩擦係数が異なるという状況があると思います.

そのように異なる物体間で異なる摩擦係数を設定する方法はありますでしょうか?
大変お忙しいとは思いますが,宜しくお願いたします.

Invalid OpenGL call in GLSceneRendererImpl

After seeing the following SIGFPE in GLSceneRenderer:

0x00007ffff78b94cb in cnoid::GLSceneRendererImpl::pick (this=0x555555a7adb0, x=0x41, y=0x143) at choreonoid/src/Base/GLSceneRenderer.cpp:1340
1340        unsigned int id = (color[0] * 255) + ((int)(color[1] * 255) << 8) + ((int)(color[2] * 255) << 16) - 1;
gdb$ p/f color
$3 = {1.8806588e+13, 3.0611365e-41, -9.92069426e+33, 4.59163468e-41}

I noticed that there was no OpenGL error checking in choreonoid. After enabling that, the error appears there:

OpenGL error 0x0502 (GL_INVALID_OPERATION) at choreonoid/src/Base/GLSceneRenderer.cpp:1315 - for glPushAttrib(GL_ENABLE_BIT)

The error should probably be solved in SceneWidgetImpl::updateLatestEventPath() were the call to pick() is made (see here). I don't know if that's the actual issue, but the OpenGL doc states:

GL_INVALID_OPERATION is generated if glPushAttrib or glPopAttrib is executed between the execution of glBegin and the corresponding execution of glEnd.

Using an OpenGL debugger such as apitrace would probably help there.

Also, if you want, I can make a PR for the OpenGL error checking code in debug mode. This is highly recommended.

シミュレーション速度と精度の向上

1[ms]周期で関節サーボを行い、5[ms]周期で上位の処理を行っているロボットシステムがあるとします。

現状これをシミュレーションするには、BodyRTCでコントローラモジュールとして関節サーボを行うコンポーネントを指定し、BodyRTCの実行周期として5[ms]を、シミュレーションの時間刻みとして1[ms]を指定すると思います。

この設定だと、次のような2つの問題があると思います。

  • 上位の処理がシミュレーションのメインループが5回実行される毎に1回同期的に実行される。上位の処理は一般的に重く、1[ms]以上かかる場合が多いので、実時間シミュレーションを妨げる原因になる
  • 上位の処理が計算した結果は実システムでは次の5[ms]周期の先頭で関節サーボ側に反映されるが、シミュレーションでは1[ms]後に反映されるため、シミュレーションの精度を低下させる原因となる。

より実システムに近づけられる設定方法はありますでしょうか。

Segmentation fault with Boost 1.58 + Python scripts

As this may also happen to other users: choreonoid relies on boost::python::exec_file to run user Python scripts. However, Boost 1.58 was released with a bug when using Python 2, leading to a choreonoid segv.

Related Boost.Python bug report: boostorg/python#15

To confirm that your Boost version is impacted, the repro code given here does the trick:

test.cc

#include <boost/python.hpp>

using namespace boost::python;

int main(int argc, char** argv)
{
  Py_Initialize();

  object main = import("__main__");
  object ns = main.attr("__dict__");
  exec_file("action.py", ns, ns);

  return 0;
}

Compilation & execution

$ touch action.py && g++ test.cc -I/usr/include/python2.7 -lboost_python -lpython2.7 && ./a.out

I implemented a workaround that involves reading the file ourselves and forwarding the string to execCode. This is far from ideal, so I'll make a cleaner patch that checks the Boost version and make a PR.

CONSTRAINT_FORCEの使い方

BodyRTCのconfファイルに、以下のような記述を入れると、
body.rtcに const_force のポートができることが確認できました。

out-port = const_force:LLEG_JOINT5:CONSTRAINT_FORCE

デフォルトの設定では、このポートからは接触データが出力されていないようで、
ソースでは以下のところで、isConstraintForceOutputModeがtrueになる必要があるようです。
https://github.com/s-nakaoka/choreonoid/blob/master/src/Body/ConstraintForceSolver.cpp#L1735-L1737

設定ファイルの書き方などでCONSTRAINT_FORCEを出すようにできますでしょうか?
よろしくお願いします。

Pythonインタプリタでのモデル等の取得について

Pythonインタプリタの使用法についての質問です.

choreonoid-1.5.0/sample/python/SR1Walk.py等を参考にしていて,
インタプリタにてWorldItemを新たに作成したりBodyItemのモデルファイルを新たにロードする方法は分かるのですが,既にchoreonoidのGUI操作等から作成・ロードしたItemを取得するにはどのようにすればいいでしょうか?

具体的には
c++のプラグインでいうと

ItemList<BodyItem> bodyItems = ItemTreeView::mainInstance()->checkedItems<BodyItem>();
body = bodyItems[0]->body();

のような操作をPythonインタプリタにて実行する方法を知りたいです.

バランス補正に関するプラグインについて

千葉工業大学工学部未来ロボティクス学科の山本です。バランス補正のプラグインに関して質問があったのでissueを作成させていただきました。

githubに移行前の公式HPにあがっていたソースでは、バランス補正のプラグインはコンパイル済みのバイナリ版として公開されていましたが、githubに移行後はバランス補正のプログラムは公開はされていないのでしょうか?

独自のモデルを使ってchoreonoidでバランス補正の機能を使いたい場合は自分でプログラムを作成することになるのでしょうか?

ご教授よろしくお願いします。

ポーズ列アイテムとシミュレーションの併用

github.com/jvrc/samplesのsample3.cnoidで一つのcnoidファイルに関節にPD制御を適用するシミュレーション用の設定とポーズ列アイテムが入っているのですが、そのままシミュレーションを開始するとロボットが弾かれたように転倒します。ポーズ列アイテムを削除すると正常に動作します。以前はこのままで動作していたように思いますが、何か変わりましたでしょうか。また何が起きているのでしょうか?

ForceSensor の挙動について

ForceSensor の rotation 設定で角度を指定し、センサ可視化で確認すると矢印マーカが指定した角度の向きに伸びますが、これは想定通りの挙動でしょうか。
Choreonoid 付属の SR1 モデルを以下のように修正し、AIST シミュレータのハイゲインモードでシミュレーションを実行し確認しましたが、モデルは直立して静止した状態なので、角度指定に関わらず矢印マーカが直上に伸びるのではないかと考え質問する次第となります。

$ diff -u SR1.wrl.orig SR1.wrl
--- SR1.wrl.orig    2016-02-18 11:20:23.988746501 +0900
+++ SR1.wrl 2016-02-18 17:39:51.597644977 +0900
@@ -785,7 +785,7 @@
                                      children [
                       DEF LeftAnkleForceSensor ForceSensor {
                     translation 0 0 0
-                    rotation 1 0 0 0
+                    rotation 1 0 0 0.785
                     sensorId 0
                       }
                       DEF LEG_SHAPE6 Transform {

yamlのモデルファイルでパス変数を使いたい

yamlのモデルファイルでwrlを指定するときにパス変数を使いたいです

やり方としては

  1. pythonスクリプトからならパス変数を使用してモデルファイルを読み込める
    2.ファイルメニュー->プロジェクトファイルオプション->パス変数の設定でできそう?
    があると思っています

以下,質問です
1.に関してはパス変数を使用したモデルファイルの読み込みはできているのですが,pythonからのプロジェクトファイルの読み込み方法が分からず,プロジェクトファイルによる様々な表示設定ができないので不便です.
pythonからプロジェクトファイルを読み込む方法はありますでしょうか?

2.に関して
a)そもそもユーザがパス変数を設定して,これをプロジェクトファイルやモデルファイル(yamlファイル)で参照できるようになるというものでしょうか?
b) a)の場合,適当に設定してみたところ,設定ファイルのpathVariablesというところに設定はできたようなのですが,プロジェクトファイルやyamlからはどのように参照すればよいでしょうか?
(ソースをぱっと見た感じだとプロジェクトの読み込み時に変数を参照する部分はまだ実装されてない感じでしょうか??)

3.他にyamlのモデルファイルやプロジェクトファイルでパス変数をしようする方法はありますでしょうか?

お忙しいところ大変申し訳ございませんが,宜しくお願い致します

シミュレーターにおいて考慮されている制限について

シミュレータ上では、ロボットのモデルファイルに書いてある関節角度の制限の範囲外の角度になってしまっているようですが、これは正しい動作でしょうか?

また、シミュレータでは、モデルファイルに書いてある関節速度リミット、電流制限(から計算できる関節トルク制限)は考慮されていますでしょうか?

Compilation error of PyBulletPlugin

While trying to compile the master branch of choreonoid on Arch Linux, I encountered the following build error:

Scanning dependencies of target PyPythonSimScriptPlugin
[ 98%] Building CXX object src/PythonSimScriptPlugin/python/CMakeFiles/PyPythonSimScriptPlugin.dir/PyPythonSimScriptPlugin.cpp.o
/tmp/makepkg/choreonoid-git/src/choreonoid/src/BulletPlugin/python/PyBulletPlugin.cpp: In function ‘void cnoid::init_module_BulletPlugin()’:
/tmp/makepkg/choreonoid-git/src/choreonoid/src/BulletPlugin/python/PyBulletPlugin.cpp:40:63: error: ‘createInstance’ was not declared in this scope
             .def("__init__", boost::python::make_constructor(&createInstance<BulletSimulatorItem>));
                                                               ^
/tmp/makepkg/choreonoid-git/src/choreonoid/src/BulletPlugin/python/PyBulletPlugin.cpp:40:97: error: expected primary-expression before ‘>’ token
             .def("__init__", boost::python::make_constructor(&createInstance<BulletSimulatorItem>));
                                                                                                 ^
/tmp/makepkg/choreonoid-git/src/choreonoid/src/BulletPlugin/python/PyBulletPlugin.cpp:40:98: error: expected primary-expression before ‘)’ token
             .def("__init__", boost::python::make_constructor(&createInstance<BulletSimulatorItem>));
                                                                                                  ^
src/BulletPlugin/python/CMakeFiles/PyBulletPlugin.dir/build.make:54: recipe for target 'src/BulletPlugin/python/CMakeFiles/PyBulletPlugin.dir/PyBulletPlugin.cpp.o' failed
make[2]: *** [src/BulletPlugin/python/CMakeFiles/PyBulletPlugin.dir/PyBulletPlugin.cpp.o] Error 1
CMakeFiles/Makefile2:1341: recipe for target 'src/BulletPlugin/python/CMakeFiles/PyBulletPlugin.dir/all' failed
make[1]: *** [src/BulletPlugin/python/CMakeFiles/PyBulletPlugin.dir/all] Error 2

Boost 1.58, Bullet 2.82, Python 2.7.9.

Choreonoid 1.4におけるRIC30モデルの不具合?

開発版の問題ではないのですが, choreonoid-users-jaでは応答がないので,こちらにも書きます.

Choreonoid 1.4 Windows版で添付のRIC30のモデルを使っていてよくわからな
い現象に遭遇しましたので,助けてください.

不具合が再現するできるだけ簡単な事例を以下に記します.


Choreonoid 1.4を起動

ファイル→新規→ワールド

ワールドを選択し,ファイル→読み込み→OpenHRPモデルファイル
C:\Program Files (x86)\Choreonoid 1.4\share\model\RIC30\RIC30.yaml

RIC30を選択し,ファイル→新規→ポーズ列

PoseSeqを選択

関節スライダ
全関節を表示
ラジアンを選択

ポーズロール
0秒において,全関節0を挿入

関節スライダ
R_KNEE_Pだけを-0.4[rad],他は全て0

ポーズロール
1秒において「挿入」

関節スライダに表示される関節角度は
R_HIP_P -0.144
R_KNEE_P -0.112
R_ANKLE_P 0.144
になってしまう.

シーンに表示されるロボットを見ても,股関節と足関節のピッチは0ではない.

ポーズロール
時刻同期にチェックを入れて,0~1秒で時刻を動かしてみると,
0.645秒において
R_HIP_P 0.000
R_KNEE_P -0.282
R_ANKLE_P 0.000
だったものが,0.646秒において
R_HIP_P -0.127
R_KNEE_P -0.033
R_ANKLE_P 0.127
に急変する.

以上のポーズ列を保存したpseqファイルの中では,
time: 1
(中略)
q: [
0, 0, 0, -0.4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 ]
となっている.

Choreonoid 1.4を起動し直し,ワールドとRIC30を設定し,上記で保存した
pseqファイルを読み込むと,1秒における関節角度は,
R_HIP_P -0.144
R_KNEE_P -0.112
R_ANKLE_P 0.144
になっている.

この問題は,上記の「-0.4」を「-0.3」にすると起こらない.

上記の「-0.4」を「-2.0」のような大きな値にすると,R_HIP_PとR_ANKLE_Pだ
けでなく,他の3関節R_HIP_Y, R_HIP_R, R_ANKLE_Rも連動してしまう.

同様のことを似たモデルであるGR001で試すと,関節の連動は起きているが,
ポーズを与えた時刻で異なるポーズになってしまう問題は起きない.


以上です.cnoidファイルとpseqファイルを添付します(拡張子.txtを追加しています).

この問題は,皆様の環境でも再現するでしょうか?

関節が連動するのは仕様でしょうか?意味のある動きのように見えません.
また,RIC30では,ポーズを与えた時刻にポーズが再現しないのは困ります.

解決方法をご教示いただけると幸いです.

よろしくお願いいたします.

PoseSeq-ric30.pseq.txt
ric30-test.cnoid.txt

メッセージビューでCtrl+Cが効かない

ChoreonoidのメッセージビューでCtrl+Cが効きません.右クリックのポップアップメニューで,クリップボードへのコピーはできます.メニューには「Copy Ctrl+C」と書いてありますが,キーではできません.同じ位置にある,Pythonコンソールでは,Ctrl+Cが効きます.これを書いていて気づきましたが,Select AllのCtrl+Aも効きません.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.