Open davetcoleman opened 8 years ago
There's been quite a few discussion threads here about sampling euler angles. In additional to Clay's suggestions, #43 has some other references. In the case of sampling about a single axis, the current approach should work (AxialSymmetricPoint
enforces this). My guess is that the constructor for AxialSymmetricPoint
isn't working as expected.
I'm pretty sure I solved this problem in my bolt
implementation of the Descartes planner - its essentially a much more moveit-centric way to create a graph of underconstrained redundant Cartesian poses. The function I wrote to turn tolerances on angles into candidate poses is here. It uses a similar data structure to what Descartes uses for tolerances, except I stored the values in a vector so that this rotateOnAxis() recursive function can still work.
I'm wrapping up my Bolt work and need to desperately focus on my dissertation due in a month, so I can't integrate these fixes back into Descartes - especially since I stopped using Descartes a while back. But the references above should help whoever might be motivated to copy the functionality back into Descartes.
I believe I've uncovered a bug in the discretization of poses in Descartes. I'm using AxialSymmetricPt and I find that I get basically the same discretization for both the X_AXIS and Z_AXIS options:
X_AXIS![x_axis](https://cloud.githubusercontent.com/assets/561060/16639905/26b0615e-43b1-11e6-9d47-0c23fb5791e2.png)
Z_AXIS![z_axis](https://cloud.githubusercontent.com/assets/561060/16639930/59b2fd28-43b1-11e6-9a59-f19f87b66276.png)
Y_AXIS (for reference)![y_axis](https://cloud.githubusercontent.com/assets/561060/16639908/2b17e014-43b1-11e6-81d9-469c408e8a63.png)
I've dug into the code for a long time and I believe the underlying method of using roll/pitch/yaw to discretize orientations at arbitrary increments and amounts is incorrect. I believe the 6-way for loop in the
uniform()
function is subject to errors such as Gimbal Lock... but I'm not exactly sure of the solution. I wanted to report this here as I'm calling it a night, and hopefully someone has some insight into this issue.I believe the correct way to do this requires a big restructuring of this code - I think we need to call
Eigen::AngleAxisd(rx, Eigen::Vector3d::UnitX())
in different ways depending on which axis we are discretizing. Or maybe I just need to figure out how to use the tool discretization instead of just object discretization.Have you guys run into something like this?