ros-controls / ros_control

Generic and simple controls framework for ROS
http://wiki.ros.org/ros_control
BSD 3-Clause "New" or "Revised" License
484 stars 305 forks source link

Merge two joint_trajectory_controller #360

Open ptiza-v-nebe opened 6 years ago

ptiza-v-nebe commented 6 years ago

This is the plattform: https://static.generation-robots.com/5045-large_default/kuka-youbot-omnidirektionaler-mobiler-roboter-mit-arm.jpg

My intend is to use the base and manipulator as one 8 DOF Robot and control it with moveit. The base has 3 DOF and Manipulator 5 DOF. The best result was to use effort_controller/JointTrajectoryController with manipulator and velocity_controller/JointTrajectoryController with the base. So I have two different Interfaces on two devices.

We get two FollowJointTrajectory Action Topics througt JointTrajectoryController. How to merge them into one?

I already managed to implement CombinedRobotHW, with the idea somehow to make one JointTrajectoryController. Now I can use one controller_manager for both devices(base,manip) but I still cant say "here are all my joint, make please one JointTrajectoryController" because you cant mix effort and velocity command.

Is there some way to do this? The simplest is of course to implement another node for merging them manually but maybe is there another good solution?

Thanks!

ptiza-v-nebe commented 6 years ago

There is no option to combine them in one controller without writing new complex controller. I just written another node that is muxing base and manipulator action topics to one combined action topic that Im now using in moveit. It works ok, besides some problems with managing two different feedbacks and results.

mikepurvis commented 5 years ago

In general, yes, you will need a new complex controller. However, you have a couple options for implementing it. First of all, you can combine existing controllers using either composition (instantiate them within your complex controller) or using multiple inheritance, for which there's some discussion and a helper class for, in PR here:

https://github.com/ros-controls/ros_control/pull/290 https://github.com/ros-controls/ros_control/pull/301

As far as having a controller which talks to more than one joint type, that's definitely possible— see MultiInterfaceController.