I am stuck on the services quiz. I keep getting the following error:
[INFO] [1634610362.933811, 0.000000]: Doing Service Call…
Traceback (most recent call last):
File “/home/user/catkin_ws/src/services_quiz/src/bb8_move_custom_service_client.py”, line 25, in
result = move_bb8_in_square_service_client(move_bb8_in_square_request_object)
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py”, line 442, in call
return self.call(*args, **kwds)
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py”, line 522, in call
responses = transport.receive_once()
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py”, line 735, in receive_once
p.read_messages(b, msg_queue, sock)
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py”, line 360, in read_messages
self._read_ok_byte(b, sock)
File “/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py”, line 343, in _read_ok_byte
raise ServiceException(“service [%s] responded with an error: %s”%(self.resolved_name, str))
rospy.service.ServiceException: service [/move_bb8_in_square_custom] responded with an error: b"error processing request: object of type ‘int’ has no len()"
[service_move_bb8_in_square_custom_client-1] process has died [pid 1867, exit code 1, cmd /home/user/catkinProcessing: bb8_move_custom_service_client.py…
_ws/src/services_quiz/src/bb8_move_custom_service_client.py __name:=service_move_bb8_in_square_custom_client __log:=/home/user/.ros/log/de6ab6aa-3082-11ec-9ada-0242c0a82002/service_move_bb8_in_square_custom_client-1.log].
log file: /home/user/.ros/log/de6ab6aa-3082-11ec-9ada-0242c0a82002/service_move_bb8_in_square_custom_client-1*.log
I believe it has to do with a variable that it thinks should be a string. It is obviously this line that is causing the issue:
result = move_bb8_in_square_service_client(move_bb8_in_square_request_object)
Here is my entire client:
I have looked this over many times and still can’t pinpoint the issue. It is an exact copy of the custom service exercise modified for this exercise. It references the following service:
Can anyone see what I did wrong and point me in the right direction? Please let me know if you need more information.