Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when starting the Choreonoid project #4

Open
stephane-caron opened this issue Apr 25, 2020 · 8 comments
Open

Errors when starting the Choreonoid project #4

stephane-caron opened this issue Apr 25, 2020 · 8 comments

Comments

@stephane-caron
Copy link

Hi guys,

Re-posting here this question from @kx-guan. I hope you can help him with this, I don't remember the OpenRTM peculiarities well enough to be of any help here 😅

@stephane-caron
Copy link
Author

Here is the content of the question:

Messages on Choreonoid:

==========================================
 .
 .
 .
プロジェクトファイル"sim_mc.cnoid"を読み込み中…
タスクシーケンサ '' が非活性化されました.
PythonPlugin: "/usr/local/lib/python2.7/dist-packages/hrpsys" がPythonのモジュールパスに追加されました.
ExtCommandItem "ModelLoader" を読み込み中
OpenGL version is 3.0.
GLSL version is 1.30.
外部コマンド"openhrp-model-loader"がアイテム"ModelLoader"によって実行されました.
WorldItem "World" を読み込み中
ready
BodyItem "JVRC1" を読み込み中
ボディ "/usr/local/share/OpenHRP-3.1/robot/JVRC1/main.wrl" を読み込み中
 -> 完了!
BodyRTCItem "BodyRTC" を読み込み中
設定ファイル "/usr/local/lib/choreonoid-1.7/rtc/Virtual-JVRC1-RTC.conf" が読み込まれました.
RTC "PDcontroller" を "/usr/local/lib/choreonoid-1.7/rtc/PDcontroller.so" から生成しました.
RTC "JVRC1Controller(Robot)0" を生成しました.
SensorVisualizer "SensorVisualizer" を読み込み中
loading 
 cannot be found.
Retrying to load the file as a standard VRML file
 cannot be found.
loading failed.
 cannot be found.
BodyItem "longfloor" を読み込み中
ボディ "/usr/local/share/OpenHRP-3.1/sample/model/longfloor.wrl" を読み込み中
 -> 完了!
AISTSimulatorItem "AISTSimulator" を読み込み中
PythonSimScriptItem "sim_mc.py" を読み込み中
シミュレーション用Pythonスクリプト "/usr/local/share/hrpsys/samples/JVRC1/sim_mc.py" を読み込み中
 -> 完了!
8 / 8 のアイテムが読みこまれました.
プロジェクト "sim_mc.cnoid" を完全に読み込みました.
RTコンポーネントの設定をしています.
実行コンテキストを取得しました.
接続 JVRC1Controller(Robot)0:q --> PDcontroller0:angle
接続に成功しました.
接続 JVRC1Controller(Robot)0:tau <-- PDcontroller0:torque
接続に成功しました.
AISTSimulatorによるシミュレーションを開始しました.
Pythonスクリプト "sim_mc.py" の実行を開始しました.
[rtm.py] nshost already set as localhost
[rtm.py] nsport already set as 2809
[rtm.py] Failed to parse corba.master_manager, use 2810
[rtm.py] configuration ORB with localhost:2809
[rtm.py] configuration RTCManager with localhost:2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
Manager not found
creating components
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
Manager not found
Pythonスクリプト "sim_mc.py" の実行に失敗しました.
Traceback (most recent call last):
  File "<string>", line 144, in <module>
  File "<string>", line 113, in init
  File "<string>", line 69, in createComps
AttributeError: 'NoneType' object has no attribute 'load'
============================

Messages on terminal:

============================
choreonoid: オプションには引数が必要です -- 'f'
PDcontroller0: onInitialize() 
ModelLoaderException :  cannot be found.
[PDcontroller0] failed to load model[]
PDcontroller0: on Activated 
[PDcontroller0] Gain file [] not opened
[PDcontroller0] No pdcontrol_tlimit_ratio found.
[PDcontroller0] All tlimit_ratio are set to 1.0.
[PDcontroller0] loadGain
[PDcontroller0] m_robot is not set properly!! Maybe ModelLoader is missing?
[PDcontroller0] m_robot is not set properly!! Maybe ModelLoader is missing?
[PDcontroller0] m_robot is not set properly!! Maybe ModelLoader is missing?
============================

I have investigated the error messages from the terminal, and found these were from the
the [PDcontroller] component of hrpsys-base. Then I changed "Virtual-JVRC1-RTC.conf"
in sim_mc.cnoid to "PDcontroller.conf"(In mc_openrtm git, there is no "PDcontroller.conf", but there is a "PDcontroller.in.conf.choreonoid" file).
I replaced the "ffile:///@OPENHRP3_1_PREFIX@/share/OpenHRP-3.1/robot/JVRC1/main.wrl" to "/usr/local/share/OpenHRP-3.1/robot/JVRC1/main.wrl" in "PDcontroller.conf"
and then copied this to "/usr/local/lib/choreonoid-1.7/rtc/".
But there are still errors as follows.

Messages on Choreonoid:

==========================================
 .
 .
 .
プロジェクトファイル"sim_mc.cnoid"を読み込み中…
タスクシーケンサ '' が非活性化されました.
PythonPlugin: "/usr/local/lib/python2.7/dist-packages/hrpsys" がPythonのモジュールパスに追加されました.
ExtCommandItem "ModelLoader" を読み込み中
OpenGL version is 3.0.
GLSL version is 1.30.
外部コマンド"openhrp-model-loader"がアイテム"ModelLoader"によって実行されました.
WorldItem "World" を読み込み中
ready
BodyItem "JVRC1" を読み込み中
ボディ "/usr/local/share/OpenHRP-3.1/robot/JVRC1/main.wrl" を読み込み中
 -> 完了!
BodyRTCItem "BodyRTC" を読み込み中
"/usr/local/lib/choreonoid-1.7/rtc/PDcontroller.conf" は存在しないか,開けません.
RTC "PDcontroller" を "/usr/local/lib/choreonoid-1.7/rtc/PDcontroller.so" から生成しました.
RTC "JVRC1Controller(Robot)0" を生成しました.
SensorVisualizer "SensorVisualizer" を読み込み中
loading 
 cannot be found.
Retrying to load the file as a standard VRML file
 cannot be found.
loading failed.
 cannot be found.
BodyItem "longfloor" を読み込み中
ボディ "/usr/local/share/OpenHRP-3.1/sample/model/longfloor.wrl" を読み込み中
 -> 完了!
AISTSimulatorItem "AISTSimulator" を読み込み中
PythonSimScriptItem "sim_mc.py" を読み込み中
シミュレーション用Pythonスクリプト "/usr/local/share/hrpsys/samples/JVRC1/sim_mc.py" を読み込み中
 -> 完了!
8 / 8 のアイテムが読みこまれました.
プロジェクト "sim_mc.cnoid" を完全に読み込みました.
RTコンポーネントの設定をしています.
AISTSimulatorによるシミュレーションを開始しました.
Pythonスクリプト "sim_mc.py" の実行を開始しました.
[rtm.py] nshost already set as localhost
[rtm.py] nsport already set as 2809
[rtm.py] Failed to parse corba.master_manager, use 2810
[rtm.py] configuration ORB with localhost:2809
[rtm.py] configuration RTCManager with localhost:2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
Manager not found
creating components
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
[rtm.py] trying to findRTCManager on port2810
Manager not found
Pythonスクリプト "sim_mc.py" の実行に失敗しました.
Traceback (most recent call last):
  File "<string>", line 144, in <module>
  File "<string>", line 113, in init
  File "<string>", line 69, in createComps
AttributeError: 'NoneType' object has no attribute 'load'
============================

Messages on terminal:

============================
choreonoid: オプションには引数が必要です -- 'f'
PDcontroller0: onInitialize() 
ModelLoaderException :  cannot be found.
[PDcontroller0] failed to load model[]
============================

It seems that there are two problems:

  1. Manager not found.
  2. "PDcontroller.conf" exists, but it is still as follows:
    "/usr/local/lib/choreonoid-1.7/rtc/PDcontroller.conf" は存在しないか,開けません.

@gergondet
Copy link
Member

Hi @kx-guan

You need to use cmake/make/make install in the repo to correctly install the project (in /usr/local/share/hrpsys/samples/JVRC1 assuming you have everything installed in /usr/local). You shouldn't be modifying the files in the project folder itself (or attempt to run the .cnoid file located there)

You should also run ./clear-omninames.sh before running choreonoid

@kx-guan
Copy link

kx-guan commented Apr 28, 2020

Hi, Dear Dr. @gergondet:
Thank you very much for response.
I recompiled and reinstalled some software, but still have some problems.
What I did is as follows:

  1. Do [roslaunch lipm_walking_controller display.launch robot:=jvrc1]. There is no error messages.
  2. Run mc_rtc interface [MCControlComp].
    Ater this step, I think the components inside the mc_rtc panel and the left side robot of RViz will appear. But in fact they did not appear.
  3. [./clear-omninames.sh] and [choreonoid --start-simulation sim_mc.cnoid]
    After this step, the error messages about PDcontroller appeared last time did not appear again, and the robot did not fall after starting choreonoid.
    But the following error messages appeared again in the simulator:

==================================
PythonSimScriptItem "sim_mc.py" を読み込み中
シミュレーション用Pythonスクリプト "/usr/local/share/hrpsys/samples/JVRC1/sim_mc.py" を読み込み中
-> 完了!
8 / 8 のアイテムが読みこまれました.
プロジェクト "sim_mc.cnoid" を完全に読み込みました.
RTコンポーネントの設定をしています.
実行コンテキストを取得しました.
接続 JVRC1Controller(Robot)0:q --> PDcontroller0:angle
接続に成功しました.
接続 JVRC1Controller(Robot)0:tau <-- PDcontroller0:torque
接続に成功しました.
AISTSimulatorによるシミュレーションを開始しました.
Pythonスクリプト "sim_mc.py" の実行を開始しました.
[rtm.py] nshost already set as localhost
[rtm.py] nsport already set as 2809
[rtm.py] Failed to parse corba.master_manager, use 2810
[rtm.py] configuration ORB with localhost:2809
[rtm.py] configuration RTCManager with localhost:2810
[rtm.py] trying to findRTCManager on port2810
Pythonスクリプト "sim_mc.py" の実行に失敗しました.
Traceback (most recent call last):
File "", line 145, in
File "", line 107, in init
AttributeError: 'NoneType' object has no attribute 'port'

Now the main problem is "Failed to parse corba.master_manager"?
Could you give me any advice?
Thank you very much.
Best regards.

@gergondet
Copy link
Member

Hi @kx-guan

You don't need to run MCControllerComp, the sim_mc.cnoid project takes care of loading the RTM component.

We need to figure out why the script does not start correctly in the simulation and we should be good to go :)

Now the main problem is "Failed to parse corba.master_manager"?

Actually this is ok. I have the same message and it works fine.

Few things to check (note: not all of these could be really needed but none will hurt either):

  1. Make sure you are running choreonoid from the folder where the project is located (e.g. /usr/local/share/hrpsys/samples/JVRC1) otherwise the configuration files are not loaded correctly
  2. Before running try to do the following:
sudo killall -9 cnoid-nameserver
./clear-omninames.sh
  1. In /etc/omniORB.cfg change giopMaxMsgSize = 2097152 to giopMaxMsgSize = 209715200
  2. Before running choreonoid type:
LC_ALL=C
LANG=C
locale # Just to check

(note: Choreonoid interface will be in English at this point)
5. Check for error messages in the console where choreonoid is running and inside the choreonoid
Message

@kx-guan
Copy link

kx-guan commented Apr 29, 2020

Hi, Dear Dr. @gergondet:
Thank you very much for quick feedback in your busy time.
I changed the settings and did simulation again, but as the last time, the components inside the mc_rtc panel did not appear, and inside the choreonoid the error messages were as follows. No error messages in the console.

Execution of Python script "sim_mc.py" has been started.
[rtm.py] nshost already set as localhost
[rtm.py] nsport already set as 2809
[rtm.py] Failed to parse corba.master_manager, use 2810
[rtm.py] configuration ORB with localhost:2809
[rtm.py] configuration RTCManager with localhost:2810
[rtm.py] trying to findRTCManager on port2810
The execution of Python script "sim_mc.py" failed.
Traceback (most recent call last):
File "", line 145, in
File "", line 107, in init
AttributeError: 'NoneType' object has no attribute 'port'

Thank you very much again.
Best regards.

@gergondet
Copy link
Member

Could you paste the full output of Choreonoid console?

What's the output of nameclt list in the terminal after you try to start a simulation? After the script fails, do not close choreonoid and type that command.

Another thing you can try is to change OpenRTM verbosity setting, in Choreonoid go in Tools -> OpenRTM -> Preferences. Then check the Log Output checkbox and change the Log Level to PARANOID. Restart choreonoid and the simulation: choreonoid sim_mc.cnoid --start-simulation | tee /tmp/choreonoid.log then attach /tmp/choreonoid.log to the issue (or upload it somewhere if it's too big)

@kx-guan
Copy link

kx-guan commented Apr 29, 2020

Hi, Dear Dr. @gergondet:
Thank you very much for quick feedback.
I have sent the big log file to your e-mail.

Thank you very much again.
Best regards.

@maximebrunet
Copy link

maximebrunet commented Mar 3, 2022

Hello @gergondet

I am trying to lauch chorenoid from a fresh install and I believe I am a similar issue.

I am doing choreonoid sim_mc.cnoid | tee /tmp/chorenoid.log, and I get in the chorenoid console

Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidBalancerPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidPoseSeqPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidOpenRTMPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidOpenHRP3.1Plugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidPythonPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidGRobotPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidCorbaPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidRobotAccessPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidGrxUIPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidPythonSimScriptPlugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidHrpsys31Plugin.so"
Detecting plugin file "/usr/lib/choreonoid-1.7/libCnoidBodyPlugin.so"
Body-plugin has been activated.
GRobot-plugin has been activated.
SimulationExecutionContext has been registered.
SimulationPeriodicExecutionContext has been registered.
ChoreonoidExecutionContext has been registered.
ChoreonoidPeriodicExecutionContext has been registered.
OpenRTM-plugin has been activated.
PoseSeq-plugin has been activated.
Python-plugin has been activated.
PythonSimScript-plugin has been activated.
RobotAccess-plugin has been activated.
Balancer-plugin has been activated.
A NameService doesn't exist at "corbaloc:iiop:localhost:2809/NameService".
Corba-plugin has been activated.
GrxUI-plugin has been activated.
Hrpsys31-plugin has been activated.
OpenHRP3.1-plugin has been activated.
Loading project file "sim_mc.cnoid" ...
Task sequencer '' has been deactivated.
PythonPlugin: "/usr/lib/python2.7/dist-packages/hrpsys" has been added to the Python module search path list.
Restoring ExtCommandItem "ModelLoader"
External command "openhrp-model-loader" has been executed by item "ModelLoader".
Restoring WorldItem "World"
Restoring BodyItem "JVRC1"
Loading Body "/usr/share/OpenHRP-3.1/robot/JVRC1/main.wrl"
illegal field event type at line 103 of /usr/share/OpenHRP-3.1/robot/JVRC1/main.wrl
 -> failed.
Error: "JVRC1" cannot be restored.
Restoring BodyItem "longfloor"
Loading Body "/usr/share/OpenHRP-3.1/sample/model/longfloor.wrl"
illegal vector element at line 95 of /usr/share/OpenHRP-3.1/sample/model/longfloor.wrl
 -> failed.
Error: "longfloor" cannot be restored.
Restoring AISTSimulatorItem "AISTSimulator"
Restoring PythonSimScriptItem "sim_mc.py"
Loading Python Script for Simulation "/usr/share/hrpsys/samples/JVRC1/sim_mc.py"
 -> ok!
4 / 6 item(s) have been loaded.
Warning: 2 item(s) were not loaded.
Project "sim_mc.cnoid" has been partially loaded.
OpenGL version is 3.1.
GLSL version is 1.40.

I looked at the chorenoid.log with PARANOID log level, but there is not much error info ther according to me.

Could you help me fix this please ? This is preventing me from using mc_openrtm at all !

Thanks a lot,
Maxime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants