Skip to content

wait a second before updating "current" in RViz#291

Merged
v4hn merged 1 commit intoindigo-develfrom
pr-indigo-wait-for-current-update
Oct 19, 2016
Merged

wait a second before updating "current" in RViz#291
v4hn merged 1 commit intoindigo-develfrom
pr-indigo-wait-for-current-update

Conversation

@v4hn
Copy link
Copy Markdown
Contributor

@v4hn v4hn commented Oct 17, 2016

This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See #232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.

This is intended to be part of the next release because @rhaschke's code will probably not be in there.

This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See #232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.
Copy link
Copy Markdown
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.

Can we create an issue to remind us to remove it in the future?

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 17, 2016

Makes sense, whoever merges this, should file an issue.

@rhaschke
Copy link
Copy Markdown
Contributor

Instead of pull-requesting hacks, you should send me the full test log of your failure. Otherwise I cannot work on this. Doing the sleep in rviz is only one of many places, a sleep would be required... This doesn't solve the problem at all.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 18, 2016

On Mon, Oct 17, 2016 at 02:26:51PM -0700, Robert Haschke wrote:

Instead of pull-requesting hacks, you should send me the full test log of your failure. Otherwise I cannot work on this. Doing the sleep in rviz is only one of many places, a sleep would be required...
This doesn't solve the problem at all.

No it does not. But it allows to move robot arms around in rviz without updating the start state each time.
I know it's a hack and it's only meant for the release that is supposed to happen tomorrow.
Because nobody else even tested your request yet, I suppose this will (sadly!) not be in this release.

@Jntzko is working on getting a MoveIt kinetic setup running to test this over here right today.
Because he manually cherry-picked this to indigo, and we are discussing kinetic right now, this makes more sense imho.

@rhaschke
Copy link
Copy Markdown
Contributor

@Jntzko is working on getting a MoveIt kinetic setup running to test this over here right today.
Because he manually cherry-picked this to indigo, and we are discussing kinetic right now, this makes more sense imho.

Makes sense. However, getting your (Indigo) log output might help to progress too ;-)

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 18, 2016

On Tue, Oct 18, 2016 at 06:57:09AM -0700, Robert Haschke wrote:

@Jntzko is working on getting a MoveIt kinetic setup running to test this over here right today.
Because he manually cherry-picked this to indigo, and we are discussing kinetic right now, this makes more sense imho.

Makes sense. However, getting your (Indigo) log output might help to progress too ;-)

Working on that. @Jntzko just said he's doing a night shift to get this to you. :-)

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 19, 2016

I talked to Robert yesterday on the phone and he definitely agrees that the error this request works around exists.
He stated that he does not care whether we merge this for the release, as long as this can be fixed properly by the whole monitoring change he works on.

Because this improves the user experience quite a bit (without this patch all trajectories generated through moveit without updating the start-state will start from a configuration slightly different from the actual one), and because I tested this on hardware, I'm going to merge.
Notice that without this patch it is quite likely that people will complain about the new validation method because it triggers if they did not update the start state.
For my part, I still prefer working releases over "just releases".

@v4hn v4hn merged commit 5913b43 into indigo-devel Oct 19, 2016
v4hn added a commit that referenced this pull request Oct 19, 2016
This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See #232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.
v4hn added a commit that referenced this pull request Oct 19, 2016
This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See #232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.
@v4hn v4hn mentioned this pull request Oct 19, 2016
19 tasks
@rhaschke
Copy link
Copy Markdown
Contributor

@v4hn you were too fast. I started to write this post, was distracted, and now you already merged.

As this is a quick hack for the Kinetic release only, I suggest to rebase the PR to kinetic-devel and merge only there.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 19, 2016

Sorry, Isaac apparently moved the deadline half a day back because Dave stated everything is ready.
So I got a bit frustrated this morning..

I cherry-picked the commit to j/k already and am going to create an issue to revert them when your changes are ready.
Because I tested this on indigo-devel and it improves the current state there too (out of the box execution fails because of your monitoring if the user forgets to update the start-state),
I would like to have this in indigo-devel for now too.
As soon as your change is merged (best case before the next indigo release), this should be reverted on all branches.

@davetcoleman
Copy link
Copy Markdown
Member

So I got a bit frustrated this morning..

I really appreciate everything you guys are doing / adding / fixing for MoveIt! and as I've made clear I'm a bit frustrated we've been waiting and holding off for months now this release. We've got to stop adding things.

p.s. don't forget to create the issue reminder for this

@davetcoleman davetcoleman deleted the pr-indigo-wait-for-current-update branch October 19, 2016 16:35
@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Oct 20, 2016

p.s. don't forget to create the issue reminder for this

done in #303

130s pushed a commit to 130s/moveit-2 that referenced this pull request Oct 21, 2016
This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See moveit#232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.
130s pushed a commit to 130s/moveit-2 that referenced this pull request Oct 21, 2016
This is a poor-man's-replacement for rhaschke's work that
waits for the current robot state. This can be removed after
his work is merged. (See moveit#232)

Without the additional sleep the automatic update of the start state
will pick a point near the end of the executed trajectory instead of
the current state. Let's give the monitor a moment to catch up.
davetcoleman pushed a commit that referenced this pull request Jan 5, 2017
* PSM::waitForCurrentRobotState() + PSM::syncSceneUpdates()

* renamed wall_last_state_update_ to last_robot_state_update_wall_time_

* removed PSM::syncSceneUpdates() (and PSM::spinner_, PSM::callback_queue_)

Due to an upstream bug, it's not possible to start multiple AsyncSpinners from different threads.
Filed PR: ros/ros_comm#867

The spinner is now only needed to serve our own callback_queue_ for
scene updates, which is only required for syncSceneUpdates() that
syncs all kind of scene updates, not only the robot state.

* rviz: execute state update in background

... because we might wait up to 1s for a robot state update

* add robot_state update test

* waitForRobotToStop()

* Revert "wait a second before updating "current" in RViz (#291)"

This reverts commit e3ef9a6.

* addressed Dave's comments
k-okada pushed a commit to k-okada/moveit that referenced this pull request Dec 12, 2017
* PSM::waitForCurrentRobotState() + PSM::syncSceneUpdates()

* renamed wall_last_state_update_ to last_robot_state_update_wall_time_

* removed PSM::syncSceneUpdates() (and PSM::spinner_, PSM::callback_queue_)

Due to an upstream bug, it's not possible to start multiple AsyncSpinners from different threads.
Filed PR: ros/ros_comm#867

The spinner is now only needed to serve our own callback_queue_ for
scene updates, which is only required for syncSceneUpdates() that
syncs all kind of scene updates, not only the robot state.

* rviz: execute state update in background

... because we might wait up to 1s for a robot state update

* add robot_state update test

* waitForRobotToStop()

* Revert "wait a second before updating "current" in RViz (moveit#291)"

This reverts commit e3ef9a6.

* addressed Dave's comments

Conflicts:
	moveit_ros/planning/planning_scene_monitor/include/moveit/planning_scene_monitor/current_state_monitor.h
	moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
	moveit_ros/planning_interface/move_group_interface/src/move_group.cpp
	moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_planning.cpp
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.

3 participants