# Issues Controlling the ReactorX Wrist from Stretch Tool Share

**URL:** <https://forum.hello-robot.com/t/issues-controlling-the-reactorx-wrist-from-stretch-tool-share/468>\
**Category:** Ask\
**Created:** [September 1, 2022, 4:23pm UTC](https://forum.hello-robot.com/t/issues-controlling-the-reactorx-wrist-from-stretch-tool-share/468 "2022-09-01T16:23:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpputhuveetil](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@kpputhuveetil](https://forum.hello-robot.com/u/kpputhuveetil)\
**Post date:** [September 1, 2022, 4:23pm UTC](https://forum.hello-robot.com/t/issues-controlling-the-reactorx-wrist-from-stretch-tool-share/468/1 "2022-09-01T16:23:11Z")

</div>

Hello!

I’m looking to use the ReactorX Wrist with the Stretch [as demonstrated in Stretch Tool Share](https://github.com/hello-robot/stretch_tool_share/tree/master/tool_share/reactorx_wrist_V1). 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](https://github.com/hello-robot/stretch_tool_share/blob/master/tool_share/reactorx_wrist_V1/python/reactor_wrist_jog.py), `reactor_wrist_jog.py`, after copying the contents of `stretch_re1_tool_params.yaml` [for the Reactor X Wrist](https://github.com/hello-robot/stretch_tool_share/blob/master/tool_share/reactorx_wrist_V1/yaml/stretch_re1_tool_params.yaml) into `stretch_re1_user_params.yaml` , I get the following error:

> **Summary**
>
> ```auto
> 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](https://github.com/hello-robot/stretch_body/tree/master/tutorial/extending_wrist_dof) 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](https://docs.hello-robot.com/0.1/tool_change_tutorial/#loading-tool-interfaces-from-the-stretch-tool-share). I modified the `stretch_re1_user_params.yaml` so it looks like this:

> **Summary**
>
> ```auto
> #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**
>
> ```auto
> 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!

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [September 1, 2022, 4:51pm UTC](https://forum.hello-robot.com/t/issues-controlling-the-reactorx-wrist-from-stretch-tool-share/468/2 "2022-09-01T16:51:47Z")

</div>

Hello. It’s great to see that you’re working with the Stretch Tool Share and the Reactor Wrist.

You are correct in that the instructions and code provided haven’t been updated for some time (as we’ve begun supporting the Stretch Dex Wrist). Thank you for the detailed write up.

We will update the Stretch Tool Share and post back here shortly when it is ready.

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [September 1, 2022, 6:02pm UTC](https://forum.hello-robot.com/t/issues-controlling-the-reactorx-wrist-from-stretch-tool-share/468/3 "2022-09-01T18:02:47Z")

</div>

Hi again. We’ve made an [update to the Stretch Toolshare](https://github.com/hello-robot/stretch_tool_share/tree/master/tool_share/reactorx_wrist_V1) that brings forward the Reactor Wrist code to the latest Stretch Body API and parameter system.

Unfortunately we don’t have a Reactor wrist available at the moment. We should also bring forward your Stretch Body installation to the latest version.

If you can reach out to us at [support@hello-robot.com](mailto:support@hello-robot.com) we can work with you to get everything working. At that point we’ll post back here for others to see.

Thanks!
