-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add subscriber for JointTrajectory as /command #37
base: master
Are you sure you want to change the base?
Conversation
+1 |
I will take this pull request into consideration. It's a reasonable request, but I need to see if it fits into the joint trajectory action server upgrades that I've been working on in the im_inverse_dynamics_feedforward branch. |
01183ad
to
4f9e994
Compare
resolved conflicts |
@@ -68,6 +69,7 @@ def __init__(self, limb, reconfig_server, rate=100.0, | |||
FollowJointTrajectoryAction, | |||
execute_cb=self._on_trajectory_action, | |||
auto_start=False) | |||
self._command = rospy.Subscriber('robot/limb/' + limb + '/command', JointTrajectory, self._on_joint_trajectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would advocate for the following namespacing for clarity:
/robot/limb/right/joint_trajectory/command
/robot/limb/right/joint_trajectory/state
/robot/limb/right/joint_trajectory/query_state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for comment, fixed,
4f9e994
to
2b6d596
Compare
self._pid[jnt].initialize() | ||
|
||
def _on_joint_trajectory(self, trajectory): | ||
joint_names = trajectory.joint_names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this trajectory callback can execute at the same time as the Action callback, I think it would make sense to have a mutex lock on both to prevent simultaneous joint commands from being sent into the robot.
@k-okada I'm very sorry your pull request has languished for nearly two years :/ . I think this topic interface is a valuable addition to the joint trajectory action server, and want to incorporate it if possible. Since the I am off-the-grid the next week on vacation, but I would like to address your pull requests the first week in August when I come back. |
2b6d596
to
5b954f9
Compare
ok, i have rebased on But I do not think this will prevent simultaneous joint commands execution, we have to lock more wider range, i.e. entire on_trajectory_action and on_trajectory_command, and also I think we should support "override / trajectory replacement" feature as described in http://wiki.ros.org/robot_mechanism_controllers/JointTrajectoryActionController#Trajectory_Replacement, I'll work on this once all my PR is merged. Have a nice vacation! |
/command is general API[1] that is widly used together with JointTrajectoryAction, I need to use this IF for calibration program[2]
[1] http://wiki.ros.org/joint_trajectory_controller?distro=indigo
[2] ros-perception/calibration#31