Part 3 Python Basics for Robotics Project not working with real robot

Hello,
I have been running into a recurring issue when trying to run my robot_control_classed.py code with the real robot (fastbot) in part 3 of the Python Basics for Robotics Project, and it seems to be because of an error in the Robot_interface class, which was prewritten. My code works fine with the simulation robot, but for some reason it does not connect to the real robot. I have pasted the error I am receiving below. Thank you.

Exception in thread Thread-1 (spin_node): Traceback (most recent call last): File “/usr/lib/python3.10/threading.py”, line 1016, in _bootstrap_inner self.run() File “/usr/lib/python3.10/threading.py”, line 953, in run self._target(*self._args, **self._kwargs) File “/home/user/ros2_ws/src/python_basics_project/python_basics_project/./robot_control_classed.py”, line 253, in spin_node executor.spin() File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 294, in spin self.spin_once() File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 794, in spin_once self._spin_once_impl(timeout_sec) File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 791, in _spin_once_impl future.result() File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py”, line 94, in result raise self.exception() File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py”, line 239, in call self._handler.send(None) File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 437, in handler await call_coroutine(entity, arg) File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 351, in _execute_timer await await_or_execute(tmr.callback) File “/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py”, line 107, in await_or_execute return callback(*args) File “/home/user/ros2_ws/src/python_basics_project/python_basics_project/robot_interface.py”, line198, in control_callback self.twist_cmd.angular.z = self.angular_velocity File “/home/simulations/ros2_sims_ws/install/geometry_msgs/local/lib/python3.10/dist-packages/geometry_msgs/msg/_vector3.py”, line 165, in z assert \

@adityakapoor906
Unfortunately I could not see the error in the text you pasted.

Please try again. If the error occurs again, please share two screenshots:

  1. A full screenshot of the whole screen
  2. A full screenshot of the terminal maximized, showing the full error trace and the command you ran

Hi @adityakapoor906 ,

Welcome to this Community!

The error report that you have copy-pasted in this post is incomplete and does not contain the main thing - the error report!

Please post the full text of error that you get, so that we can help you better. Kindly note that the logs that you have posted does not indicate an error and you have posted only a part of the error traceback report. We need the full error traceback report.

Regards,
Girish