I’ve been following this part of the tutorial for the align_to_aruco package, but I’m encountering issues when trying to align the Stretch 3 robot with the ArUco cube. After pointing the camera at the cube and running the command:
ros2 launch stretch_core align_to_aruco.launch.py
the robot does not navigate or align with the cube. In the logs, I don’t see any specific errors but receive several warnings like:
too few points from the depth image for plane fitting, so only using the RGB Aruco estimate. number of points = 0.
and
could not transform base_right to base_link: "base_right" passed to lookup_transform argument source_frame does not exist
When I run ros2 topic echo /aruco/marker_array, I get output like this:
Hi!
I’m still having issues with aligning to the ArUco example. However, I have new findings since trying the ArUco ‘base_right’ tag. It seems like it’s being detected, but the base fails to move. I wonder if there is an issue with the trajectory mode. I’ve included new output when running ros2 launch stretch_core align_to_aruco.launch.py. It seems like the align_to_aruco node is detecting the tag and the transform position, and the stretch_driver is attempting to run the joint action.
Hi @allen, I’m not familiar with the Align to ArUco tutorial, but I can speak to some of the warnings/errors you’ve screenshotted.
Stereo is NOT SUPPORTED - Can ignore this.
[rviz2]: The link is static or has unrealistic inertia, so the equivalent inertia box will not be shown. - Can ignore this as well. This is not actually an error. Since the message doesn’t explain what links are problematic, it’s difficult to tell which URDF links are causing Rviz to print the warning. To solve this, you’d need to guess-and-check modify the inertia of each link in your URDF.
[WARNING] [base]: Base waypoint trajectory already active - The driver will output this warning if you attempt to preempt the current trajectory incorrectly (i.e. the robot is part way through executing the trajectory, and the replacement trajectory tries to modify a waypoint in the past). The code in align to aruco is likely doing something unexpected to be causing this.
joint_traj action: hardware failed to start trajectory - Likely related to the previous error. If you solve the previous error, this should disappear.
Could not transform base_right to base_link: Lookup would require extrapolation into the past. - This is a pretty standard TF2 error, and means that the code is attempting to lookup a transform that doesn’t exist or didn’t exist at that point. You’d need to use TF2 tools to understand why this error is occurring.
I’d recommend executing the code line-by-line in iPython and taking each error as it appears, so you can debug what’s going on.
Hi @ris7188 , I think at that time there’s a issue for the driver to execute the MultiDOFJointTrajectoryPoint defined in the file. So I ended up executing the action using the send_goal which is used in here. Or you can try using hello_node to move the robot based on the calculation of the aruco tag transform. I could also maybe create a pull request of my code. I hope that helps!
Hi @ris7188 , while reviewing your code which uses FollowJointTrajectory action client, the joint names seems to have been given wrong. For base rotation the joint name is rotate_mobile_base and for base translation the joint name is translate_mobile_base.
You have given the joint name as position for all the three phases of motion which is an invalid joint name and would give out the following error.
[stretch_driver-3] [INFO] [1742001087.719453884] [stretch_driver]: stretch_driver joint_traj action: New trajectory received with joint_names = ['position']
[stretch_driver-3] -------------------------------------------
[stretch_driver-3] Errored goal
[stretch_driver-3] [INFO] [1742001087.720733459] [stretch_driver]: stretch_driver joint_traj action: Received a command without any valid joint names. Received joint names = ['position']
[stretch_driver-3] [INFO] [1742001087.726502010] [stretch_driver]: Received goal request
[stretch_driver-3] [INFO] [1742001087.731458325] [stretch_driver]: stretch_driver joint_traj action: New trajectory received with joint_names = ['position']
[stretch_driver-3] -------------------------------------------
[stretch_driver-3] Errored goal
[stretch_driver-3] [INFO] [1742001087.732012072] [stretch_driver]: Received goal request
[stretch_driver-3] [INFO] [1742001087.733374391] [stretch_driver]: stretch_driver joint_traj action: Received a command without any valid joint names. Received joint names = ['position']
Please let me know if fixing this bug makes your code work.