Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'group' #1

Open
anipr2002 opened this issue Nov 28, 2024 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'group' #1

anipr2002 opened this issue Nov 28, 2024 · 0 comments

Comments

@anipr2002
Copy link

$ ros2 run ros2_robotiqgripper server.py --ros-args -p IPAddress:="192.168.1.102"
IPAddress ROS2 Parameter received: 192.168.1.102
[ROS2 Robotiq Gripper]: ros2_RobotiqGripper_ServiceServer generated.
Traceback (most recent call last):
File "/home/anipr2002/CODE/ROS_WS/robotiq_ws/install/ros2_robotiqgripper/lib/ros2_robotiqgripper/server.py", line 165, in
main()
File "/home/anipr2002/CODE/ROS_WS/robotiq_ws/install/ros2_robotiqgripper/lib/ros2_robotiqgripper/server.py", line 159, in main
rclpy.spin(GripperNode)
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/init.py", line 244, in spin
executor.spin_once()
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 827, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 822, in _spin_once_impl
raise handler.exception()
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/task.py", line 239, in call
self._handler.send(None)
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 508, in handler
await call_coroutine()
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 447, in _execute
response = await await_or_execute(srv.callback, request, srv.srv_type.Response())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 111, in await_or_execute
return callback(*args)
^^^^^^^^^^^^^^^
File "/home/anipr2002/CODE/ROS_WS/robotiq_ws/install/ros2_robotiqgripper/lib/ros2_robotiqgripper/server.py", line 110, in ExecuteService
GripperPos_STR = int(re.search(r'\d+', str(data)).group())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
[ros2run]: Process exited with failure 1

ROS_DISTRO : Jazzy
Robotiq 2F-140.

I am getting this error when I run
$ ros2 service call /Robotiq_Gripper ros2_robotiqgripper/srv/RobotiqGripper "{action: 'CLOSE'}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant