Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Adding support for PhantomX Pincher arm #28

Closed
wants to merge 5 commits into from
Closed

Adding support for PhantomX Pincher arm #28

wants to merge 5 commits into from

Conversation

corb555
Copy link

@corb555 corb555 commented Dec 15, 2014

I've tested this successfully with PhantomX Pincher. (Also requires new config/URDF in Turtlebot which I've pushed to Corot).

- Adding Joint Status for prismatic joint to publish in meters rather than radians
- Adding support for Pincher arm to gripper_controller
- Break when we reach goal
- Fixing preempt handling (typo)
@@ -70,6 +71,7 @@ def __init__(self):

# subscriber
self.pub = rospy.Publisher('joint_states', JointState, queue_size=5)
self.convert = ParallelConvert()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By implementing this way, you limit yourself to only ever having one set of settings for a ParallelConvert. This also introduces a bunch of joint info right into this class. The ParallelConvert instance should really be a member of the joint that is prismatic, not this class

@corb555
Copy link
Author

corb555 commented Dec 16, 2014

I updated based on your suggestions and it seems much cleaner. One thing for feedback - for ParallelConvert, it now receives a joint name so each joint can have its own params. It is hard coded to root namespace, "/arbotix/joints". I didnt want to pass the root name as a param since both ServoDriver and GripperController use this and must have same params. Root could either be /arbotix/joints so all joint params are together or maybe should use a new space like "prismatic/joints". Also, I have tested this with the Pincher gripper and Corot is going to test with the original turtlebot.

   - Publisher is now same as original Arbotix, but publishes using jst_position rather than position
   - In Arbotix Driver, added new joint type: PrismaticDynamixelServo which inherits from DynamixelServo
     but updates jst_position in meters rather than radians
   - ParallelConvert now takes Joint name in initialization.  Uses /arbotix/joints namespace for params
@corot
Copy link
Contributor

corot commented Jan 15, 2015

@corb555, you pass the command to the controller as gripper opening, in m, right?

SingleFinger controller expects that, but MoveIt! planner sends free-finger joint rotation, what of course doesn't work unless by chance the radians value makes sense as a physical gripper opening. Maybe we should rethink if there's something wrong on this, or is just the way things are.

@corb555
Copy link
Author

corb555 commented Jan 15, 2015

The original Arbotix code for OneSideGripperModel looks to me like it gets command in m and converts to radians and sends to servo controller (line 135 and line 142). The OneSideGripper publishes Joint State in radians however, which does seem odd. I tried not to change that in the new version (in my version this is in the base class, GripperModel). It would be easy to change the OneSideGripperModel to receive in radians (we just remove the conversion) but I have no way to test it.

The new model (ParallelGripper) receives command in m and also publishes in m.

""" Take an input command of width (m) to open gripper and publish angle to Servo. """
# check limits
if command.position > self.max_opening or command.position < self.min_opening:
rospy.logerr("Command (%.5f) exceeds max limit ( %.5f) or min limit ( %.5f)", command.position, self.max_opening, self.max_opening)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are printing max_opening for both min and max limit

@bjsowa
Copy link

bjsowa commented Mar 10, 2019

Any chance of this getting merged?

@corb555 corb555 closed this by deleting the head repository Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants