Comments (7)
So, the urdf::Rotation internally stores rotations as quaternions, and has the following methods:
- getQuaternion
- setFromQuaternion
- getRPY
- setFromRPY
Given that the URDF xml represents rotations as RPY angles, I wonder why urdf::Rotation does not uses RPY internally too.
1/ Shall I propose a patch which changes that? (not really needed)
Then, regarding the RPY/quaternion problem, we could probably fix it by removing the custom code and using Eigen (see [a] and [b])
This could be done by either
2/ replacing urdf::Rotation with the equivalent Eigen class (with a typedef or so), or
3/ keeping the present interface but useing Eigen as a backend (so Eigen would be a build dep but not a runtime dep)
what do you think?
[a] http://eigen.tuxfamily.org/dox/group__Geometry__Module.html#gad118fececd448d7485ffea4858775e5a
[b] http://eigen.tuxfamily.org/dox/group__TutorialGeometry.html
from urdfdom.
My 2 cents: if we really want to add Eigen as dependency, I'll strongly suggest going for option (3): Eigen is an heavily template library and for properly exporting an Eigen datatype it in the shared library interface the compiler have to generate all the code relative to the used instantiation of the template class, resulting in large binaries.
from urdfdom.
An alternative to the use of Eigen could be porting some relevant code to the urdf::Rotation class (Gazebo for example has a similar class [1], but I don't know if it is affected by the same numerical problem). This leads to a bit of code duplication, but does not add any new dependency to urdfdom.
[1] : http://ignitionrobotics.org/libraries/ign_math/api/classignition_1_1math_1_1Quaternion.html
from urdfdom.
@hsu , it seems that code comes from Gazebo that has the same problem:
https://bitbucket.org/osrf/gazebo/src/66de1887edea28bec5d8b94de5e74f035ac53cc0/gazebo/math/Quaternion.cc?at=default#cl-257
from urdfdom.
Gazebo developer here; @j-rivero and I will look into adding that unit test to the gazebo math library.
We've thought about eigen but don't have any short-term plans to incorporate it into the default gazebo math library. Gazebo can optionally link with the dartsim physics engine, but that's currently the only connection with eigen that I know of.
from urdfdom.
By the way, gazebo6 has split out the math layer and create a common library for it, called ignition robotics math. Eventually, I agree with @traversaro, it would be nice to use Eigen as a backend.
from urdfdom.
fixed by ros/urdfdom_headers#11
from urdfdom.
Related Issues (20)
- Question: check_urdf does not take into account transmission tag, wrong behaviour ? HOT 1
- Invalid path in urdfdom_INCLUDE_DIRS on Windows installation using vcpkg
- Using wrong headers HOT 2
- Deprecation warning on urdfdom_parser with Clang HOT 2
- check_urdf: no loop detection
- Branch urdfdom for Galactic HOT 5
- Usage of `version` attribute in `robot` xml-node HOT 2
- [cmake] urdf_LIBRARIES is still wrong HOT 2
- Feature request: check_urdf should be able to read from std_in HOT 2
- parseJointLimits() does not parse acceleration limits
- Joint limits (vel, effort) are checked even when the joint is continuous type.
- Build Status link in README.md is broken HOT 2
- Use tinyxml2 instead of tinyxml HOT 3
- Remove tinyxml2 from public API HOT 2
- Cannot parse capsule error HOT 1
- Fixed joints parse limits but not axis
- Add support for quaternion in URDF HOT 3
- Removing console_bridge for Logging HOT 4
- support export URDF HOT 1
- Don't use (outdated) self-provided gtest version (especially if another version is installed already) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urdfdom.