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

4.MoveIt kinematics design

4. MoveIt kinematics design

4. MoveIt kinematics design4.1. Pose description of 3D space4.2. Start4.3. Reverse solution key code4.3.1.python code4.3.2.C++code4.4. Positive solution key code4.4.1.python code4.4.2.C++code4.5. MoveIT kinematics plugin

This lesson takes the MoveIT simulation as an example. If you need to set the synchronization between the real machine and the simulation, please refer to the lesson [02, MoveIt Precautions and Controlling the Real Machine]. ! ! ! be careful! ! !

The effect demonstration is a virtual machine, and other masters are running (related to the performance of the master, depending on the actual situation).

4.1. Pose description of 3D space

First, a coordinate system is specified, relative to the coordinate system, the position of the point can be represented by a 3-dimensional column vector; the orientation of the rigid body can be represented by a 3×3 rotation matrix. The 4×4 homogeneous transformation matrix can unify the description of the rigid body position and attitude (pose), which has the following advantages:

(1) It can describe the pose of the rigid body and the relative pose (description) of the coordinate system.

(2) It can represent the transformation (mapping) of a point from the description of one coordinate system to the description of another coordinate system.

(3) It can represent the transformation (operator) of the pose description before and after the rigid body motion.

  • Location description - Location vector0408

A coordinate system {A} is represented by three mutually orthogonal unit vectors with arrows. Then the representation of the spatial position of point p in the coordinate system {A} is:

0404

  • Description of the orientation - rotation matrix

0403

The commonly used rotation transformation matrix is to rotate an angle around the X axis, around the Y axis or around the Z axis. they are respectively:

0409

  • Inhomogeneous representation

After the vector a has undergone a rotation R and a translation t,get $a' : a'=R*a+t$

  • Homogeneous representation

0409

The universal rotation matrix R is:

0407

The rotation matrix rotation process here is to rotate the angle θ around the X axis first, then rotate the angle α around the Y axis, and finally rotate the angle β around the Z axis.

  • Right-hand rule

0405

The thumb points to X, the index finger to Y, and the middle finger to Z.

  • RPY and Euler Angles

0401

According to the rotation order of its own coordinate system, it is Z-->Y-->X, which is called eulerYPR (Yaw Pitch Roll);

According to the rotation order of the external coordinate system (reference coordinate system) is x-->y-->z,which is called RPY (Roll Pitch Yaw);

When describing the same pose, the above two representations are equivalent, that is, the angle value of the Yaw Pitch Roll is the same.

Definition: Yaw yaw angle ϒ ; Pitch angle β ; Roll angle α

  • Quaternion method

The approximate definition is that a vector is represented by a scalar and three imaginary axes, called a quaternion. [x, y, z, w] The range of each data is [-1,1].

4.2. Start

Positive solution: In a robotic arm,knowing each joint angle, solve for the end pose.

Inverse solution: In a robotic arm,knowing the pose of the end (except the gripper), find the angle of each joint.

Start the MoveIT

roslaunch transbot_se_moveit_config demo.launch  

Start the inverse solution node (choose one of two)

xxxxxxxxxx
rosrun transbot_se_moveit_config 02_set_pose_plan      # C++
rosrun transbot_se_moveit_config 02_set_pose_plan.py   # python

Start the positive solution node (choose one of two)

xxxxxxxxxx
rosrun transbot_se_moveit_config 03_set_joint_plan     # C++
rosrun transbot_se_moveit_config 03_set_joint_plan.py  # python

4.3. Reverse solution key code

Note: Due to the limited range of the robotic arm, it may not be able to reach the specified target pose. This is a normal situation, and multiple executions of the cycle can only slightly increase the planning success rate. Not only the position, but also the posture of the end must be considered. We can view the poses of each link through rviz, as shown below,

0410

The [Position] and [Orientation] in [arm1_link] in the above figure are the end poses. When using the inverse solution, you can also directly set the position and attitude quaternion of the target point.

4.3.1.python code

Set target pose

xxxxxxxxxx
    # Create the pose instance
    pos = PoseStamped()
    # Set location
    pos.pose.position.x = 0.00054
    pos.pose.position.y = 0.13143
    pos.pose.position.z = 0.04868
    # Set pose
   pos.pose.orientation.x = 0.44672
    pos.pose.orientation.y = -0.44672
    pos.pose.orientation.z = 0.54812
    pos.pose.orientation.w = 0.54812

Set target point

xxxxxxxxxx
    # Set target point
   transbot.set_pose_target(pos)

Loop execution path planning

xxxxxxxxxx
    # Execute multiple times to improve the success rate
    for i in range(5):
        # Exercise planning
        plan = transbot.plan()
        if len(plan.joint_trajectory.points) != 0:
            print ("plan success")
            #  Run after planning is successful
            transbot.execute(plan)
            break
        else: print ("plan error")

4.3.2.C++code

Set target pose

xxxxxxxxxx
    //Set specific location
    geometry_msgs::Pose pose;
    pose.position.x = 0.000549;
    pose.position.y = 0.161208;
    pose.position.z = 0.038591;
    //Set target pose
    pose.orientation.x =0.449019;
    pose.orientation.y =-0.449019;
    pose.orientation.z =0.5462434;
    pose.orientation.w =0.5462434;
    transbot.setPoseTarget(pose);

Loop execution path planning

xxxxxxxxxx
    int index = 0;
    // Execute multiple times to improve the success rate
    while (index <= 10) {
        moveit::planning_interface::MoveGroupInterface::Plan plan;
        // Exercise planning
        const moveit::planning_interface::MoveItErrorCode &code = transbot.plan(plan);
        if (code == code.SUCCESS) {
            ROS_INFO_STREAM("plan success");
            yahboomcar.execute(plan);
            break;
        } else {
            ROS_INFO_STREAM("plan error");
        }
        index++;
    }

4.4. Positive solution key code

4.4.1.python code

Set target point

xxxxxxxxxx
joints = [0.49, 0.93]
transbot.set_joint_value_target(joints)

Loop execution path planning

xxxxxxxxxx
    #Execute multiple times to improve the success rate
    for i in range(5):
        #Exercise planning
        plan = transbot.plan()
        if len(plan.joint_trajectory.points) != 0:
            print ("plan success")
            #Run after planning is successful
            transbot.execute(plan)
            break
        else:
            print ("plan error")

4.4.2.C++code

Set target point

xxxxxxxxxx
    //Set specific location
    vector<double> pose{0.79, 3.14};
    transbot.setJointValueTarget(pose);

Loop execution path planning

xxxxxxxxxx
      moveit::planning_interface::MoveGroupInterface::Plan plan;
    const moveit::planning_interface::MoveItErrorCode &code = transbot.plan(plan);
    if (code == code.SUCCESS) {
        ROS_INFO_STREAM("plan success");
        //Show track
        string frame = transbot.getPlanningFrame();
        moveit_visual_tools::MoveItVisualTools tool(frame);
        tool.deleteAllMarkers();
        tool.publishTrajectoryLine(plan.trajectory_, transbot.getCurrentState()->getJointModelGroup("arm_group"));
        tool.trigger();
        transbot.execute(plan);
    } else {
        ROS_INFO_STREAM("plan error");
    }

4.5. MoveIT kinematics plugin

The MoveIT kinematics plugin is the file [kinematics.yaml]

If you need to replace or modify, you can directly modify the file[kinematics.yaml]

xxxxxxxxxx
roscd transbot_se_moveit_config/config/
sudo vim kinematics.yaml
  • kdl
xxxxxxxxxx
arm_group:
  kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
  kinematics_solver_search_resolution: 0.005
  kinematics_solver_timeout: 0.005
  • trac_ik
xxxxxxxxxx
arm_group:
  kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
  kinematics_solver_search_resolution: 0.005
  kinematics_solver_timeout: 0.005

 

MoveIt moves randomly
MoveIt cartesian path

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