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

Absurd protocol to broadcast prop frames in simulation #109

Open
eminmeydanoglu opened this issue Dec 25, 2024 · 1 comment
Open

Absurd protocol to broadcast prop frames in simulation #109

eminmeydanoglu opened this issue Dec 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@eminmeydanoglu
Copy link
Contributor

To run a SMACH in simulation, one must follow these exact steps in specified order:

  1. Start the simulation environment
  2. Enable the localization by calling the service.
  3. Launch the YOLO tracker
    roslaunch auv_detection tracker.launch
  4. Start SMACH

So the absurdity here is, it's crucial to enable localization before launching YOLO. Reversing this order prevents the broadcast of prop frames (not only the frames getting broadcasted from SMACH like gate_target, but also ones from gate trajectory publisher/ prop transform publisher like gate_entrance, gate_exit, gate_blue_arrow_link. )

@talhabw, feel free to comment on what you think the issue lies at.

@eminmeydanoglu eminmeydanoglu added the bug Something isn't working label Dec 25, 2024
@talhabw
Copy link
Contributor

talhabw commented Jan 25, 2025

This happens because prop_transform_publisher.py tries to calculate a transform between odom and taluy/base_link/front_camera_optical_link frames when we start the auv_detection. Below is a stack trace of that.

error stack trace
bad callback: <bound method Subscriber.callback of <message_filters.Subscriber object at 0x7f9a5925ce50>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/_init_.py", line 76, in callback
    self.signalMessage(msg)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/_init_.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/_init_.py", line 330, in add
    self.signalMessage(*msgs)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/_init_.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/home/tbw/catkin_ws/src/auv-software/auv_control/auv_control/scripts/prop_transform_publisher.py", line 466, in callback
    self.process_front_estimated_camera(
  File "/home/tbw/catkin_ws/src/auv-software/auv_control/auv_control/scripts/prop_transform_publisher.py", line 657, in process_front_estimated_camera
    transform = self.tf_buffer.lookup_transform(
  File "/opt/ros/noetic/lib/python3/dist-packages/tf2_ros/buffer.py", line 90, in lookup_transform
    return self.lookup_transform_core(target_frame, source_frame, time)
tf2.ConnectivityException: Could not find a connection between 'odom' and 'taluy/base_link/front_camera_optical_link' because they are not part of the same tree.Tf has two or more unconnected trees

I don't think it's worth to fix this just to be able to run the localization and auv_detection in any order. But this may also mean we wouldn't have to restart the auv_detection everytime we restart the robot code, so fixing this may be worth it.

Just a better error handling when there is no transform between odom and some other frame in the prop_transform_publisher.py would easily fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants