-
Notifications
You must be signed in to change notification settings - Fork 542
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
Let the MoveItControllerManager manage more controllers #726
Comments
My only thought is we probably should have a better name. https://blog.codinghorror.com/i-shall-call-it-somethingmanager/ I like the idea though. |
@schornakj I added #753 as a blocker for #731. Feel free to bump up the version in your PR or in a separate one.
I somewhat agree. But this is probably more of a general discussion. Also, I'm not sure all manager classes should be renamed just because they are called managers. Often, a class redesign is required to find better names ;) |
I think the code change you propose here sounds good 👍 As for this:
I don't love it because the name Anyway, I don't think that comment applies to the scope of work in this issue. We can work out those details later. |
Using this issue as a gathering place for changes I would like...
So it seems to me like we could really simplify controller management in MoveIt2 a lot! |
@destogl what do you think about ^? |
Since MoveGroup uses the C++ API internally this should naturally happen with any changes to the TrajectoryExecutionManager.
I don't think ros2_control handles switching between conflicting controllers -- it can provide the info needed to figure out where conflicts exist, but it doesn't activate or deactivate the controllers to resolve the conflict. When I use the
I definitely agree. In particular it would be great to get more info about the system "live" while it's running rather than relying on various YAML config files. |
ros2_control does ensure that only one controller claims each interface, I believe. So it will not allow conflicts. When it comes to MoveIt managing the controllers, and switching between streaming and trajectory control, MoveIt doesn't have any way to know which controller is used for streaming (and vice versa). So I don't think we should attempt to even tackle that problem. Yeha, we could maybe make a new yaml tag to define whether a controller is valid for streaming, or trajectories, or both, or neither, but... that seems like a lot of complexity that doesn't add much value. |
Futhermore, it could be possible to have 3+ controllers for any given joint group! Then it will be really tricky for MoveIt to select the right one. |
That's true, but I think the result if there's a conflict is just that the trajectory will fail to execute. Some additional logic is needed to make sure the trajectory can be successfully executed if possible.
Yeah, there are so many levels of application-specificity here that it makes more sense to leave it to the application developer to pick the right controller for some use cases. One issue I ran into is that there isn't much support in MoveGroup or MTC for assigning a specific controller to a given trajectory, so that'll be an additional PR. |
Yeah, there are so many levels of application-specificity here that it makes more sense to leave it to the application developer to pick the right controller for some use cases. One issue I ran into is that there isn't much support in MoveGroup or MTC for assigning a specific controller to a given trajectory, so that'll be an additional PR.
Yes to all of that! For MTC my plan is to specify specific controllers via [external properties](moveit/moveit_task_constructor#194), but that support is not ready for merge yet.
Also, when working with compliant controllers, it's far from clear when trajectory execution should finish or abort during execution.
|
Hey team! Please add your planning poker estimate with ZenHub @abake48 @Abishalini @AndyZe @DLu @henningkayser @JafarAbdi @vatanaksoytezer |
Can you provide some detail about how you picture specifying and using specific controllers through an MTC task? Currently I use the
One thing I was thinking about today was switching between compliant and non-compliant controllers that both control the same arm while executing a multi-segment trajectory. It's likely that at the end of a motion the compliant controller would leave the robot at a different joint state than originally planned, which would cause problems for the non-compliant controller since the start start of its trajectory would now be different than what was planned. This might necessitate a replan, and I don't have a sense for if there is existing support for this kind of runtime replanning in MoveIt. Hybrid planning could help solve this, though. |
@schornakj I think Hybrid Planning could help with this problem because you could use the local planner to decouple global planning from control and the planning logic for replanning |
Any updates? Has it been added onto MTC? |
As currently implemented, the MoveItControllerManager plugin can only manage the activation and deactivation of controllers that have a MoveIt controller allocator plugin defined, due to this bit of code.
However, it would also be useful to allow the MoveItControllerManager to also manage controllers that are not associated with MoveIt trajectory execution. For example, MoveIt Servo is often configured to use a streaming position or velocity controller, so switching between Servo control and joint trajectory execution requires managing these controllers separately from the execution of trajectories through the TrajectoryExecutionManager. The TrajectoryExecutionManager already has a lot of information about the relationships between different available controllers and their potentially-overlapping associations with joint interfaces, and it would be great to be able to use that more flexibly.
It's fairly straightforward to allow the MoveItControllerManager to manage more controllers -- the lines of code I linked above would need to be modified to be like this so the controller is added to
managed_controllers_
regardless of if a plugin is available for it:One way to use this expanded functionality would be to create a MoveGroup capability that activates a specified controller through the TrajectoryExecutionManager.anager.
Does anyone have thoughts about this?
The text was updated successfully, but these errors were encountered: