marcoesposito1988 / easy_handeye_demo

Virtual demonstration of a hand-eye calibration with easy_handeye, no hardware required
GNU General Public License v3.0
60 stars 22 forks source link

help"rospy.service.ServiceException:" #1

Closed songWell closed 4 years ago

songWell commented 6 years ago

Traceback (most recent call last): File "/home/well/my_shadow_hand/indigo_ws/src/easy_handeye/rqt_easy_handeye/src/rqt_easy_handeye/rqt_easy_handeye.py", line 104, in handle_take_sample sample_list = self.client.take_sample() File "/home/well/my_shadow_hand/indigo_ws/src/easy_handeye/easy_handeye/src/easy_handeye/handeye_client.py", line 34, in take_sample return self.take_sample_proxy().samples File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in call return self.call(*args, **kwds) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 515, in call responses = transport.receive_once() File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 696, in receive_once p.read_messages(b, msg_queue, sock) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 353, in read_messages self._read_ok_byte(b, sock) File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 336, in _read_ok_byte raise ServiceException("service [%s] responded with an error: %s"%(self.resolved_name, str)) rospy.service.ServiceException: service [/ur5_demo_handeyecalibration_eye_on_base/take_sample] responded with an error: error processing request: . canTransform returned after 10.0073 timeout was 10.

when I launch the calibrate.launch and press the take sample , the terminal raise error.Do you know why?Could you give me some suggestion?

marcoesposito1988 commented 6 years ago

Hello @songWell,

this is a classic warning from tf. It usually means that the timestamps of the transforms are out of sync.

easy_handeye is trying to sample both transforms at the time when you press the button. So it looks up a tf transform with that timestamp. To answer the query, tf must traverse the transform graph and chain the transformations. However, if a link in your chain has timestamps which have a large offset with respect to the others, tf will refuse to compute the transformation.

I had success locating quickly such issues with roswtf. You should get a warning that some tf transforms have a weird time.

Alternatively you can try to inspect the graph generated by rqt_tf_tree.

Hope this helps.

marcoesposito1988 commented 4 years ago

Closing for inactivity