-
Notifications
You must be signed in to change notification settings - Fork 117
Added support for nodes handles with specific callbacks queues #701
Conversation
kinematics_loader_.reset(); // we delete it manually | ||
ROS_DEBUG( "KinematicsLoaderImpl destructor"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has nothing to do with the matter addressed in the pull-request and is separately discussed in #702.
Please remove this commit from the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do that.
Hey @alainsanguinetti, As this is ABI breaking in a central class of MoveIt!, I do not like to see this merged into indigo. |
Hello, I think I responded to all the very relevant comments. One node is running, it instanciates objects and move them to separate threads. Each object has its own callback queue that it calls periodically. No one calls ros::spin / spinOnce because we want everything to be scoped to a thread. The creation of the move group works fine because the move_group calls ros::spin / spinOnce (which is quite a strong assumption actually, maybe the presence of a callback queue should prevent those calls). To solve this I tried to give the node handle with our callbacks options to the state monitor but then, the move_group interface waits for the callbacks of the node to be called which does not happen of course. This is why I added the calls to process the callbacks of the callback queue. I'm not really sure what ABI breaking means, I would like to highlight that this is an option so that it works fine with current code. At last, seen the issues with this PR, should I close this one and open a new clean one on a dedicated branch ? Would that make sense ? |
the wait time is unlimited. | ||
* | ||
* @param opt. An option structure, if you pass a node with a specific callback queue, it has to of type ros::CallbackQueue. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this comment change, you didn't change anything there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let me change that comment: I don't see why option should get an @param line when everything else does not and I don't understand why you added the comment there.
This seems to be highly specialized to your application and it is pretty confusing to newcomers.
So I would prefer to see this change removed from the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to highlight that the callback queue must be of type ros::CallbackQueue. It's highly unlikely that it happens but it seems to be possible from the way it is coded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, could you please add something like "(This is the default case in ROS)" at the end of the comment, to make it less confusing for people reading the code for the first time?
breaking ABI compatibility means that everyone using the library will have to recompile their code and will get segfaults and (in this case) missing symbol exceptions if they don't. Could you please close this request and open a new one (cleaned up) targeting jade-devel? I'm not sure about your |
How about keeping the current function signature and adding the proposed one as a new one without optional arguments ? |
How about keeping the current function signature and adding the proposed one as a new one without optional arguments ?
The current one would simply call the new one with the default node handle.
Yes, that works for indigo-devel too. +1 for that method.
Please go ahead and adjust the request to address the discussed changes.
In case you're not that familiar with git/github: you can use `git rebase -i` (interactive rebasing)
to get rid of unnecessary commits in the branch and change code in existing commits
and `git push -f` to push the changed branch to your own github remote, replacing the current branch.
The pull-request is bound to your branch "indigo-devel", so if you update something there,
the request automatically changes.
|
bebe544
to
bf236be
Compare
Modifications done. |
\param wait_for_server. Optionnal timeout for connecting to the action server. If it is not specified, the wait time is unlimited. | ||
\param opt. A MoveGroup::Options structure, if you pass a ros::NodeHandle with a specific callback queue, it has to of type ros::CallbackQueue | ||
(which is the default type of callback queues available in ROS) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Optionnal" -> "Optional"
"it has to of type" -> "it has to be of type"
The delegation constructor is fine by me. ROS has many places where it does not respect c++98 |
bf236be
to
02e7118
Compare
pr#701 updated code PR moveit#701 typo fixes and overload for getSharedStateMonitor
Hopefully this time I got it right! |
On Tue, Jul 05, 2016 at 06:28:14PM -0700, Alain Sanguinetti wrote:
Hehe, nearly.
Sorry for all the nit-picking... Other than that +1. The patch works as expected on the tutorials, |
02e7118
to
19f52b2
Compare
@v4hn I added comments, can you check if they are good ? |
On Wed, Jul 06, 2016 at 02:52:47AM -0700, Alain Sanguinetti wrote:
perfect! @davetcoleman : the patch works as expected and preserves ABI, the only thing |
I've never seen this sort of thing:
So I can't comment intelligently on it. I'm assuming it allows us to specify as specific node handle to spin instead of the generic Sounds like you did a good review @v4hn, +1 |
@davetcoleman the difference with this call is that |
Thanks for cherry-picking! |
Crap -.-
I'm sorry... Last time I did it without a comment anywhere. Promised.
|
Hello,
Working with MoveIt in my company showed the need for the possibility to pass node handles with specific callback queues to the move_group interface and the current state monitor.
These are the modifications that I made to have it working.
Let me know if there is anything you think I should update more.
Regards,