-
Notifications
You must be signed in to change notification settings - Fork 100
Adding support for PhantomX Pincher arm #28
Conversation
- 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() |
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.
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
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
@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. |
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) |
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.
You are printing max_opening for both min and max limit
Any chance of this getting merged? |
I've tested this successfully with PhantomX Pincher. (Also requires new config/URDF in Turtlebot which I've pushed to Corot).