fixed executor issue using wrong task attribute and implementation call#198
Conversation
mhidalgo-rai
left a comment
There was a problem hiding this comment.
Patch looks reasonable to me. Mind DCO sign?
I'll go check why CI fails on an unrelated test.
|
Yeah sure. I hope what I did worked. It was giving me some weird rebase issue when I tried to amend the previous commit with the sign-off. If I run into any issues with running |
|
Please do not merge the patch yet. I've tested my patch on the hardware and it seems to not be working. When I originally made the fix, I just replaced [spot_ros2-1] Traceback (most recent call last):
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/spot_driver/lib/spot_driver/spot_ros2", line 3182, in <module>
[spot_ros2-1] main()
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/synchros2/lib/python3.12/site-packages/synchros2/process.py", line 212, in __call__
[spot_ros2-1] return func_taking_argv(rclpy.utilities.remove_ros_args(argv))
[spot_ros2-1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/spot_driver/lib/spot_driver/spot_ros2", line 3178, in main
[spot_ros2-1] ros_process.spin(SpotROS)
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/synchros2/lib/python3.12/site-packages/synchros2/process.py", line 446, in spin
[spot_ros2-1] process.spin(factory, *args, **kwargs)
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/synchros2/lib/python3.12/site-packages/synchros2/scope.py", line 485, in spin
[spot_ros2-1] self._executor.spin()
[spot_ros2-1] File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 359, in spin
[spot_ros2-1] self._spin_once_impl()
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/synchros2/lib/python3.12/site-packages/synchros2/executors.py", line 665, in _spin_once_impl
[spot_ros2-1] self._do_spin_once(args, kwargs)
[spot_ros2-1] File "/home/sandia-autonomy/Developer/spot_ws/install/synchros2/lib/python3.12/site-packages/synchros2/executors.py", line 670, in _do_spin_once
[spot_ros2-1] task, entity, node = self.wait_for_ready_callbacks(*args, **kwargs)
[spot_ros2-1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[spot_ros2-1] File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 874, in wait_for_ready_callbacks
[spot_ros2-1] return next(self._cb_iter)
[spot_ros2-1] ^^^^^^^^^^^^^^^^^^^
[spot_ros2-1] File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 642, in _wait_for_ready_callbacks
[spot_ros2-1] timeout_nsec = timeout_sec_to_nsec(
[spot_ros2-1] ^^^^^^^^^^^^^^^^^^^^
[spot_ros2-1] File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/utilities.py", line 161, in timeout_sec_to_nsec
[spot_ros2-1] if timeout_sec is None or timeout_sec < 0:
[spot_ros2-1] ^^^^^^^^^^^^^^^
[spot_ros2-1] TypeError: '<' not supported between instances of 'tuple' and 'int'It seems the line 670, I'll submit a fix for that now. |
Signed-off-by: Zahi Kakish <zmkakis@sandia.gov>
Signed-off-by: Zahi Kakish <zmkakis@sandia.gov>
mhidalgo-rai
left a comment
There was a problem hiding this comment.
Good catch @zmk5 !
|
@tcappellari-bdai this is good to go. Jazzy CI fails because Jazzy is broken upstream (ros2/rclpy#1598). |
|
Thanks for the merge! |
Proposed changes
Following issue #197, I finally had the time to formally implement the changes discussed there as a PR. This should allow
synchros2to work with aspot_ros2Jazzy implementation.The computer I made the fix with is a work laptop that can't run ROS for the lint and unit tests, and the computer where we have this code deployed is restricted from the internet. Please let me know if it does pass the linting and unit test requirements so I can fix any changes that may crop up. Sorry for this inconvenience!
Checklist