personalrobotics / rewd_controllers

master
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

JointTrajectoryControllerBase should accept commands for a subset of joints #13

Closed brianhou closed 7 years ago

brianhou commented 7 years ago

@mkoval's original suggestion:

Having three trajectory executors (left, right, and bimanual) is probably the correct solution today. In the future, I'd like to modify rewd_controllers to accept commands for a subset of the joints, so we would always leave the bimanual trajectory controller loaded.

That is a pretty straightforward change if someone would like to make it - you just pad the output of evaluate()ing the trajectory with waypoints at (a) the current configuration and (b) zero derivatives.

The only time we would load the left and right trajectories is if we want to execute a single-arm trajectory while running a different controller (e.g. gravity compensation or velocity control) on the other arm. Which seems like a pretty exotic use-case that won't happen too often. :slightly_smiling_face:

brianhou commented 7 years ago

@mkoval I had some issues implementing this in the way you described. I think the problem is that when we receive a goal, we immediately try to convert the entire ROS JointTrajectory into an aikido::trajectory::Spline in the controlled space. The way I've done it in https://github.com/personalrobotics/aikido/issues/217 is to pass in the current configuration into aikido::control::ros::toSplineJointTrajectory and edit each waypoint before computing the splines. What do you think?