humanoid-path-planner / hpp-corbaserver Goto Github PK
View Code? Open in Web Editor NEWCorba server for Humanoid Path Planner applications
License: BSD 2-Clause "Simplified" License
Corba server for Humanoid Path Planner applications
License: BSD 2-Clause "Simplified" License
Joint::linkName()
and Joint::linkInJointFrame()
have not been implemented. A search is required.After calling this line
Line 127 in 34fbb5a
Servant keys should not be the storage pointer.
This pointer may be deleted and the same address could be given to another object. In this case, the server will think it already has a servant for this pointer and will return the old servant, which is wrong.
Note that this only happens when persistent storage is set to false. A possible fix is to remove the servant from the server map when persistent storage is disabled.
I am unable to bind method hpp::constraints::Implicit::comparisonType. If I add the following lines to
interface Implicit in constraints.idl
intSeq getComparisonType() raises (Error);
//-> comparisonType
I get the compilation error below. Of course I expect to get a compilation error from gcc, but I do not understand why omniidl fails to parse those line. If I replace intSeq
by floatSeq
, omniidl successfully generates python and C++ files and I get later a compilation error which is the expected behavior. I tried several workaround like replacing intSeq
by sequence<long>
but without any success.
Traceback (most recent call last):
File "/opt/openrobots/bin/omniidl", line 140, in <module>
omniidl.main.main()
File "/opt/openrobots/lib/omniidl/omniidl/main.py", line 451, in main
bemodules[i].run(tree, backends_args[i])
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/__init__.py", line 235, in run
main.run(tree)
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 116, in run
tree.accept(bii)
File "/opt/openrobots/lib/omniidl/omniidl/idlast.py", line 104, in accept
def accept(self, visitor): visitor.visitAST(self)
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 334, in visitAST
n.accept(self)
File "/opt/openrobots/lib/omniidl/omniidl/idlast.py", line 246, in accept
def accept(self, visitor): visitor.visitModule(self)
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 312, in visitModule
n.accept(self)
File "/opt/openrobots/lib/omniidl/omniidl/idlast.py", line 246, in accept
def accept(self, visitor): visitor.visitModule(self)
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 312, in visitModule
n.accept(self)
File "/opt/openrobots/lib/omniidl/omniidl/idlast.py", line 296, in accept
def accept(self, visitor): visitor.visitInterface(self)
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 511, in visitInterface
store_return, do_return = self.retConversion (types.Type(c.returnType()))
File "/home/florent/devel/hpp/src/hpp-corbaserver/cmake-modules/omniidl/cxx_impl/main.py", line 291, in retConversion
print ("Unhandled sequence of", innerType.type().name())
AttributeError: Base instance has no attribute 'name'
src/CMakeFiles/generate_idl_cpp.dir/build.make:311: recipe for target 'src/hpp/constraints_idl/constraints-fwd.hh' failed
I can't build the devel branch for now:
[ 75%] Building CXX object src/CMakeFiles/hpp-corbaserver.dir/hpp/corbaserver/problemSK.cc.o
cd /local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/build/src && /usr/bin/ccache g++ -Dhpp_corbaserver_EXPORTS -I/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/build -I/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/build/include -I/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/include -I/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/build/src -isystem /opt/openrobots/include -isystem /usr/include/assimp -isystem /usr/include/eigen3 -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -fPIC -DURDFDOM_TYPEDEF_SHARED_PTR -DWITH_URDFDOM -DWITH_HPP_FCL -DFCL_USE_ASSIMP_UNIFIED_HEADER_NAMES -DFCL_HAVE_OCTOMAP= -D__x86_64__ -D__linux__ -D__OSVERSION__=2 -Wno-conversion -Wno-cast-qual -Wno-unused-variable -Wno-unused-parameter -o CMakeFiles/hpp-corbaserver.dir/hpp/corbaserver/problemSK.cc.o -c /local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/build/src/hpp/corbaserver/problemSK.cc
/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/src/robot.impl.cc: In member function ‘hpp::corbaServer::CollisionObjectConstPtr_t hpp::corbaServer::impl::Robot::getObjectByName(const char*)’:
/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/src/robot.impl.cc:1051:37: error: ‘class hpp::pinocchio::Device’ has no member named ‘nbObjects’
for (size_type i = 0; i < robot->nbObjects(); ++i) {
^
/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/src/robot.impl.cc:1052:55: error: ‘class hpp::pinocchio::Device’ has no member named ‘objectAt’
CollisionObjectConstPtr_t object = robot->objectAt(i);
^
/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/src/problem.impl.cc: In member function ‘virtual void hpp::corbaServer::impl::Problem::createIdentityConstraint(const char*, const hpp::Names_t&, const hpp::Names_t&)’:
/local/users/gsaurel/humanoid-path-planner/hpp-corbaserver/src/problem.impl.cc:1083:17: error: ‘Identity’ has not been declared
Identity::create (ispace, constraintName),
^
Same thing on gepgitlab's CI
Tests are not passing, because an import hpp.corbaserver
in the first directory will import the content of the second, as in python 2, import
will try first to look for a relative package.
The workaround is to run rm -rf src/hpp/corbaserver/hpp
between a make
and a make test
In order to build HPP with Python 3 support, one must use OmniORB 4.2.3 with Python 3 support. On ubuntu 16.04, it is available via robotpkg-py35-omniorbpy.
When launching hppcorbaserver
, I get the following error.
CORBA: CORBA::Exception NO_RESOURCES:IDL:omg.org/CORBA/NO_RESOURCES:1.0 : failed to get the name service
This is due to OmniORB unable to find the correct configuration file. A workaround is to use:
hppcorbaserver -ORBconfigFile /etc/omniORB.cfg
In agreement with the main authors, we intend to change the license of this package from LGPL-v3 to BSD 2 clauses. A pull request will follow soon to this effect.
On the master branch (for all hpp packages) I got the following compilation error on ubuntu 16.04 with gcc 5.4 :
[ 40%] Building CXX object src/CMakeFiles/hpp-corbaserver.dir/hpp/core_idl/distances.cc.o
cd /local/dev_hpp/src/hpp-corbaserver/build-rel/src && /usr/bin/c++ -DBOOST_MPL_LIMIT_LIST_SIZE=30 -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 -DPINOCCHIO_WITH_HPP_FCL -DPINOCCHIO_WITH_URDFDOM -Dhpp_corbaserver_EXPORTS -I/local/dev_hpp/src/hpp-corbaserver/build-rel -I/local/dev_hpp/src/hpp-corbaserver/build-rel/include -I/local/dev_hpp/src/hpp-corbaserver/include -I/local/dev_hpp/src/hpp-corbaserver/build-rel/src -isystem /opt/openrobots/include -isystem /local/dev_hpp/install/include -isystem /usr/include/eigen3 -isystem /usr/include/assimp -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -O3 -DNDEBUG -fPIC -D__x86_64__ -D__linux__ -D__OSVERSION__=2 -DHPP_FCL_HAVE_OCTOMAP -DFCL_HAVE_OCTOMAP -DOCTOMAP_MAJOR_VERSION=1 -DOCTOMAP_MINOR_VERSION=9 -DOCTOMAP_PATCH_VERSION=0 -std=gnu++11 -o CMakeFiles/hpp-corbaserver.dir/hpp/core_idl/distances.cc.o -c /local/dev_hpp/src/hpp-corbaserver/build-rel/src/hpp/core_idl/distances.cc
/local/dev_hpp/src/hpp-corbaserver/build-rel/src/hpp/core_idl/distances.cc:11:64: error: specialization of ‘template<class ServantBaseType> std::vector<hpp::corbaServer::ServantFactoryBase<ServantBaseType>*>& hpp::corbaServer::objectDowncasts()’ in different namespace [-fpermissive]
::hpp::corbaServer::objectDowncasts<hpp::core_impl::Distance> ()
^
In file included from /local/dev_hpp/src/hpp-corbaserver/build-rel/src/hpp/core_idl/distances-fwd.hh:9:0,
from /local/dev_hpp/src/hpp-corbaserver/build-rel/src/hpp/core_idl/distances.hh:8,
from /local/dev_hpp/src/hpp-corbaserver/build-rel/src/hpp/core_idl/distances.cc:5:
/local/dev_hpp/src/hpp-corbaserver/include/hpp/corbaserver/servant-base.hh:348:58: error: from definition of ‘template<class ServantBaseType> std::vector<hpp::corbaServer::ServantFactoryBase<ServantBaseType>*>& hpp::corbaServer::objectDowncasts()’ [-fpermissive]
std::vector< ServantFactoryBase<ServantBaseType>* >& objectDowncasts ();
^
src/CMakeFiles/hpp-corbaserver.dir/build.make:873 : la recette pour la cible « src/CMakeFiles/hpp-corbaserver.dir/hpp/core_idl/distances.cc.o » a échouée
After quick search it looks like a bug in gcc <= 7.0 that do not correctly implement the c++11 standard. Compilation with Clang (3.8) work correctly.
It seems that some fix exist to avoid this (https://stackoverflow.com/questions/25594644/warning-specialization-of-template-in-different-namespace) but I did not try them.
omniName service must be running to launch the tests, and it doesn't seem to work on docker for now:
$ rm -v /var/log/omniorb*
removed '/var/log/omniorb-nameserver.log'
$ service omniorb4-nameserver restart
* Restarting omniORB name server: omniNames
...done.
$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 18224 3020 ? Ss 13:37 0:00 /bin/bash
root 9 0.0 0.0 18320 2784 ? S 13:37 0:00 /bin/bash
root 21 0.0 0.0 4376 88 ? R 13:37 0:00 start-stop-daemon --start --quiet --background --pidfile /var/run/omniNames.pid --make-pidfile --exec /usr/bin/omniNames -- -errlog /var/log/omniorb-nameserver.log
root 22 0.0 0.0 34424 2896 ? R 13:37 0:00 ps aux
$ ctest -VV
UpdateCTestConfiguration from :/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/build/DartConfiguration.tcl
Test project /root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: robot.py
1: Test command: /usr/bin/python2.7 "/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/tests/robot.py"
1: Environment variables:
1: PYTHONPATH=/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/build/src:/usr/lib/omniidl/omniidl_be
1: Test timeout computed to be: 9.99988e+06
1: E
1: ======================================================================
1: ERROR: test_createRobotFromPython (__main__.Test)
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1: File "/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/tests/robot.py", line 18, in setUp
1: self.client = Client()
1: File "/root/robotpkg/path/hpp-corbaserver/work.runner-e7e27102-project-224-concurrent-3/hpp-corbaserver-4.2.0/build/src/hpp/corbaserver/client.py", line 66, in __init__
1: self.rootContext = obj._narrow(CosNaming.NamingContext)
1: File "/usr/lib/python2.7/dist-packages/omniORB/CORBA.py", line 798, in _narrow
1: return _omnipy.narrow(self, repoId, 1)
1: TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)
1:
1: ----------------------------------------------------------------------
1: Ran 1 test in 0.017s
1:
1: FAILED (errors=1)
1/1 Test #1: robot.py .........................***Failed 0.13 sec
Variable plugin is not defined in the method.
The fix is easy, but before proposing it I just want to be sure that this is the intended behaviour.
It is currently not possible to use ServerManager
and create a client several times in the same file.
This simple script does not work:
from hpp.utils import ServerManager
import hpp.corbaserver
with ServerManager():
cl1 = hpp.corbaserver.Client()
with ServerManager():
cl2 = hpp.corbaserver.Client()
It gives the following error:
'Failed to narrow client at corbaloc:iiop:localhost:13331/hpp-corbaserver into hpp_idl.hpp.Tools: CORBA.COMM_FAILURE(omniORB.COMM_FAILURE_WaitingForReply, CORBA.COMPLETED_MAYBE)'
---------------------------------------------------------------------------
TRANSIENT Traceback (most recent call last)
Input In [4], in <cell line: 1>()
1 with ServerManager():
----> 2 cl = hpp.corbaserver.Client()
File /opt/openrobots/lib/python3.8/site-packages/hpp/corbaserver/client.py:113, in Client.__init__(self, clients, url, context, host, port)
97 def __init__(
98 self,
99 clients=defaultClients,
(...)
103 port=None,
104 ):
105 """
106 Initialize CORBA and create default clients.
107 :param url: URL in the IOR, corbaloc, corbalocs, and corbanames formats.
(...)
111 "corbaloc:iiop:" + str(host) + "/NameService"
112 """
--> 113 self._initOrb(url, host, port)
114 self._makeClients("", clients, context)
File /opt/openrobots/lib/python3.8/site-packages/hpp/corbaserver/client.py:146, in Client._initOrb(self, url, host, port)
144 pass
145 if self._tools is None:
--> 146 self.initWithNameService(urlNameService)
File /opt/openrobots/lib/python3.8/site-packages/hpp/corbaserver/client.py:52, in Client.initWithNameService(self, urlNameService)
50 def initWithNameService(self, urlNameService):
51 obj = self.orb.string_to_object(urlNameService)
---> 52 self.rootContext = obj._narrow(CosNaming.NamingContext)
53 if self.rootContext is None:
54 raise CorbaError("Failed to narrow the root context")
File /opt/openrobots/lib/python3.8/site-packages/omniORB/CORBA.py:583, in Object._narrow(self, dest)
580 except KeyError:
581 pass
--> 583 return self._obj.narrow(repoId, 1)
TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)
Note that when using ServerManager
but not creating a client, there is no error.
I suppose it is because the hppcorbaserver does not get properly killed when leaving the context manager. When looking at htop
output in another terminal, between the two context managers, there is a phantom unkillable hppcorbaserver process. The only way to kill it is to kill the parent process, that is the python interpreter that launched the script.
In the current version of the package, idl interface functions
urdf
" and "srdf
" and located in the "package://something
" directory.example-robot-data
.@stonneau, @pFernbach, due you use this API to load robots or do you use python class Robot and derived classes.
Unfortunately, IDL dos not support function overloading and therefore, the usual deprecation method is not possible to implement.
Hi,
Trying to build this package on 18.04, I get an error about core_impl
. Where does this comes from ? The new omniidl backend ?
hpp-corbaserver/src/problem.impl.cc
Line 2615 in 1e631d3
Hi,
The test py-robot
does not pass on 18.04 after #75, with the following error:
2/2 Test #1: py-robot .........................***Failed 0.24 sec
Traceback (most recent call last):
File "…/tests/robot.py", line 6, in <module>
from hpp.corbaserver import Client
File "…/src/hpp/corbaserver/__init__.py", line 1, in <module>
from .client import Client
File "…/src/hpp/corbaserver/client.py", line 8, in <module>
import hpp_idl.hpp.corbaserver
File "…/src/hpp_idl/hpp/__init__.py", line 11, in <module>
import hpp_stubs.corbaserver.robot_idl
File "…/src/hpp_stubs/corbaserver/robot_idl.py", line 495, in <module>
_0_hpp.corbaserver._objref_Robot.__doc__ = _0_hpp.corbaserver.Robot__doc__
AttributeError: attribute '__doc__' of 'type' objects is not writable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.