Hi Stretch Community!
I want to run a python script which sends commands to the robot while the web interface is running. The main purpose of running the two scripts at the same time is to get the camera feed from the web_interface. Here is the error I got:
[ERROR] [pimu]: Port /dev/hello-pimu is busy. Check if another Stretch Body process is already running
[WARNING] [pimu]: Unable to open serial port for device /dev/hello-pimu
[ERROR] [hello-motor-left-wheel]: SerialException(5): could not open port /dev/hello-motor-left-wheel: [Errno 5] Input/output error: '/dev/hello-motor-left-wheel'
[WARNING] [hello-motor-left-wheel]: Unable to open serial port for device /dev/hello-motor-left-wheel
[ERROR] [hello-motor-right-wheel]: Port /dev/hello-motor-right-wheel is busy. Check if another Stretch Body process is already running
[WARNING] [hello-motor-right-wheel]: Unable to open serial port for device /dev/hello-motor-right-wheel
[ERROR] [hello-motor-lift]: Port /dev/hello-motor-lift is busy. Check if another Stretch Body process is already running
[WARNING] [hello-motor-lift]: Unable to open serial port for device /dev/hello-motor-lift
[ERROR] [hello-motor-arm]: Port /dev/hello-motor-arm is busy. Check if another Stretch Body process is already running
[WARNING] [hello-motor-arm]: Unable to open serial port for device /dev/hello-motor-arm
[ERROR] [wacc]: Port /dev/hello-wacc is busy. Check if another Stretch Body process is already running
[WARNING] [wacc]: Unable to open serial port for device /dev/hello-wacc
Traceback (most recent call last):
File "[BluetoothAP.py](http://bluetoothap.py/)", line 23, in <module>
robot.startup()
File "/home/zackory/.local/lib/python2.7/site-packages/stretch_body/robot.py", line 159, in startup
if not self.devices[k].startup(threaded=False):
File "/home/zackory/.local/lib/python2.7/site-packages/stretch_body/head.py", line 21, in startup
return DynamixelXChain.startup(self, threaded=threaded)
File "/home/zackory/.local/lib/python2.7/site-packages/stretch_body/dynamixel_X_chain.py", line 81, in startup
if not self.motors[mk].startup(threaded=False):
File "/home/zackory/.local/lib/python2.7/site-packages/stretch_body/dynamixel_hello_XL430.py", line 160, in startup
self.motor.set_return_delay_time(self.params['return_delay_time'])
File "/home/zackory/.local/lib/python2.7/site-packages/stretch_body/dynamixel_XL430.py", line 404, in set_return_delay_time
dxl_comm_result, dxl_error = self.packet_handler.write1ByteTxRx(self.port_handler, self.dxl_id,XL430_ADDR_RETURN_DELAY_TIME, int(x))
File "/opt/ros/melodic/lib/python2.7/dist-packages/dynamixel_sdk/protocol2_packet_handler.py", line 653, in write1ByteTxRx
return self.writeTxRx(port, dxl_id, address, 1, data_write)
File "/opt/ros/melodic/lib/python2.7/dist-packages/dynamixel_sdk/protocol2_packet_handler.py", line 643, in writeTxRx
rxpacket, result, error = self.txRxPacket(port, txpacket)
File "/opt/ros/melodic/lib/python2.7/dist-packages/dynamixel_sdk/protocol2_packet_handler.py", line 346, in txRxPacket
rxpacket, result = self.rxPacket(port)
File "/opt/ros/melodic/lib/python2.7/dist-packages/dynamixel_sdk/protocol2_packet_handler.py", line 257, in rxPacket
rxpacket.extend(port.readPort(wait_length - rx_length))
File "/opt/ros/melodic/lib/python2.7/dist-packages/dynamixel_sdk/port_handler.py", line 80, in readPort
return [ord(ch) for ch in self.ser.read(length)]
File "/home/zackory/.local/lib/python2.7/site-packages/serial/serialposix.py", line 596, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Is there a way to fix this? Or are there any python codes I can use to get the real time video feed from the robot?
Thank you so much for your help!