First off, all of this basically belongs on
answers.ros.org and not on the list.
For further concrete questions, please raise them there.
On Wed, Jun 07, 2017 at 07:50:39AM -0700, Clément BAZERQUE wrote:
> *Concerning option 1:*
> - the robot will shake, make weird noise and scare the human collaborator
> (and reducing the publish rate of user position is dangerous). I would like
> to keep smooth movements.
> - also using randomized planners (RRT for example) would produce different
> trajectories and sometimes force the robot change direction (maybe not if
> forcing linear trajectories with computeCartesianPath).
It depends on the low-level implementation of the action server that controls the arm,
but generally, yes these shortcomings will arise.
> *Concerning option 2 (best hope):*
> However, I don't know how a FollowJointTrajectory action server works.
> I suppose that the server gets the trajectory from MoveIt!, reads the next
> target point in the trajectory, send it to the controllers.
Usually the FollowJointTrajectory action server *is part* of the controller
and tries to control the arm to stay close to the trajectory.
> And correct me if I am wrong, your idea is to somehow:
> - make the server subscribe to a topic where the position of the user is
> published
> - compute the corresponding speed_ratio in a callback (speed_ratio would be
> an attribute of the server class)
> - just before sending the next target point to the controllers, multiply
> its velocity by the speed_ratio
This description is rather specific but the general direction is what I meant, yes.
> If it works like this I think it is feasible.
> *Do you know where I could find examples of FollowJointTrajectory action
> server ?*
The abstract ros_control implementation is here
http://wiki.ros.org/joint_trajectory_controller
but I don't think this will help you a lot.
You will have to (/should) deal with the controller for your robot.
I don't have a Sawyer (sadly rethink is still hesitant with giving them away for free :))
so I don't know whether you will have to talk to rethink for this or whether you can
hook your code somewhere in the pipeline.