Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken industrial collision detection #77

Conversation

jrgnicho
Copy link
Member

This PR addresses the issue described in #70 where the industrial_collision_detection package broke after changes made to moveit collision library that introduced the ability to perform distance queries along with some other improvements. Thus this fix involves the following changes:

  • Removed the duplicate Distance query data structures from industrial_collision_detection
  • Added rather unpolished implementations of the new purely virtual functions inherited from the CollisionRobot and CollisionWorld interfaces.
  • The constrained_ik package no longer depends on industrial_collision_detection

As of now the industrial_collision_detection package is no longer a dependency to any other package, nevertheless I chose to keep it around just in case.

This PR replaces #71 and #76

@Levi-Armstrong I had to modify constrained_ik in order for it to build so hopefully I didn't break anything but could you suggest a way to check?

@davetcoleman
Copy link
Collaborator

nevertheless I chose to keep it around just in case.

Does not git history achieve this "just in case" scenario? It seems to me keeping it will only confuse future contributors / developers and cause more maintenance hassle

@@ -176,9 +125,9 @@ namespace collision_detection
double dist_threshold = cdata->req->distance_threshold;
std::map<std::string, DistanceResultsData>::iterator it1, it2;

if (!cdata->req->global)
if (false /*!cdata->req->global*/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment for why you are disabling this


if (!cdata->req->global)
if (false /*!cdata->req->global*/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@jrgnicho
Copy link
Member Author

jrgnicho commented Sep 11, 2018

Does not git history achieve this "just in case" scenario? It seems to me keeping it will only confuse future contributors / developers and cause more maintenance hassle

@davetcoleman thanks for reviewing, indeed git does keep the history. My argument for keeping industrial_collision_detection around is that there may be exclusive functionality there that the constrained_ik planner still needs. I did my best to "upgrade" constrained_ik to the new moveit Distance Query Structures but some code didn't directly translate and so I could've broken something and it would be easier to fix/restore if industrial collision detection was kept.
In order to avoid confusing developers we could add a readme explaining this.

@jrgnicho
Copy link
Member Author

@davetcoleman I made the requested changes.

@davetcoleman
Copy link
Collaborator

In order to avoid confusing developers we could add a readme explaining this.

Agreed - can you just copy your explanation in your previous comment into the README?

@jrgnicho
Copy link
Member Author

@davetcoleman a REAME with an explanation of industrial_collision_detection has been added.

@jrgnicho jrgnicho force-pushed the fix-broken-industrial-collision-detection branch from cf72139 to 1527220 Compare September 13, 2018 16:19
}

fcl_result.min_distance = dist_threshold;
double d = fcl::distance(o1, o2, fcl::DistanceRequest(cdata->req->detailed), fcl_result);
double d = fcl::distance(o1, o2, fcl::DistanceRequest(), fcl_result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be fcl::DistanceRequest(cdata->req->enable_nearest_points).

* MoveIt! library. Unfortunately the legacy code here isn't fully compatible with the new structure types and so for
* now the broken code below has been disabled until the discrepancies get amended.
*/
if (false /*!cdata->req->global*/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cdata->req->type == DistanceRequestType::GLOBAL

* MoveIt! library. Unfortunately the legacy code here isn't fully compatible with the new structure types and so for
* now the broken code below has been disabled until the discrepancies get amended.
*/
if (false /*!cdata->req->global*/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

dreq.enable_nearest_points = false;
dreq.enable_signed_distance = true;
dreq.group_name = req.group_name;
dreq.acm = acm;
DistanceResult dres;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add dreq.type == DistanceRequestType::GLOBAL

dreq.enable_nearest_points = false;
dreq.enable_signed_distance = true;
dreq.group_name = req.group_name;
dreq.acm = acm;
DistanceResult dres;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add dreq.type == DistanceRequestType::GLOBAL

@jrgnicho
Copy link
Member Author

@Levi-Armstrong I've made the requested changes.

@jrgnicho jrgnicho merged commit 51eae16 into ros-industrial:kinetic-devel Sep 17, 2018
@jrgnicho jrgnicho deleted the fix-broken-industrial-collision-detection branch April 2, 2019 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants