JMU-ROBOTICS-VIVA / ros2_aruco

ROS2 Wrapper for OpenCV Aruco Marker Tracking
MIT License
66 stars 68 forks source link

node builds but fails to run successfully #9

Open anfederman opened 7 months ago

anfederman commented 7 months ago

After installing a Raspberry Picam on a RTOS Ubuntu 22 ARM64 Humble Raspberry Pi 4, using camera_ros from github, rqt_image_view did successfully show images to a remote desktop.

After considerable effort to build ros2_aruco ( needed exact versions of open_cv contrib, ros2 tf-transformations, tf2*)

I am getting this:

/aruco_markers /aruco_poses /camera/camera_info /camera/image_raw /camera/image_raw/compressed /parameter_events /rosout

ubiqlap@ubiqlap-X540LA:~$ ros2 topic echo /aruco_markers The message type 'ros2_aruco_interfaces/msg/ArucoMarkers' is invalid

this is my:

/ros2_ws/install/ros2_aruco/share/ros2_aruco/config/aruco_parameters.yaml

ros__parameters: marker_size: 0.05 aruco_dictionary_id: DICT_6X6_250 image_topic: /camera/image_raw camera_info_topic: /camera/camera_info

Note where the config file gets sent after the build, this took me hours to figure out why yaml edits weren't working.

After all that, nothing happens. The camera appears frozen, no data in aruco_markers or poses. I would hope for some image data in aruco_markers.

Am I missing something simple like a position for the Pi to run both a camera and a fiducial recognition system?

I have tried running the node both on my laptop and the Rpi with the same result.

jkaniuka commented 7 months ago

Hi @anfederman ,

ubiqlap@ubiqlap-X540LA:~$ ros2 topic echo /aruco_markers The message type 'ros2_aruco_interfaces/msg/ArucoMarkers' is invalid

ros2_aruco_interfaces/msg/ArucoMarkers is a custom message type. If you've only sourced /opt/ros/humble/setup.bash it's not enough. You have to also source /install/setup.bash of workspace, where you've built ros2_aruco_interfaces package.

After all that, nothing happens. The camera appears frozen, no data in aruco_markers or poses. I would hope for some image data in aruco_markers.

First of all, I suggest you to check if topic names of your camera match those in YAML file. You can do it using ros2 node info <node_name> CLI command - Publishers in your camera_node should match Subscribers in Aruco detection node. To validate it quicker, you can use Node graph (Plugins :arrow_right: Introspection) in rqt. :wink: