Download

Align the robot with a cart using April Tags

Description

This node is used to align the robot to a TF. The initial TF is usually generated using the apriltag_ros node (with a QR code tag placed on a cart) and a projected TF is generated using the tf_gen node, which is used as a middle man for the alignment process. The operation is done in four steps, using odometry, as follows –

  1. Start at point P1, rotate the robot so that the chosen camera (parameter: camera) points to a point in front of the tag. This point is P2 and it is generated by tf_gen node.
  2. Move the robot in a straight line from point P1 to point P2.
  3. At point P2, rotate the robot so that chosen camera points to the QR code tag.
  4. Move the robot in a straight line towards the tag for a fixed distance (parameter: move_distance_to_tag).

Examples

The following Demos/Flows make use of this node:

Input List

There are 7 parameters.

Port NameMessage typeCallback
gripper_feedbackBool [std_msgs-ROS1/Subscriber]align_to_cart_gripper_feedback.cb
initInit [movai_msgs-MovAI/Init]align_to_cart_init.cb
main_timerTimer [movai_msgs-ROS1/Timer]align_to_cart_main_timer.cb
odom_feedbackOdometry [nav_msgs-ROS1/Subscriber]align_to_cart_odom_feedback.cb
startTransition [movai_msgs-MovAI/TransitionTo]place_holder.cb
tf_subTF [movai_msgs-ROS1/TFSubscriber]align_to_cart_tf_sub.cb
timeout_timerTimer [movai_msgs-ROS1/Timer]align_to_cart_timeout_timer.cb

Output List

There are 4 parameters.

Port NameMessage type
cmd_vel_pubTwist [geometry_msgs-ROS1/Publisher]
enable_tf_generatorBool [std_msgs-ROS1/Publisher]
successTransition [movai_msgs-MovAI/TransitionFor]
timeoutTransition [movai_msgs-MovAI/TransitionFor]

Parameter List

There are 12 parameters.

ParameterDescription
cameraCamera to be used for tag detection (front or back).
final_speedVelocity (ms) for the last linear movement towards the tag.
generated_tag_frameTF frame name of the generated middle man TF. This is usually generated using the tf_gen node.
max_vel_angMaximum angular velocity [radians]. squar brackets? GGG
max_vel_linMaximum linear velocity (x axis) [ms]
min_lin1Minimum distance to move in Step 2 [m/s]
min_rotMinimum rotation angle for Step 1 [rad]
min_rot2Minimum rotation angle for Step 3 [rad]
move_distance_to_cartMaximum distance for linear movement in step 4 (m)
move_vel1Linear velocity to move from P1 to P2 in step 1 [m/s]
rot_w1Angular velocity for rotation in step 1 [rad/s]
rot_w2Angular velocity for rotation in Step 3 [rad/s]

More Info