Closed zahednejad203 closed 4 years ago
Did you build choreonoid from source? If so you need to enable the OpenRTM plugin
Hi, I'm hanging at the same issue.
I also built chorenoid from source, and fixed the issue with Corba by installing openORM and enabling it by rebuilding with
-DBUILD_CORBA_PLUGIN=ON -DENABLE_CORBA=ON
.
That took care of first error line.
I then tried activating the OpenRTM with -DBUILD_OPENRTM_PLUGIN=ON
(which is documented in chorenoid) and -DENABLE_OPENRTM=ON
(which was just a guess from my part. However, CMake always warns me that both latter options are not actually used in the build process.
What am I missing here to solve Error: The "OpenRTM" plugin for "RTSNameServerView" is not found. The view cannot be restored.
?
Hi,
If you are building choreonoid from source and you are using a recent version you'll need to add the OpenRTM plugin and OpenHRP-plugin in the ext
folder:
I think #18 is related to not having those plugins (assuming the file the project is trying to open do exist)
This got me a step further, but everytime I recompile I'm recompiling chorenoid I now run into the error:
[ 77%] Building CXX object src/BodyPlugin/CMakeFiles/CnoidBodyPlugin.dir/SubSimulatorItem.cpp.o
/home/f/devel1/choreonoid/ext/choreonoid-openrtm/sample/VisionSensorIoRTC.cpp: In member function ‘void CameraIo::outputImage()’:
/home/f/devel1/choreonoid/ext/choreonoid-openrtm/sample/VisionSensorIoRTC.cpp:384:55: error: ‘jpeg_mem_dest’ was not declared in this scope
jpeg_mem_dest(&cinfo, &outbuffer, &writtenSize);
^
I already tried to apply your PR on chorenoid-openrpm and installing libjpeg8
. I will probably just omit the sample file next
I read up on libjpeg8 and libjpeg-turbo 8 some more.
This was the best explanation of where to get 'jpeg_mem_dest' I could find:
From apt show libjpeg-turbo8
I learned got the following
Replaces: libjpeg8 (<< 8c-2ubuntu5)
Since libjpeg-turbo8 is installed at version 1.4.2, combined with the explanation above my libjpeg-turbo8 should provide the function. So I'm not sure why my build process is complaining.
Do you have libjpeg-turbo8-dev
? (which OS are you building on by the way?)
Anyway you can skip these samples by setting BUILD_CHOREONOID_OPENRTM_SAMPLES
to OFF
. I don't think this will affect your ability to use mc_openrtm
I'm building on Ubuntu 16.04.
I tried installing libjpeg-turbo8-dev
(with choreonoid openrtm build samples). The build steps of chorenoid went through, but running choreonoid --start-simulation sim_mc.cnoid
as described in the simulation instructions I just get a segfault.
Segmentation fault (core dumped)
The same happens if I omit building the choreonoid openrtm samples.
Unfortunately that means the choreonoid window does not open, so I cannot post a proper log.
Hi,
You should have a clear-omninames.sh
script in share/hrpsys/samples/JVRC1
, make sure you run it before trying to run choreonoid. This script clears the omniname server cache and restarts it. It seems that omniorb doesn't deal well with non-fixed IP, and this script must be run everytime your IP address changes. And sadly, choreonoid doesn't handle this issue gracefully and just plainly segfaults.
Let me know if that doesn't solve your segmentation fault issue.
assuming you meant /usr/share/hrpsys/samples/JVRC1
, I already tried that to no avail, unfortunately. The issue still remains.
I'm linking the outputs of my commands, maybe you spot something I'm missing.
and my ~/.config/mc_rtc/mc_rtc.yaml
:
{
"MainRobot": "JVRC1",
"Enabled": ["LIPMWalking"]
}
It seems that choreonoid
itself is segfaulting, way before anything remotely related to mc_rtc
and the LIPMWalking
controller (those are only started after choreonoid window is open and the simulation is running, and you'd see related outputs in the terminal).
Thus there is something wrong with your choreonoid installation. Unfortunately, that'll be hard to debug remotely. Some things I'd check:
choreonoid
(no arguments), does it segfault too?openrtm 1.1.2
installed (and only that version)If you don't manage to get your compiled version to work, we also provide packages for choreonoid. However, if you do decide to use those, make sure you remove everything that was manually installed first, as you're very likely to run into issues otherwise. Note that this will also install mc_openrtm
from packages, so you'll want to remove the compiled version from /usr/local
# Make sure you have required tools
sudo apt-get -qq install apt-transport-https lsb-release ca-certificates gnupg
# Add our key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 892EA6EE273707C6495A6FB6220D644C64666806
# Add our repository (head versions)
sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-head $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
sudo apt-get -qq update
sudo apt install jvrc-choreonoid
apt list --installed | grep openrtm
shows the following:
mc-openrtm/now 1.1.0-1ubuntu1-20200714044648-1 amd64 [installed,upgradable to: 1.1.0-1ubuntu1-20200715073715-1]
openrtm-aist/now 1.1.2-0 amd64 [installed,upgradable to: 1.1.2+20180505+1733+14~ubuntu16.04.1]
openrtm-aist-dev/now 1.1.2-0 amd64 [installed,upgradable to: 1.1.2+20180505+1733+14~ubuntu16.04.1]
openrtm-aist-example/now 1.1.2-0 amd64 [installed,upgradable to: 1.1.2+20180505+1733+14~ubuntu16.04.1]
openrtm-aist-python/now 1.1.2-1 amd64 [installed,local]
openrtm-aist-python-example/now 1.1.2-1 amd64 [installed,local]
gergondet suggested I might be missing the following plugins:
jpeg_mem_dest
.
Installing libjpeg-turbo8-dev
enabled me to compile, and then it started segfaulting at runtime.I'll try your instructions on a new setup and see what that returns.
Here are the lines causing errors:
-main.wrt
(l.101-105, error stated in 103): I highly suspect the commented line 102 is causing problems here and will try to simply delete that one next
exposedField SFRotation rotation 0 0 1 0
#exposedField SFRotation orientation 0 0 1 0
exposedField SFFloat fieldOfView 0.785398
exposedField SFString name ""
exposedField SFFloat frontClipDistance 0.01
longfloor.wrt
(l. 93-98, error stated in 95): not quite sure what he doesn't like here.DEF WAIST Joint {
jointType "fixed"
translation 0.0 0.0 -0.1
rotation 0 0 1 0
children [
DEF BODY Segment {
the JOINT
type seems to be defined before (l.3-29) and contain both jointType
and translation
:
PROTO Joint [
...
exposedField SFRotation rotation 0 0 1 0
exposedField SFVec3f translation 0 0 0
exposedField SFString jointType ""
...
]
{
Transform {
...
rotation IS rotation
translation IS translation
}
}
Sorry, it seems you've been victim of the VRML loader of Choreonoid. When using a locale with coma-separated numbers, the VRML loader fails to read floating-point numbers.
You can try this:
LC_NUMERIC="en_US.UTF-8" choreonoid sim_mc.cnoid
If this works, you can either change the numeric locale to use coma-separated values, or put the above trick in your bashrc:
alias choreonoid="LC_NUMERIC=\"en_US.UTF-8\" /usr/local/bin/choreonoid"
Alternatively you could patch the VRML loader. I've been meaning to do that for ages, but haven't had the time to do it.
As a final note, bear in mind that choreonoid
is not part of mc_rtc
, and only provides the dynamic simulation. We are not developping it, and only try our best to make it reasonably usable with our framework ;)
That tip was on point. I would have thought installing the system with english language and keyboard would prevent such issues, but apparently my German timezone convinced Ubuntu to make me run into this issue.
I'm aware that choreonoid is not your beast. All the more thanks for providing such great help with it (and all the other questions I had so far)!
Now all models are loading and I can see the robot in choreonoid (not in rviz though). I ran into the next issue down the line - this is from the choreonoid output:
The execution of Python script "sim_mc.py" failed.
AttributeError: 'NoneType' object has no attribute 'name'
At:
/usr/lib/python2.7/dist-packages/hrpsys/rtm.py(550): serializeComponents
/usr/share/hrpsys/samples/JVRC1/sim_mc.py(85): activateComps
/usr/share/hrpsys/samples/JVRC1/sim_mc.py(119): init
/usr/share/hrpsys/samples/JVRC1/sim_mc.py(145): <module>
The python script is responsible for creating the openrtm components for controlling the robot simulation (PDController
for PD control of the joints, MCControlComp
(mc_openrtm
) for running mc_rtc controller and communicating back and forth with the simulation. It seems that some of these components failed to load (most likely PDController). From your log trace only, it's hard to tell which one and why. That's the kind of problem that would most likely be easy to figure out in person, but a bit hard remotely ;)
Was there any additional error in the terminal? I will give it a try in a docker to see if I can reproduce the issue.
I just gave it a try in a clean docker of ubuntu 18.04, and didn't experience your issue. At the risk of repeating myself, did you run the ./clear-omninames.sh
script before running the simulation?
I also went ahead and gave LIPMWalking a try, and compiled it from source since I assume you might want to play around with the code:
sudo apt install libmc-rtc-dev libcopra-dev
git clone --recursive https://github.com/jrl-umi3218/lipm_walking_controller.git
cd lipm_walking_controller && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j8
sudo make install
and don't forget to all /usr/local/lib
to your LD_LIBRARY_PATH
.
If you haven't already, also install the , this requires having the ROS repositories set-up (this is not required, but will provide the rviz visualization and tools).
sudo apt install ros-melodic-desktop ros-melodic-mc-rtc-tools
Then in your ~/.config/mc_rtc/mc_rtc.yaml
file:
MainRobot: JVRC1
Enabled: LIPMWalking
To run the controller:
(roscore &) # starts roscore in the background
cd /usr/share/hrpsys/samples/JVRC1
./clear-omninames.sh
choreonoid sim_mc.cnoid --start-simulation
roslaunch mc_rtc_ticker control_display.launch
[edit: fixed] Right now there is a slight issue with the copra package due to changes in eigen-qld. This should be fixed in a few hours ;)
Sorry for the long silence, other things got in the way.
I have since managed to run the Walking Controller in the prepared docker image on a different PC (which did not work on this one due to GPU driver issues), which was enough for my purposes, as it sufficed to check it out to know it was not directly helpful to achieve my current project goal.
From my notes and run scripts, I can give you the following details regarding your questions:
./clear-omninames
, as it was in my startupscriptAs I'm no longer actively pursuing this, and have since broken the installation this issue occurred on in other ways and reinstalled it, I would consider this issue closed. Thank you for your great advice, it got me quite a bit further!
Hi, When I run
choreonoid --start-simulation sim_cm.cnoid
on ubuntu 16.0.4 I get the following errors and the robot fall on the ground :Here is a full log of Choreonoid:
Any thoughts ?