Cannot run the demo files
Closed this issue · 14 comments
Hi,
When I was running demo_quadruped.py
and demo_romeo.py
, I encountered the following error:
############################################################
############## Test TSID with Quadruped Robot ##############
############################################################
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py:272: UserWarning: Error while starting the viewer client.
Check whether gepetto-viewer is properly started
self.viz.initViewer(*args, **kwargs)
Traceback (most recent call last):
File "demo/demo_quadruped.py", line 82, in <module>
robot_display.displayCollisions(False)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py", line 307, in displayCollisions
self.viz.displayCollisions(visibility)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/gepetto_visualizer.py", line 204, in displayCollisions
nodeName = self.getViewerNodeName(collision,pin.GeometryType.COLLISION)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/gepetto_visualizer.py", line 23, in getViewerNodeName
return self.viewerCollisionGroupName + '/' + geometry_object.name
AttributeError: 'GepettoVisualizer' object has no attribute 'viewerCollisionGroupName'
Does anyone know what might be the issue?
Additionally, I could not import from pinocchio import libpinocchio_pywrap as pin
, since it is not actually used, I just commented it out. Should I be able to import it?
Thanks in advance.
Hi,
It looks like we have issues with those demos. I made some trivial fixes in #147, but that's not enough to get everything work, especially on the romeo side.
But from your error message, I would guess that you have gepetto-viewer, but not gepetto-viewer-corba.
Could you run sudo apt install robotpkg-py38-qt5-gepetto-viewer-corba
and try the quadruped demo again ?
Hi,
It looks like we have issues with those demos. I made some trivial fixes in #147, but that's not enough to get everything work, especially on the romeo side.
But from your error message, I would guess that you have gepetto-viewer, but not gepetto-viewer-corba. Could you run
sudo apt install robotpkg-py38-qt5-gepetto-viewer-corba
and try the quadruped demo again ?
I just checked and it shows that I do have gepetto-viewer-corba installed.
sudo apt install robotpkg-py38-qt5-gepetto-viewer-corba
Reading package lists... Done
Building dependency tree
Reading state information... Done
robotpkg-py38-qt5-gepetto-viewer-corba is already the newest version (5.6.0).
0 upgraded, 0 newly installed, 0 to remove and 463 not upgraded.
Ok, this is unexpected. The first warning you get should be raised because import gepetto.corbaserver
failed. Can you try to run independently this command in a python shell ?
Ok, this is unexpected. The first warning you get should be raised because
import gepetto.corbaserver
failed. Can you try to run independently this command in a python shell ?
It seems like there is no problem
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gepetto.corbaserver
>>>
Is there a way that I can check whether if the geppeto viewer is working or not? I can see it flash and then disappear when ever I am trying to run the demo code.
you can start the viewer application with gepetto-gui
.
and if you sudo apt install robotpkg-py38-example-robot-data
, you can load an example robot with eg. python -m example_robot_data double_pendulum
. This should help us debug what is happening on your case.
you can start the viewer application with
gepetto-gui
. and if yousudo apt install robotpkg-py38-example-robot-data
, you can load an example robot with eg.python -m example_robot_data double_pendulum
. This should help us debug what is happening on your case.
It looks like I do not have gepetto-gui
installed
python3 -m gepetto-gui
/usr/bin/python3: No module named gepetto-gui
should it be installed along with the gepetto viewers?
Ah, yes, sorry. it's a binary, in /opt/openrobots/bin/gepetto-gui
. We usually have /opt/openrobots/bin
in our $PATH
, so I forgot to tell you.
Ah, yes, sorry. it's a binary, in
/opt/openrobots/bin/gepetto-gui
. We usually have/opt/openrobots/bin
in our$PATH
, so I forgot to tell you.
After executing /opt/openrobots/bin/gepetto-gui
I see the gui, and I see the following lines in my terminal
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Is this an issue?
Then I opened another tab, inputted python3 -m example_robot_data double_pendulum
, then the gui disappeared, then I see the following lines in the same tab as I inputted python3 -m example_robot_data double_pendulum
:
/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py:272: UserWarning: Error while starting the viewer client.
Check whether gepetto-viewer is properly started
self.viz.initViewer(*args, **kwargs)
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/__main__.py", line 13, in <module>
load(args.robot, display=not args.no_display)
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/robots_loader.py", line 584, in load
return loader(name, display, rootNodeName).robot
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/robots_loader.py", line 578, in loader
inst.robot.display(inst.robot.q0)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py", line 303, in display
self.viz.display(q)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/gepetto_visualizer.py", line 176, in display
if self.display_collisions:
AttributeError: 'GepettoVisualizer' object has no attribute 'display_collisions'
In the other tab that I inputted /opt/openrobots/bin/gepetto-gui
, I see a segmentation fault:
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[1] 20028 segmentation fault (core dumped) /opt/openrobots/bin/gepetto-gui
Ok, the segfault explains why the gui launch, but then the viewer initialization fail. But I can't reproduce it with the binaries. So I guess there is something wrong with those binary packages on your system.
Could you apt update
and apt upgrade
your system and try again ? If the problem persist, can you show me the outcome of dpkg -l | grep 'openscenegraph\|omni'
?
I updated the system, however I left my office, is there a way to run gepetto-gui
headless?
When updating the system all I see are ROS related updates, Chrome and Firefox, I assume it would not solve my problem? I will try again tomorrow.
Here is the outcome of dpkg -l | grep 'openscenegraph\|omni'
ii robotpkg-omniorb 4.2.4
amd64 ORB that implements the 2.6 specification of the CORBA
ii robotpkg-openscenegraph 3.6.5r3
amd64 open source high performance 3D graphics toolkit
ii robotpkg-py38-omniorbpy 4.2.4
amd64 Robust high-performance CORBA ORB for Python
I updated the system, however I left my office, is there a way to run
gepetto-gui
headless?When updating the system all I see are ROS related updates, Chrome and Firefox, I assume it would not solve my problem? I will try again tomorrow.
Here is the outcome of
dpkg -l | grep 'openscenegraph\|omni'
ii robotpkg-omniorb 4.2.4 amd64 ORB that implements the 2.6 specification of the CORBA ii robotpkg-openscenegraph 3.6.5r3 amd64 open source high performance 3D graphics toolkit ii robotpkg-py38-omniorbpy 4.2.4 amd64 Robust high-performance CORBA ORB for Python
I just tried it, the same message is displayed
/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py:272: UserWarning: Error while starting the viewer client.
Check whether gepetto-viewer is properly started
self.viz.initViewer(*args, **kwargs)
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/__main__.py", line 13, in <module>
load(args.robot, display=not args.no_display)
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/robots_loader.py", line 584, in load
return loader(name, display, rootNodeName).robot
File "/opt/openrobots/lib/python3.8/site-packages/example_robot_data/robots_loader.py", line 578, in loader
inst.robot.display(inst.robot.q0)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/robot_wrapper.py", line 303, in display
self.viz.display(q)
File "/opt/openrobots/lib/python3.8/site-packages/pinocchio/visualize/gepetto_visualizer.py", line 176, in display
if self.display_collisions:
AttributeError: 'GepettoVisualizer' object has no attribute 'display_collisions'
I rebooted my machine and now I can see the robot in the viewer.
Now the issue is the robot is falling, should this be the type of behavior I should expect? Here is the output:
####################################################################################################
################################# Test Task Space Inverse Dynamics #################################
####################################################################################################
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
Level 0
- base-dynamics: w=1, equality, 6x61
- contact_rfoot_motion_task: w=1, equality, 6x61
- contact_rfoot_force_constraint: w=1, inequality, 17x61
- contact_lfoot_motion_task: w=1, equality, 6x61
- contact_lfoot_force_constraint: w=1, inequality, 17x61
Level 1
- contact_rfoot_force_reg_task: w=1e-05, equality, 6x61
- contact_lfoot_force_reg_task: w=1e-05, equality, 6x61
- task-com: w=1, equality, 3x61
- task-posture: w=0.001, equality, 31x61
- task-right-foot: w=1, equality, 6x61
Time 0.000
normal force contact_rfoot.......: 653.3
normal force contact_lfoot.......: 484.8
tracking err task-com............: 0.100
tracking err task-right-foot.....: 1.818
||v||: 0.000 ||dv||: 395.571
Time 0.100 Start breaking contact contact_rfoot
Time 0.500
normal force contact_rfoot.......: 128.4
normal force contact_lfoot.......: 167.6
tracking err task-com............: 0.137
tracking err task-right-foot.....: 0.480
||v||: 19.119 ||dv||: 87.415
Traceback (most recent call last):
File "demo_romeo.py", line 204, in <module>
assert norm(dv) < 1e6
AssertionError
Dear @BolunDai0216 , sorry for the delay. I've checked the demo, and actually it is broken. However, this demo is also redundant with respect to the scripts in the "exercises" folder, so I think the best thing to do is simply to remove it, to avoid future issues. Thanks for pointing this out to us.