Skip to content
This repository has been archived by the owner on Nov 13, 2017. It is now read-only.

add ApplyPlanningSceneService capability #686

Merged
merged 4 commits into from Jun 16, 2016

Conversation

v4hn
Copy link
Member

@v4hn v4hn commented Jun 13, 2016

See https://groups.google.com/forum/#!topic/moveit-users/D7MWZEUSKLc
for a longer discussion on why this makes sense to have around.

The only thing I'm unsure about is whether the service should be
~-namespaced or not. There might be multiple monitored scenes
around, so I moved it to the namespace. On the other hand,
the ClearOctomap service is not namespaced...

@v4hn
Copy link
Member Author

v4hn commented Jun 13, 2016

This obviously depends on ros-planning/moveit_msgs#21

* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/

/* Author: Michael 'v4hn' Goerner */
Copy link
Member

Choose a reason for hiding this comment

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

im a big fan of descriptions in header files for what the class does....

Copy link
Member Author

Choose a reason for hiding this comment

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

On Mon, Jun 13, 2016 at 03:41:28PM -0700, Dave Coleman wrote:

im a big fan of descriptions in header files for what the class does....

Now you're being unfair. :)
I totally agree, but none of the other capabilities include a description
and I wouldn't even know what to describe here, as it's pretty self-documenting.
"ApplyPlanningSceneService : MoveGroupCapability is a MoveGroupCapability
that provides a service to apply a given PlanningScene" is just overly redundant.

Copy link
Member

Choose a reason for hiding this comment

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

You are exactly right about not having enough documentation throughout the code base and I know the others lack it. How about:
"Provides ability to update the shared planning scene with a remote blocking call"

@v4hn
Copy link
Member Author

v4hn commented Jun 14, 2016

@davetcoleman: now this request also spans 4 repos :-)
Full +1 to merge most moveit repositories...

I do care quite a lot about a compatible ABI within ros distros until we add sonames to our libraries to explicitly mark updates as ABI-breaking.
As @mikeferguson pointed out last week it's pretty horrible to debug random segfaults due to ABI changes without sonames. Last year I spent more than 12 hours debugging one of these issues in the PCL, although it was a particularly horrible one.

Any comments on the question of namespacing?

if (!scene_)
return false;

bool ret;
Copy link
Member

Choose a reason for hiding this comment

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

result

@davetcoleman
Copy link
Member

i don't have an opinion on the namespacing, other than we should do it as the other services have been done. i don't know of any current uses cases needing more than one planning scene

@v4hn v4hn force-pushed the apply-planning-scene branch 3 times, most recently from e19bc02 to ebd8565 Compare June 14, 2016 15:53
@v4hn
Copy link
Member Author

v4hn commented Jun 14, 2016

Ok, I renamed all the result variables,
added the comment you proposed, and decided to move
the service away from ~. Most of the other services
don't use it so no reason to start with it for now.

@davetcoleman
Copy link
Member

I'll merge these as soon as @mikeferguson gives me a +1 on the moveit_msgs change. Until then, could you add a section to the documentation here mentioning this new way to update the PS? It doesn't need to be much.

@mikeferguson
Copy link
Contributor

@davetcoleman -- we need to merge the moveit_msgs and then release it as Debs so that this can properly build, else the CI will be broken

@davetcoleman
Copy link
Member

just restarted build after merging msgs and core

v4hn added 4 commits June 15, 2016 15:26
This is required for capabilities to update the planning scene.

ABI-compatible.
This new capability allows to apply changes to a monitored planning
scene and *blocks* until the changes are applied. This is meant to
replace the quasi-standard pattern:
```
planning_scene_interface.addCollisionObjects(...)
sleep(2.0)
group.pick("object")
```
by
```
ros::ServiceClient client = n.serviceClient<moveit_msgs::ApplyPlanningScene>("apply_planning_scene");
client.call(...)
group.pick("object")
```

This makes it much more convenient to add&interact with objects
without useless and arbitrarily long sleeps to ensure planning scene
updates succeeded.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants