Hello!
I’m looking to use the ReactorX Wrist with the Stretch as demonstrated in Stretch Tool Share. We’ve successfully completed the wrist assembly but are now experiencing some issues with the code to actually control the wrist.
When attempting to run the sample script to test drive the wrist, reactor_wrist_jog.py
, after copying the contents of stretch_re1_tool_params.yaml
for the Reactor X Wrist into stretch_re1_user_params.yaml
, I get the following error:
Summary
kpputhuveetil@stretch-re1-1074:~/repos/stretch_tool_share/tool_share/reactorx_wrist_V1/python$ python reactor_wrist_jog.py
Traceback (most recent call last):
File "reactor_wrist_jog.py", line 8, in <module>
r=reactor_wrist.ReactorWrist()
File "/home/kpputhuveetil/repos/stretch_tool_share/tool_share/reactorx_wrist_V1/python/reactor_wrist.py", line 23, in __init__
DynamixelXChain.__init__(self, '/dev/hello-dynamixel-wrist')
TypeError: __init__() takes exactly 3 arguments (2 given)
I suspect that this script, and the way that the ReactorX Wrist is integrated with the robot, may be a bit outdated as it doesn’t match the conventions of some of the other tools in Stretch Tool Share.
I looked to some of the resources in the Docs to troubleshoot the issues we are seeing, like the tutorials on Extending the Wrist DOF. However, it appears that the provided hyperlink for this tutorial is broken.
I also attempted to follow the instructions on the Stretch RE1: Tool Change Tutorial for loading tool interfaces from the Stretch Tool Share. I modified the stretch_re1_user_params.yaml
so it looks like this:
Summary
#User parameters
#You can override nominal settings here
#USE WITH CAUTION. IT IS POSSIBLE TO CAUSE UNSAFE BEHAVIOR OF THE ROBOT
arm:
contact_thresh_N:
- -65
- 70
end_of_arm:
baud: 115200
factory_params: stretch_re1_factory_params.yaml
head:
baud: 115200
head_pan:
baud: 115200
head_tilt:
baud: 115200
hello-motor-lift:
gains:
i_safety_feedforward: 0.75
lift:
contact_thresh_N:
- -95
- 85
homing_force_N:
- -95
- 85
i_feedforward: 0.75
params:
#- stretch_tool_share.stretch_dex_wrist.params
#- stretch_tool_share.dry_erase_holder_v1.params
- stretch_tool_share.reactorx_wrist_v1
robot:
# tool: tool_stretch_dex_wrist
# tool: tool_dry_erase_holder_v1
tool: tool_reactorx_wrist_v1
use_collision_manager: 1
stretch_gripper:
baud: 115200
range_t:
- 0
- 6415
zero_t: 4017
tool_none:
baud: 11520
tool_stretch_gripper:
baud: 115200
wrist_yaw:
baud: 115200
If I try to interact with the tool in iPython, I get the following error when running the command
import stretch_body.robot as robot
Summary
In [1]: import stretch_body.robot
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-79a33825d80b> in <module>()
----> 1 import stretch_body.robot
/home/kpputhuveetil/.local/lib/python2.7/site-packages/stretch_body/robot.py in <module>()
5 import importlib
6
----> 7 from stretch_body.device import Device
8 import stretch_body.base as base
9 import stretch_body.arm as arm
/home/kpputhuveetil/.local/lib/python2.7/site-packages/stretch_body/device.py in <module>()
1 from __future__ import print_function
----> 2 from stretch_body.robot_params import RobotParams
3 import stretch_body.hello_utils as hello_utils
4 import time
5 import logging, logging.config
/home/kpputhuveetil/.local/lib/python2.7/site-packages/stretch_body/robot_params.py in <module>()
44 }}
45
---> 46 class RobotParams:
47 """Build the parameter dictionary that is available as stretch_body.Device().robot_params.
48 Overwrite dictionaries in order of ascending priority
/home/kpputhuveetil/.local/lib/python2.7/site-packages/stretch_body/robot_params.py in RobotParams()
65 hello_utils.overwrite_dict(_robot_params, _nominal_params)
66 for external_params_module in _user_params.get('params', []):
---> 67 hello_utils.overwrite_dict(_robot_params,getattr(importlib.import_module(external_params_module), 'params'))
68 hello_utils.overwrite_dict(_robot_params, _config_params)
69 hello_utils.overwrite_dict(_robot_params, _user_params)
AttributeError: 'module' object has no attribute 'params'
I am able to run the command without issue for other tools like the Dex Wrist and Dry Erase Holder.
I’d appreciate any guidance on how to update the code so that we can control the ReactorX Wrist either with Stretch Body or stretch_ros. Thank you for your help!