Download

align_to_cart

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 Name

Message type

Callback

gripper_feedback

Bool [std_msgs-ROS1/Subscriber][std_msgs-ROS1/Subscriber]

align_to_cart_gripper_feedback.cb

init

Init [movai_msgs-MovAI/Init][movai_msgs-MovAI/Init]

align_to_cart_init.cb

main_timer

Timer [movai_msgs-ROS1/Timer][movai_msgs-ROS1/Timer]

align_to_cart_main_timer.cb

odom_feedback

Odometry [nav_msgs-ROS1/Subscriber][nav_msgs-ROS1/Subscriber]

align_to_cart_odom_feedback.cb

start

Transition [movai_msgs-MovAI/TransitionTo][movai_msgs-MovAI/TransitionTo]

place_holder.cb

tf_sub

TF [movai_msgs-ROS1/TFSubscriber][movai_msgs-ROS1/TFSubscriber]

align_to_cart_tf_sub.cb

timeout_timer

Timer [movai_msgs-ROS1/Timer][movai_msgs-ROS1/Timer]

align_to_cart_timeout_timer.cb

Output List

There are 4 parameters.

Port Name

Message type

cmd_vel_pub

Twist [geometry_msgs-ROS1/Publisher][geometry_msgs-ROS1/Publisher]

enable_tf_generator

Bool [std_msgs-ROS1/Publisher][std_msgs-ROS1/Publisher]

success

Transition [movai_msgs-MovAI/TransitionFor][movai_msgs-MovAI/TransitionFor]

timeout

Transition [movai_msgs-MovAI/TransitionFor][movai_msgs-MovAI/TransitionFor]

Parameter List

There are 12 parameters.

Parameter

Description

camera

Camera to be used for tag detection (front or back).

final_speed

Velocity (ms) for the last linear movement towards the tag.

generated_tag_frame

TF frame name of the generated middle man TF. This is usually generated using the tf_gen node.

max_vel_ang

Maximum angular velocity [radians]. squar brackets? GGG

max_vel_lin

Maximum linear velocity (x axis) [ms]

min_lin1

Minimum distance to move in Step 2 [m/s]

min_rot

Minimum rotation angle for Step 1 [rad]

min_rot2

Minimum rotation angle for Step 3 [rad]

move_distance_to_cart

Maximum distance for linear movement in step 4 (m)

move_vel1

Linear velocity to move from P1 to P2 in step 1 [m/s]

rot_w1

Angular velocity for rotation in step 1 [rad/s]

rot_w2

Angular velocity for rotation in Step 3 [rad/s]

More Info