yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Transbot SE📖
01.Introduction to Transbot SE
  • 01. Introduction to Transbot SE
  • 02. Precautions for use and battery safety
  • 03. First Trial
02.First Trial
  • 2.1.APP control
  • 2.2.USB wireless handle control(Optional)
  • 2.3.Handle video control Transbot(Optional)
  • 2.4.Network configuration tutorial in hotspot mode
03.Hardware control course
  • 3.1About expansion board and update firmware
  • 3.2.Close self-starting process
  • 3.3.Install Transbot library
  • 3.4.Control buzzer and button
  • 3.5.Control PWM servo
  • 3.6.Control bus servo
  • 3.7.Control motor
  • 3.8.Control robot movement
04.Linux operating system
  • 1. Virtual machine installation and use
  • 2. Linux basics
  • 3. Remote control
  • 4. Multi-machine communication configuration
  • 5. Static IP and hotspot mode
  • 6. Web page real-time monitoring
  • 7. Expansion tutorial
  • 8. Write system images
05.Docker couse(For Pi5)
  • 1.Docker overview and docker installation
  • 2.Common commands for docker image containers
  • 3.Docker images deeply understand and publish images
  • 4.Docker hardware interaction and data processing
  • 5.Start the transbot se container
06.ROS basic course
  • 1.ROS introduction
  • 2.Project file structure
  • 3.Common commands and tools
  • 4.Publisher
  • 5.Subscribers
  • 6.Customize topic messages and use
  • 7.Client
  • 8.Server
  • 9.Custom service messages and usage
  • 10.TF release and monitoring
07.OpenCV courses
  • 1. Getting started with Open Source CV
  • 2. Open Source CV geometric transformation
  • 3. Open Source CV image processing and drawing text line segments
  • 4. Open Source CV image beautification
  • 5. Opencv application
  • 6. AR vision
  • 7. AR QR code
  • 8. ROS+Opencv foundation
  • 9. ROS+Opencv application
  • 10. MediaPipe development
08.ROS robot course
  • 1.PID algorithm
  • 2.Basic communication
  • 3.Keyboard control
  • 4.Handle control(Optional)
  • 5.Robot state estimation
  • 6.Data calibration
09.ROS simple camera course
  • 1.HD camera calibration
  • 2.HD camera color tracking
  • 3.HD camera color tracking (robotic arm)
  • 4.HD camera object tracking
  • 5. KCF target tracking
  • 6.HD camera face tracking
  • 7.HD camera robotic arm carrying
  • 8.HD camera Autopilot
10.ROS robotic arm control tutorial
  • 1.MoveIt configuration
  • 2.MoveIt control the real machine
  • 3.MoveIt moves randomly
  • 4.MoveIt kinematics design
  • 5.MoveIt cartesian path
  • 6.MoveIt avoiding
  • 7.MoveIt scene design
  • 8.MoveIt trajectory planning
  • 9.Mediapipe palm control car
  • 10.Mediapipe gesture control robotic arm
  • 11.Mediapipe gesture control car
  • 12.Mediapipe arm attitude control robotic arm
11.ROS multi-robot control(Optional)
  • 1. Multi-robot control(Optional)
  • 2. Multi-robot queue performance(Optional)
  • 3. Multi-robot robot arm dancing(Optional)
12.Deep learning courses
  • 1.KNN recognizes handwritten digits
  • 2.Basic use of TensorFlow
  • 3.Basic use of PyTorch(jetson)
  • 4.yolov5 model training(jetson)
  • 5.yolov5+tensorrt acceleration(jetson)
  • 6.yolov4-tiny
13.Installation Video
  • Part18
  • Part1-6
  • Part7-12
  • Part13.1-13.3.3
  • Part13.4.1-17
14.FAQnew
  • 1.Using your own Jetson board,Transbot-SE cannot start normally
Download
  • APP(iOS/Android)
  • System_File-Pi5
  • System_File-Pi4
  • System_File-Jetson
  • VM_File
  • Appendix
  • Code
  • InstructionManual
  • Jetson_Boot_USB.tar.gz
  • Hardware_Info
Download ZIP

Welcome to Transbot SE repository

7. AR QR code

7. AR QR code

7. AR QR code

7. AR QR code7.1. Overview7.2. Create ARTag7.2.1. Install software package7.2.2. Create AR QR code7.3. ARTag identification7.3.1, ar_track_alvar node7.3.2. Launch file analysis7.3.3. Start identification instance

7.1. Overview

wiki: http://wiki.ros.org/ar_track_alvar/

Source code: https://github.com/ros-perception/ar_track_alvar.git

Function package location: ~/transbot_ws/src/transbot_visual

ARTag (AR tag, AR means "augmented reality") is a benchmark marking system, which can be understood as a reference for other objects. It looks similar to a QR code, but its encoding system and QR code are still very different. The difference is mostly used in camera calibration, robot positioning, augmented reality (AR) and other applications. One of the most important functions is to identify the pose relationship between the object and the camera. ARTag can be attached to the object, or ARTag label can be attached to the plane to calibrate the camera. After the camera recognizes the ARTag, it can calculate the position and attitude of the tag in the camera coordinates.

ar_track_alvar has 4 main functions:

  • Generate AR tags with different sizes, resolutions and data/ID encodings.
  • Recognize and track poses of individual AR tags, optionally integrating kinect depth data (when kinect is available) for better pose estimation.
  • Recognize and track poses in "bundles" consisting of multiple tags. This allows for more stable pose estimation, robustness to occlusions, and tracking of multilateral objects.
  • Automatically calculate spatial relationships between tags in bundles using camera images so users don't have to manually measure and enter tag locations in an XML file to use the bundle feature.

Alvar is newer and more advanced than ARToolkit, which has been the basis for several other ROS AR tag packages. Alvar features adaptive thresholding to handle various lighting conditions, optical flow-based tracking for more stable pose estimation, and an improved tag recognition method that does not slow down significantly as the number of tags increases.

7.2. Create ARTag

7.2.1. Install software package

The factory image of the car has already been installed, no need to reinstall it.

sudo apt install ros-melodic-ar-track-alvar

image-20210902154213121

ar_track_alvar is an open source marker library that provides pr2+kinect examples. The first use case of this package is to identify and track gestures from (possibly) multiple AR tags, each considered individually.

7.2.2. Create AR QR code

  • Continuously generate multiple tags on one image

    jetson/Raspberry Pi 4B

xxxxxxxxxx
rosrun ar_track_alvar createMarker

Raspberry Pi 5

Before running, please confirm that the large program has been permanently closed

Enter docker

Note: If there is a terminal that automatically starts docker, or there is a docker terminal that has been opened, you can directly enter the docker terminal to run the command, and there is no need to manually start docker

Start docker manually

xxxxxxxxxx
./run_docker.sh

xxxxxxxxxx
rosrun ar_track_alvar createMarker

 

image-20210902164850255

You can enter [ID] and location information here, and enter [-1] to end. One or more can be generated, and the layout can be designed by yourself.

image-20210902165006781

  • Generate a single number

Command + parameters directly generate digital images; for example

jetson/Raspberry Pi 4B

xxxxxxxxxx
rosrun ar_track_alvar createMarker 11
rosrun ar_track_alvar createMarker -s 5 33

Raspberry Pi 5

Before running, please confirm that the large program has been permanently closed

Enter docker

Note: If there is a terminal that automatically starts docker, or there is a docker terminal that has been opened, you can directly enter the docker terminal to run the command, and there is no need to manually start docker

Start docker manually

xxxxxxxxxx
./run_docker.sh

xxxxxxxxxx
rosrun ar_track_alvar createMarker 11
rosrun ar_track_alvar createMarker -s 5 33

11: The number is the QR code of 11. -s: Specify image size. 5: 5x5 picture. 33: The number is the QR code of 33.

7.3. ARTag identification

Note: When starting the camera, you need to load the camera calibration file, otherwise it will not be recognized.

7.3.1, ar_track_alvar node

  • Subscribed topic
Topic nameData type
/camera_info(sensor_msgs/CameraInfo)
/image_raw(sensor_msgs/Image)
  • Published Topics
Topic nameData type
/visualization_marker(visualization_msgs/Marker)
/ar_pose_marker(ar_track_alvar/AlvarMarkers)
  • Provided tf Transforms

Single QR code: camera coordinate system → AR tag coordinate system

Multiple QR codes: Provides transformation from the camera coordinate system to each AR tag coordinate system (named ar_marker_x), where x is the ID number of the marker.

7.3.2. Launch file analysis

xxxxxxxxxx
<launch>
     <arg name="camDevice" default="USBCam" doc="camDevice type [USBCam]"/>
     <arg name="open_rviz" default="true"/>
     <arg name="marker_size" default="5.0"/>
     <arg name="max_new_marker_error" default="0.08"/>
     <arg name="max_track_error" default="0.2"/>
     <arg name="cam_image_topic" default="/usb_cam/image_raw" if="$(eval arg('camDevice') == 'USBCam')"/>
     <arg name="cam_info_topic" default="/usb_cam/camera_info" if="$(eval arg('camDevice') == 'USBCam')"/>
     <arg name="output_frame" default="/usb_cam" if="$(eval arg('camDevice') == 'USBCam')"/>
     <include if="$(eval arg('camDevice') == 'USBCam')" file="$(find usb_cam)/launch/usb_cam-test.launch"/>
     <node if="$(eval arg('camDevice') == 'USBCam')" pkg="tf" type="static_transform_publisher" name="world_to_cam"
           args="0 0 0.5 0 1.57 0 world usb_cam 10"/>
     <node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkersNoKinect" respawn="false" output="screen">
         <param name="marker_size" type="double" value="$(arg marker_size)"/>
         <param name="max_new_marker_error" type="double" value="$(arg max_new_marker_error)"/>
         <param name="max_track_error" type="double" value="$(arg max_track_error)"/>
         <param name="output_frame" type="string" value="$(arg output_frame)"/>
         <remap from="camera_image" to="$(arg cam_image_topic)"/>
         <remap from="camera_info" to="$(arg cam_info_topic)"/>
     </node>
     <group if="$(arg open_rviz)">
         <node pkg="rviz" type="rviz" name="rviz" args="-d $(find transbot_visual)/rviz/ar_track.rviz"/>
     </group>
</launch>

Node parameters:

  • marker_size (double): Width (in centimeters) of one side of the black square marker border.
  • max_new_marker_error (double): Threshold for determining when a new marker can be detected under uncertain conditions.
  • max_track_error (double): A threshold that determines how many tracking errors can be observed before the marker disappears.
  • camera_image (string): Provides the image topic name used to detect AR tags. This can be monochrome or color, but should be an uncorrected image since correction is done in this package.
  • camera_info (string): Subject name that provides camera calibration parameters for correcting images.
  • output_frame (string): Publish the coordinate position of the AR tag in the camera coordinate system.

7.3.3. Start identification instance

  • jetson/Raspberry Pi 4B

    xxxxxxxxxx
      roslaunch transbot_visual ar_track.launch camDevice:=USBCam

    Raspberry Pi 5

    Before running, please confirm that the large program has been permanently closed

    Enter docker

    Note: If there is a terminal that automatically starts docker, or there is a docker terminal that has been opened, you can directly enter the docker terminal to run the command, and there is no need to manually start docker

    Start docker manually

    xxxxxxxxxx
    ./run_docker.sh

    xxxxxxxxxx
      roslaunch transbot_visual ar_track.launch camDevice:=USBCam
    • camDevice: USBCam

    image-20210902194448055

    In rviz, you need to set the corresponding camera topic name.

    • Image_Topic: The high frame rate camera is [/usb_cam/image_raw].
    • Marker: The display component of rviz. Different squares display the location of the AR QR code.
    • TF: The display component of rviz, used to display the coordinate system of AR QR codes.
    • Camera: The display component of rviz, which displays the camera screen.
    • world: world coordinate system.
    • usb_cam/camera_link: camera coordinate system.

    7.3.4. View node graph

    jetson/Raspberry Pi 4B/Raspberry Pi 4B

    xxxxxxxxxx
    rqt_graph

    Raspberry Pi 5

    Enter the same docker from multiple terminals

    Keep the program of the previous docker terminal running and open a new terminal

    Enter the following command

    xxxxxxxxxx
    docker ps

    Enter the same docker and use the following 18870bc3dc00 to modify the ID displayed on the actual terminal.

    xxxxxxxxxx
    docker exec -it 18870bc3dc00 /bin/bash

    xxxxxxxxxx
    rqt_graph

    image-20210902204026973

     

    7.3.5. View tf tree

    jetson/Raspberry Pi 4B/Raspberry Pi 4B

    xxxxxxxxxx
    rosrun rqt_tf_tree rqt_tf_tree

    Raspberry Pi 5

    Enter the same docker from multiple terminals

    Keep the program of the previous docker terminal running and open a new terminal

    Enter the following command

    xxxxxxxxxx
    docker ps

    Enter the same docker and use the following 18870bc3dc00 to modify the ID displayed on the actual terminal.

    xxxxxxxxxx
    docker exec -it 18870bc3dc00 /bin/bash
    AR vision
    ROS+Opencv foundation

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文