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

Fix planning scene display initial state #409

Merged
merged 5 commits into from
Feb 3, 2014

Conversation

acornacorn
Copy link

When rviz starts after move_group, the planning scene diff messages sent by move_group do not give PlanningSceneDisplay the full state of the planning scene. For example if the robot has not moved for a while then move_group may not be sending updates of the robot state and the state of the PlanningScene robot will be different from the actual state of the real robot (it will appear in the default position rather than the current position).

This change fixes the PlanningSceneDisplay so that when it starts up (robot model is loaded or planning scene monitor topic changes) it will query move_group for the current full PlanningScene state and use that to initialize the PlanningScene maintained by the PlanningSceneDisplay.

Fixes issue #405
Replaces #407 and adds to #408

Acorn Pooley added 5 commits February 2, 2014 17:36
The rate of state updates is limited to dt_state_update_ per second.
When an update arrived it was not processed if another was recently
processed.  This meant that if a quick sequence of state updates
arrived and then no updates arrive for a while that the last update(s)
were not seen until another arrives (which may be much later or
never). This fixes the bug by periodically checking for pending
updates and running them if they have been pending longer than
dt_state_update_.
Get current planning scene state when planning scene display is
enabled and/or model is loaded.
{
ROS_ERROR("Failed to call service %s at %s:%d",
service_name.c_str(),
__FILE__,
Copy link
Contributor

Choose a reason for hiding this comment

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

FILE and LINE are already included in the call to ROS_ERROR. You can see these in either rosconsole, or you can configure your rosconsole output with ROSCONSOLE_FORMAT (http://wiki.ros.org/rosconsole)

@isucan
Copy link
Contributor

isucan commented Feb 3, 2014

+1

@sachinchitta
Copy link
Contributor

+1

Just tested this with a hacked version of the industrial robot simulator that publishes initial values to all be 1.0. It works but requires an additional line in move_group.launch to configure the capability for getting planning scene - here's the full param for capabilities in move_group.launch. The additional line is the last one that adds move_group/MoveGroupGetPlanningSceneService

<param name="capabilities" value="move_group/MoveGroupCartesianPathService
                  move_group/MoveGroupExecuteService
                  move_group/MoveGroupKinematicsService
                  move_group/MoveGroupMoveAction
                  move_group/MoveGroupPickPlaceAction
                  move_group/MoveGroupPlanService
                  move_group/MoveGroupQueryPlannersService
                  move_group/MoveGroupStateValidationService
                  move_group/MoveGroupGetPlanningSceneService
                  " />

@mikeferguson
Copy link
Contributor

+1 as well. We should update the setup assistant to add the GetPlanningSceneService plugin though (I've manually added it in the past for our robot). Should probably also send an email to the mailing list when this gets merged/released so that people know to update their already exported configurations.

sachinchitta added a commit that referenced this pull request Feb 3, 2014
@sachinchitta sachinchitta merged commit 3e3087d into hydro-devel Feb 3, 2014
@acornacorn acornacorn deleted the fix_rviz_initial_scene_state branch February 8, 2014 05:19
otamachan pushed a commit to otamachan/moveit_ros that referenced this pull request Oct 22, 2017
…eit#409)

* Issue moveit#406 implementation: Set color of collision objects via PlanningSceneInterface

* Remove color information from applyAttachedCollisionObject(s) methods, as it's not used at all according to @v4hn
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.

4 participants