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

PSI: add apply* functions that use ApplyPlanningScene.srv #381

Merged
merged 5 commits into from
Dec 19, 2016

Conversation

v4hn
Copy link
Contributor

@v4hn v4hn commented Dec 13, 2016

This implements my comment #128 (comment)
and supersedes #128.

@v4hn v4hn force-pushed the pr-kinetic-apply-in-interface branch from fa60586 to 2712d25 Compare December 13, 2016 17:05
Copy link
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

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

Minor changes suggested

/** \brief Apply attached collision objects to the planning scene of the move_group node.
Other PlanningSceneMonitors will NOT receive the update unless they subscribe to move_group's monitored scene */
bool
applyAttachedCollisionObjects(const std::vector<moveit_msgs::AttachedCollisionObject> &attached_collision_objects);
Copy link
Member

Choose a reason for hiding this comment

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

what do you think of abbreviating collision_objects to collision_objs for line length?

Other PlanningSceneMonitors will NOT receive the update unless they subscribe to move_group's monitored scene */
bool applyPlanningScene(const moveit_msgs::PlanningScene &ps);

/** \brief Add collision objects to the world via /planning_scene.
Make sure object.operation is set to object.ADD. */
Copy link
Member

Choose a reason for hiding this comment

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

Add comment that this and the following function are the old asynchronous approach that usually require arbitrary sleep timers?

request.scene = planning_scene;
if (!apply_planning_scene_service_.call(request, response))
{
ROS_WARN("Failed to call ApplyPlanningScene service");
Copy link
Member

Choose a reason for hiding this comment

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

_NAMESPACE

@@ -235,6 +251,7 @@ class PlanningSceneInterface::PlanningSceneInterfaceImpl
private:
ros::NodeHandle node_handle_;
ros::ServiceClient planning_scene_service_;
mutable ros::ServiceClient apply_planning_scene_service_;
Copy link
Member

Choose a reason for hiding this comment

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

I know mutable is for ABI, but it seems dirty and we have sonames that will force everyone to recompile anyway. I vote to remove this.

@v4hn
Copy link
Contributor Author

v4hn commented Dec 16, 2016 via email

@@ -210,6 +214,19 @@ class PlanningSceneInterface::PlanningSceneInterfaceImpl
return result;
}

bool applyPlanningScene(const moveit_msgs::PlanningScene &planning_scene) const
Copy link
Member

Choose a reason for hiding this comment

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

no const here? Travis is not building

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, another neglected specifier that was shadowed by the mutable above.
I adjusted it. Let's see whether it passes now.

@davetcoleman
Copy link
Member

Your comment in reference to Travis of "Let's see whether it passes now." worries me that this PR has not been tested on a live system at all. Is this ready to be merged?

andreaskoepf and others added 5 commits December 17, 2016 13:47
Added helper function to call ApplyPlanningScene service
with fallback to asynchronous processing via "planning_scene"
topic.
This was only required for the proposal to change the behavior of the add/remove functions.
Now that I added the apply* interfaces, this is not relevant anymore.
@v4hn v4hn force-pushed the pr-kinetic-apply-in-interface branch from 65194bf to 1092232 Compare December 17, 2016 12:50
@v4hn
Copy link
Contributor Author

v4hn commented Dec 17, 2016

Your comment in reference to Travis of "Let's see whether it passes now." worries me that this PR has not been tested on a live system at all. Is this ready to be merged?

Sorry to make you worry :)
I tested all new methods (before I opened this pr and just now) and the request is ready to merge.
I didn't test without the mutable before, because I didn't expect it would change anything to remove it. Turned out I missed something there..

I just rebased the request to clean up the history.

@davetcoleman davetcoleman merged commit 5808c83 into moveit:kinetic-devel Dec 19, 2016
davetcoleman pushed a commit to davetcoleman/moveit that referenced this pull request Jan 2, 2017
* Use ApplyPlanningSceneService in planning_scene_interface

Added helper function to call ApplyPlanningScene service
with fallback to asynchronous processing via "planning_scene"
topic.

* PSI: add apply* functions that use ApplyPlanningScene.srv

to update move_group's PlanningScene

* remove obsolete mutable declaration

This was only required for the proposal to change the behavior of the add/remove functions.
Now that I added the apply* interfaces, this is not relevant anymore.

* PSI: point out synchronicity behavior of apply* and add/removeObjects interfaces

* PSI: make all logs _NAMED
v4hn added a commit that referenced this pull request Jan 12, 2017
cherry-pick apply* functions in PSI (#381)
v4hn added a commit that referenced this pull request Jan 12, 2017
cherry-pick apply* functions in PSI (#381)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants