Hi!
Thanks you all for the kick answer and doc publication. Was very helpfull to understand the whole process. So resuming, to make a robot work with MoveIt! you need to implement 2 things, the URDF file (to use the wizard) and the controller or controllers for the different groups that robot has. Right?
What i don't know if I understood is how this controller_manager and this controller_interface connects with my controller.
What i was expecting to need was a msg handler for the trajectories emited by moveit running on my controller package.
I need to recognize that i'm also not a expert c++ software developer at this hight level, so I may ask very silly questions some times. And probably I'm not aware of things that are assumed on the tutorials. I was trying to revers enginering the pr2_controller to understand what is supposed to do the plug-in but is not that intuitive to me as I’m new to ROS to.
But i get the intuition that what was happening there is that the actual robot controller is implemented as a actionlib server, awaiting for trajectory messages in pr2_msg formats so PR2 controller that where implemented earlier will understand them. Is that right?
But may I, as I'm implementing right away my wrapper controller, directly do it as a moveit! plug-in so no need to go through more complicated structures right? I mean for example, when a trajectory for the gripper arrive to controller manager, the handler it self will send right away to the hardware the position rising a new thread to control that execution(to not block the trajectory manager).
Or better keep a separation between them and create as a different package and run standalone? Or may i'm reinventing the wheel and this is just what actionlib helps to?
Again thanks for the support, and for this great stack. I may apologize for my no so clear questions too, thought.
Ok, I'm here back again with controllers troubles. I was working in other parts of the robot like, the scene, get actually some real planing done, some visualizations and learning hot to use several classes. And get down that I declared completely wrong the controllers. Now is fixed and I’m using as suggested de moveit_simple_controller_manager. What happens here is that this need the joint trajectory action controller from robot mechanics controllers. But I don't know how to wake it up so my moveit setup starts correctly and connects to it.
Did I need to launch a specific node? I was no hable to find it in the package documentation neither on moveit.
Now I get stuck with:
MoveitSimpleControllerManager: Waiting for arm_controller/follow_joint_trajectory to come up
MoveitSimpleControllerManager: Action client not connected: arm_controller/follow_joint_trajectory
"Client [/myRobot_controller] wants topic /myRobot_controller/follow_joint_trajectory/goal to have datatype/md5sum [control_msgs/JointTrajectoryActionGoal/aee77e81e3afb8d91af4939d603609d8], but our version has [control_msgs/FollowJointTrajectoryActionGoal/8f3e00277a7b5b7c60e1ac5be35ddfa2]. Dropping connection."
Hi Marcus,Yeah, i had that intuition but get wrong the namespaces stuff. I had struggling again with the controller, writed the code and the action server but when it comes to connect with moveit i get a new error. I didn't know how to find if someone had it before.I'm using the MoveitSimpleControllerManager as i have only a chain of joints to control. I finally get how to name correctly the nodes and action server to make moviet connect to it, but when it tries i get this surprissing error."Client [/myRobot_controller] wants topic /myRobot_controller/follow_joint_trajectory/goal to have datatype/md5sum [control_msgs/JointTrajectoryActionGoal/aee77e81e3afb8d91af4939d603609d8], but our version has [control_msgs/FollowJointTrajectoryActionGoal/8f3e00277a7b5b7c60e1ac5be35ddfa2]. Dropping connection."
Oh man! Youre right... Just to many hours working on it. I did not noticed the 'follow' part missed on my code... I was following the followJointAction package as example. What a shame. Time to test the robot i guess.
Thanks a lot for youre help!