Closed carlosjoserg closed 9 years ago
Discussing with @enricocorvaglia, this controllers developed to be used not just in kuka robot but if many. @carlosjoserg The inverse/direct kinematics you are talking about are not the same as KDL functions? JntToCart, JointToJac ect. Or how do you suggest to organize them?
Good point, and I agree with the generality, in fact, it is quite general so far. After we test it well on the kuka and perhaps another robot, we should move the lwr_controllers
to ros_controllers
avoiding the lwr_
(we fork and edit).
The thing is, I see code that is repeated regarding URDF parsing, calls to IK solvers etc., then I thought why not to create either another package or a utils/robot_model.h
/utils/robot_model.cpp
class. I would prefer a package, in the same line as this one. The code is already there, but it requires organize, and update how the controllers call the kinematic/static/dynamic functions. That way, we also benefit from other packages requiring this functions without installing the controllers.
What do you think?
ok, I got it. I'll take a look a this and see how we can generate something similar.
Maybe instead of a package we could evaluate subclassing controller_interface::Controller and put the boilerplate in the constructor, if this is generic for any robot which consists of a single kinematic chain.
That sounds good, we could have a family of Cartesian controllers that include this in a common constructor.
The idea of having a separate package is that kinematic/static/dynamic properties can be used outside the scope of the controllers.
This was tackled by the KinematicChainControllerBase class in b5167fea67aa5f7347f2405ba3f18f6979a0802c
In all controllers, the direct/inverse kinematics is computed. Create a package that implements that only once and use ti within the controllers.