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

5.Robot state estimation

5. Robot state estimation

5. Robot state estimation5.1. Basic use5.2. Main nodes5.2.1、transbot_node5.2.2、apply_calib1)Topic2)Parameter5.2.3、imu_filter_madgwick1)Intrudction2)Topic3)Parameter5.2.4、robot_localization1)Introduction2)Parameter3)Transformation of release5.3、Precautions

imu_calib: https://github.com/dpkoch/imu_calib

imu_filter_madgwick: https://wiki.ros.org/imu_filter_madgwick

robot_localization: http://docs.ros.org/en/melodic/api/robot_localization/html/index.html

5.1. Basic use

  • start up

jetson motherboard/Raspberry Pi 4B

roslaunch transbot_bringup bringup.launch robot_model:=camera # Ordinary camera version

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_bringup bringup.launch robot_model:=camera # Ordinary camera version

When starting with bringup.launch, be sure to change the parameter [robot_model] to the corresponding camera model. For example, the default is a high frame rate camera, [default="camera"]. You do not need to add parameters when you start it next time.

xxxxxxxxxx
<arg name="robot_model" default="camera" doc="robot_model type [astra,camera]"/>
  • launch file parsing. See function package: ~/transbot_ws/src/transbot_bringup

-rviz

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
roslaunch transbot_bringup view_odom.launch

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
roslaunch transbot_bringup view_odom.launch

  • View node graph

jetson/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

tf tree

jetson motherboard/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

xxxxxxxxxx
rosrun rqt_tf_tree rqt_tf_tree

 

5.2. Main nodes

5.2.1、transbot_node

TopicTypeParsing
/transbot/imusensor_msgs/ImuThe most primitive imu data of the car
/transbot/get_velgeometry_msgs/TwistThe most original odometer information of the car

5.2.2、apply_calib

The IMU in Yahboom's image system has been calibrated. If you are using a Yahboom image file, no calibration is required.

This course is for reference.

1)Topic
/Topic nameTypeParsing
Subscribed/raw_imusensor_msgs/ImuOriginal, uncalibrated IMU measurement
Published/imu/data_rawsensor_msgs/ImuCorrected, calibrated IMU measurement value
2)Parameter
Parameter nameTypeDefaults valueParsing
~calib_filestring"imu_calib.yaml"Read calibration parameter file
~calibrate_gyrosbooltrueWhether to calculate the deviation of the gyro and subtract the deviation when starting
~gyro_calib_samplesint100Number of measurements used to calculate gyro deviation

5.2.3、imu_filter_madgwick

1)Intrudction

IMU refers to a six-axis sensor, including gyroscope and accelerometer.

MARG refers to a nine-axis sensor, and a magnetometer is added to the IMU.

xxxxxxxxxx
IMU = gyroscope + accelerometer
MARG(Magnetic, Angular Rate, and Gravity) = gyroscope + accelerometer + magnetometer
2)Topic
/Topic nameTypeParsing
Subscribed/imu/data_rawsensor_msgs/ImuMessage of the calibrated IMU data, including angular velocity and linear acceleration
Subscribed/imu/magsensor_msgs/MagneticField[Optional] Magnetometer, will be affected by magnetic field
Published/imu/datasensor_msgs/ImuFusion of Imu information.
3)Parameter
Parameter nameTypeDefaultsParsing
~gaindouble0.1The gain of the filter.
The higher the value, the faster the convergence speed, but the greater the noise.
The lower the value, the slower the convergence speed, but the smoother the signal. Range: 0.0 to 1.0
~zetadouble0.0Gyro drift gain (about rad/s). Range: -1.0 to 1.0
~mag_bias_xdouble0.0Magnetometer bias (hard iron correction), x component. Range: -10.0 to 10.0
~mag_bias_ydouble0.0Magnetometer bias (hard iron correction), y component. Range: -10.0 to 10.0
~mag_bias_zdouble0.0Magnetometer bias (hard iron correction), z component. Range: -10.0 to 10.0
~orientation_stddevdouble0.0The standard deviation of the direction estimate. Range: 0.0 to 1.0
~world_framestring"nwu"The world frame that indicates the direction.
The old default value is "nwu" (northwest up).
New deployments should use "enu". Valid values: "nwu", "enu", "ned".
~use_magbooltrueWhether to use magnetic field data in data fusion.
~use_magnetic_field_msgboolfalseIf set to true,
subscribe to /imu and /mag topics as sensor_msgs/MagneticField;
if set to false (it not recommended),
use geometry_msgs/Vector3Stamped
~fixed_framestringodomThe parent coordinate system to be used in publishing
~publish_tfboolfalseWhether to publish the TF transformation indicating the direction of the IMU, as the pose of the IMU;
Use the fixed coordinate system as the parent coordinate system, and
input the imu information as the child coordinate system
~reverse_tfboolfalseIf set to true, the transformation from the imu coordinate system to the fixed coordinate system will be issued.
~constant_dtdouble0.0The dt to be used; if it is 0.0 (default value), the dynamic value of dt is calculated from the start of the message.
~publish_debug_topicsboolfalseIf set to true, two debugging topics are posted.
~statelessboolfalseIf set to true, the filtered direction will not be published.
Instead, stateless estimates of bearing are issued based only on the latest accelerometer (and optionally magnetometer) readings. Used for debugging.
~remove_gravity_vectorboolfalseIf set to true, the gravity vector is subtracted from the acceleration field in the published IMU message.

5.2.4、robot_localization

1)Introduction

robot_localization is a collection of state estimation nodes. Each node is an implementation of a nonlinear state estimator for robots moving in 3D space. It includes two state estimation nodes ekf_localization_node and ukf_localization_node. In addition, robot_localization provides navsat_transform_node, which helps to integrate GPS data.

ekf_localization_node is an implementation of Extended Kalman Filter. It uses an omni-directional motion model to predict the state in time, and uses the sensor data to correct the estimated value of the prediction.

ukf_localization_node is an implementation of Unscented Kalman Filter. It uses a set of carefully selected sigma points to project the state through the same motion model used in EKF, and then uses these projected sigma points to recover the state estimation and covariance. This eliminates the use of the Jacobian matrix and makes the filter more stable. However, compared with ekf_localization_node, it is also more computationally cumbersome.

topic

/TopicTypeParsing
Subscribed/imu/datasensor_msgs/ImuFiltered imu information
Subscribed/odom_rawnav_msgs/OdometryOdometer information
Published/odomnav_msgs/OdometryConverged odometer information
Published/tftf2_msgs/TFMessageCoordinate system information
2)Parameter
  • frequency: the true frequency (in Hz) at which the filter generates the estimated state value. Note: The filter will only start calculation after it receives at least one message from one of the inputs.

  • [sensor]: For each sensor, the user needs to define this parameter according to the message type. The index of each parameter name starts from 0 (for example odom0, odom1, etc.) and must be defined in order (for example, if pose1 has not been defined, do not use pose0 and pose2). The value of each parameter is the topic name of the sensor.

  • xxxxxxxxxx
    odom0: /odom_raw
    imu0: /imu/data
  • [sensor]_differential: For each of the above-defined sensor messages containing pose information, the user can specify whether the pose variables should be integrated differentially. If the given value is set to true, then for the measurement from the relevant sensor at time t, we will first subtract the measured value at time t-1, and then convert the resulting value to speed.

    xxxxxxxxxx
    ~odomN_differential
    ~imuN_differential
    ~poseN_differential
  • [sensor]_relative: If this parameter is set to true, any measurement value from the sensor will be fused relative to the first measurement value received from the sensor. This is useful in the following situations, for example, if you want the state estimate to always start at (0,0,0), and the roll, pitch, and yaw angle values are (0,0,0).

    xxxxxxxxxx
    ~odomN_relative
    ~imuN_relative
    ~poseN_relative
  • two_d_mode: If your robot is running in a flat environment and can ignore subtle changes in the ground (as reported by the IMU), set it to true. It merges all 3D variables (Z, roll, pitch and their respective speed and acceleration) into a value of 0. This ensures that the covariance of these values does not explode, and at the same time ensures that the state estimate of your robot is still fixed on the X-Y plane.

  • odom0_config:[ false, false, false, false, false, false, true, true, false, false, false, true, false, false, false ]

    odom0_config: [false, false, false, false, false, false, true, true, false, false, false, true, false, false, false]

    The order of Boolean values is: [[X], [Y], [Z], [roll], [pitch], [yaw], [X'], [Y '], [Z' ], [roll'] ,【Pitch'】,【yaw'】,【X''】,【Y''】,【Z''】,【roll''】,【pitch''】,【yaw''】]. The user must specify which variables of these messages should be incorporated into the final state estimate.

3)Transformation of release

If the user's world_frame parameter is set to the value of odom_frame, the conversion will be published from the coordinate system given by the odom_frame parameter to the coordinate system given by the base_link_frame parameter. If the user's world_frame parameter is set to the value of map_frame, the conversion will be published from the coordinate system given by the map_frame parameter to the coordinate system given by the odom_frame parameter.

For example, we set to publish the conversion from the coordinate system given by the [odom_frame] parameter to the coordinate system given by the [base_link_frame] parameter.

xxxxxxxxxx
odom_frame: odom
base_link_frame: base_footprint
world_frame: odom

image-20210916180820494

5.3、Precautions

While starting the robot, the robot is stationary. If the buzzer keeps ringing, there are two possibilities:

  • The posture of the robot is (bias = [0.0, 0.0, 0.0]);
  • The system detects that the robot is in free fall.

Solution:

  • Close the terminal and restart the command;
  • Close the terminal, press the PCB board reset button [RESET] and then restart the command.
Handle control(Optional)
Data calibration

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/中文