Closed zongmianli closed 7 years ago
The problem is that you have a recent version of urdfdom, which uses shared_ptr
from std
instead of from boost
. It should not be hard to solve. You could just try to replace the boost::shared_ptr
by std::shared_ptr
. (Same thing for cast operators). I do not guaranty it will work, but it is worth trying.
@nim65s Would you have time to make it compliant for both versions (as done in pinocchio) ?
Or simply, you can install an older version of URDF (eg 0.3.0) waiting for the fix from our side.
It appears that @nim65s already solved the issue (see https://github.com/nim65s/gepetto-viewer). It must be sufficient for your issues.
Thanks Joseph and Justin, for being so reactive.
The shared_ptr
problem has been solved by following Joseph's instruction (specifically I have modified
include/gepetto/viewer/macros.h include/gepetto/viewer/node-property.h src/urdf-parser.cpp
by making the same changes as commit 90e154 in the forked project https://github.com/nim65s/gepetto-viewer ). But the third error in the issue still exists: use of overloaded operator '!=' is ambiguous:
/Users/zml/gepetto-viewer/src/urdf-parser.cpp:154:28: error: use of overloaded operator '!=' is ambiguous (with operand types '::std::shared_ptr< ::urdf::Mesh>' and 'int') if ( mesh_shared_ptr != 0 )
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4961:1: note: candidate function [with _Tp = urdf::Mesh] operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT ^ /Users/zml/gepetto-viewer/src/urdf-parser.cpp:154:28: note: built-in candidate operator!=(int, int) if ( mesh_shared_ptr != 0 ) ^
When I chose to compile the forked project I got another error:
/Users/zml/gepetto-viewer/src/window-manager.cpp:542:12: error: no member named 'get' in 'osg::Matrixd' matrix.get(rot);
Replace if ( mesh_shared_ptr != 0 )
by if ( mesh_shared_ptr )
for the first error.
The second error has been fixed in the devel master branch by #56. It will be integrated soon in the master branch. Either try to merge the devel branch or use git cherry-pick
to take the commit which fixed the issue.
I am trying to install the master branch on Mac OS 10.13. I encountered 3 types of errors while compiling urdf-parser.cpp, and each occurred multiple times.
Since I don't use the URDF parser in my project, is it easy to just remove that functionality while installing? Thanks in advance.
**1. no viable overloaded**
**2. no matching function for call to 'static_pointer_cast'**
**3. use of overloaded operator '!=' is ambiguous**