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.Handle control(Optional)

4.Handle control(Optional)

4.Handle control(Optional)1. Operating environment2. Install the driver3. Usage steps4. Control the little turtle with the handle4.1. Start the little turtle4.2. Node View4.3. View the node information4.4. Control the little turtle with the handle5. Handle control Transbot SE5.1. Handle control node5.2. Related nodes5.3. Operation process5.4. Source code analysis5.5. Handle effect5.6. Precautions when using the handleAppendixjetson nanoRaspberry Pi

1. Operating environment

Operating system: Ubuntu 18.04 LTS

ROS version: melodic

Equipment: jetson nano, Raspberry Pi, PC, wireless controller (USB receiver)

Controller control function package path: ~/transbot_ws/src/transbot_ctrl

2. Install the driver

ROS driver for universal Linux controllers. The Joy package contains Joy_node, a node that connects a generic Linux controller to ROS. This node publishes a "/Joy" message containing the current state of each button and axis of the controller. Note: The factory image of the car has already been installed, no need to reinstall it

sudo apt install ros-melodic-joy ros-melodic-joystick-drivers

3. Usage steps

  • Device connection

First, connect the USB end of the wireless controller to the device (jetson nano, Raspberry Pi, PC). This lesson takes connecting the USB end of the wireless controller to the jetson nano as an example. Connect the mouse, keyboard, and monitor; or you can also connect remotely through VNC.

  • View devices

Open the terminal and enter the following command. [js0] is displayed. This is the wireless controller. In special cases, you can also view the changes in the device list through the two states of connecting and not connecting to the USB side of the wireless handle. If there is a change, the changed device will be the one; otherwise, the connection will be unsuccessful or cannot be recognized.

xxxxxxxxxx
ls /dev/input

001

  • Test handle

Open the terminal and enter the following command. As shown in the picture, the wireless handle has 8 axial inputs and 15 key inputs. You can press the keys individually to test the numbers corresponding to the keys.

xxxxxxxxxx
sudo jstest /dev/input/js0

002

If jstest is not installed, run the following command:

xxxxxxxxxx
sudo apt-get install joystick
  • Run the handle node

Open three terminals and enter the following commands in order to view detailed information, which is the same as [Test Controller]. Depending on the device (Raspberry Pi, Jetson Nano, PC) and the system, the controller status will be different.

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
roscore first step
rosrun joy joy_node second step
rostopic echo joy step three

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
roscore

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 joy joy_node

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
rostopic echo joy

003

 

4. Control the little turtle with the handle

4.1. Start the little turtle

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
roscore
rosrun turtlesim turtlesim_node

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
roscore

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 turtlesim turtlesim_node

If you want to drive the little turtle, you only need to give the little turtle a certain speed. Next, check out the ROS speed control node.

004

4.2. Node View

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
rostopic list

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
rostopic list

4.3. View the node information

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
rostopic info /turtle1/cmd_vel

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
rostopic info /turtle1/cmd_vel

If you want to control the movement of the little turtle, you only need to post a message to the topic [/turtle1/cmd_vel] with the type [geometry_msgs/Twist].

4.4. Control the little turtle with the handle

Receive the current status information of the handle, and send instructions to the little turtle by pressing the buttons or shaking the joystick to receive different information fed back by the wireless handle.

Start command

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
roslaunch transbot_ctrl twist_joy.launch

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_ctrl twist_joy.launch

 

006

At this time, you can use the handle to control the operation of the little turtle.

  • Corresponding relationship between the handle and the operation of the little turtle
handlelittle turtle
On the left joystickForward
Left joystick downBackward
Right joystick leftTurn left
Right joystick rightTurn right
  • View node graph

【/joy_node】:Node of controller information

【/turtlesim_joy】:Nodes controlled by the handle

【/turtlesim_node】:The node of the little turtle

The node [/joy_node] publishes the topic [/joy] so that the node [/turtlesim_joy] subscribes. After processing, it publishes the topic [/turtle1/cmd_vel] so that the node [/turtlesim_node] subscribes to drive the movement of the little turtle.

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

007

5. Handle control Transbot SE

Controlling Transbot SE with a handle is similar to controlling a little turtle with a handle; let the handle control node establish contact with the underlying drive node of Transbot SE, change the current state of the handle, send different information to Transbot SE, and drive Transbot SE to make different reactions. What we need to control are the buzzer, pan/tilt, robotic arm, and car movement (linear speed, angular speed).

The topic requires continuous communication, but the service does not need continuous communication. The following settings are made according to the characteristics and business needs of the topic and service:

5.1. Handle control node

  • Corresponds to Transbot SE underlying driver

    • Topics

      Publish car movement news【/cmd_vel】

      Publish robotic arm control message【/TargetAngle】

      Publish gimbal servo control message【/PWMServo】

    • Service (client)

      Publish buzzer control message【/Buzzer】

      Publish the message to get the current angle of the robot arm【/CurrentAngle】

  • Other topics

    • Corresponding to Joy_node

      Subscribe to wireless controller news【/joy】

    • corresponding to move_base

      Publish motion planning cancellation message【/move_base/cancel】

    • Pause/start all functional gameplay

      Publish current Joy status (custom) message [/JoyState]

5.2. Related nodes

  • Low-level driver

    • Topics

      Subscribe to car sports news【/cmd_vel】

      Subscribe to robotic arm control messages【/TargetAngle】

      Subscribe to gimbal servo control messages【/PWMServo】

    • Service (server)

      Turn on buzzer control【/Buzzer】

      Enable getting the current angle message of the robotic arm【/CurrentAngle】

  • Joy_node

    • Topics

      Release news about wireless controller【/joy】

5.3. Operation process

008

Start command

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
roslaunch transbot_bringup joy_bringup.launch

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 joy_bringup.launch

View node graph

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

Only the connections between topics can be seen

View service list

jetson motherboard/Raspberry Pi 4B

xxxxxxxxxx
rosservice list

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
rosservice list

Print as follows:

xxxxxxxxxx
/Buzzer
/joy_node/get_loggers
/joy_node/set_logger_level
/rosout/get_loggers
/rosout/set_logger_level
/transbot_joy/get_loggers
/transbot_joy/set_logger_level
/transbot_node/get_loggers
/transbot_node/set_logger_level
/transbot_node/set_parameters
... ...

5.4. Source code analysis

  • launch file

File path: ~/transbot_ws/src/transbot_bringup/launch/joy_bringup.launch

xxxxxxxxxx
<launch>
     <!-- Start Transbot underlying node-->
     <node pkg="transbot_bringup" type="transbot_driver.py" name="transbot_node" required="true" output="screen">
         <param name="imu" value="/transbot/imu"/>
         <param name="vel" value="/transbot/get_vel"/>
         <param name="kp" value="1.0"/>
         <param name="ki" value="0.0"/>
         <param name="kd" value="4.0"/>
     </node>
     <!-- Start the handle control node-->
     <include file="$(find transbot_ctrl)/launch/transbot_joy.launch"/>
</launch>

-py file

File path: ~/transbot_ws/src/transbot_ctrl/scripts/transbot_joy.py

xxxxxxxxxx
         arm_thread = threading.Thread(target=self.analyse_PWM())
         arm_thread.setDaemon(True)
         arm_thread.start()

Start the thread, obtain the currently connected camera device in the [self.analyse_PWM()] function, and start loop control of the gimbal servo and robotic arm.

xxxxxxxxxx
     def buttonCallback(self, joy_data):
         '''
         Get wireless controller reception signal
         [1: Clamp, 2: Release, upper left: joint2+, lower left: joint2-, left left: joint1 upper, left and right joint1: lower]
         '''
         if not isinstance(joy_data, Joy): return
         #rospy.loginfo("joy_data.buttons:", joy_data.buttons)
         # rospy.loginfo("joy_data.axes:", joy_data.axes)
         if self.user_name == "pi": self.user_pi(joy_data)
         else: self.user_jetson(joy_data)
         # rospy.loginfo("linear_Gear: {},angular_Gear: {}".format(self.linear_Gear,self.angular_Gear))
         #rospy.loginfo("linear_speed: {},angular_speed: {}".format(linear_speed,angular_speed))

Subscribe to the data published by the node [joy_node] and obtain the current status of the wireless controller. Different master controls are distinguished here.

5.5. Handle effect

212

5.6. Precautions when using the handle

  • After plugging and unplugging the handle receiver, you need to restart the handle program, otherwise you will not be able to control the car.

  • After starting the handle control program, if the handle cannot control the car, it may be caused by the wrong handle control mode. You can press and hold the handle mode button for about 15 seconds to switch modes. After the green indicator light stays on, press the start button again, such as If a buzzer sounds, the switch is successful. If there is no response, you can press and hold the mode button on the handle again for 15 seconds.

    Jetson series support mode: PC/PCS mode (in X-BOX mode, it can only control the forward and backward movement of the car)

    Raspberry Pi series support mode: X-BOX mode

    ECB7ADF3-824E-4cc6-AE49-5536DF2ACA27.png

  • After re-plugging or unplugging the handle receiver or restarting the motherboard, the handle will be reset to factory mode. If it cannot be controlled, the mode will need to be switched again every time it is plugged, unplugged or restarted.

Appendix

jetson nano

xxxxxxxxxx
joy_data.buttons: 
header: 
  seq: 335
  stamp: 
    secs: 1628324636
    nsecs: 962988952
  frame_id: "/dev/input/js0"
axes: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

axes(8)

Code analysisHandle buttonCar control
axes[0]Left rocker 
axes[1]Left rockeradvance and back
axes[2]Right rockerleft and right
axes[3]Right rocker 
axes[4]  
axes[5]  
axes[6]Left buttonArm-1
axes[7]Left buttonArm-2

buttons(15)

Code analysisHandle buttonCar control
buttons[0]Acamera platform move down
buttons[1]Bcamera platform move right
buttons[2]  
buttons[3]Xcamera platform move left
buttons[4]Ycamera platform move up
buttons[5]  
buttons[6]L1Arm-clip close
buttons[7]R1running water light
buttons[8]L2Arm-clip open
buttons[9]R2control switch
buttons[10]SELECTsearch light on high frame rate camera
buttons[11]STARTbuzzer
buttons[12]  
buttons[13]Press left rockerLinear speed [ 0.15 , 0.3 , 0.45 ]
buttons[14]Press right rockerAngular speed [ 0.5 , 1 , 1.5 , 2 ]

Raspberry Pi

xxxxxxxxxx
joy_data.buttons: header: 
  seq: 264
  stamp: 
    secs: 1628326479
    nsecs: 848359307
  frame_id: "/dev/input/js0"
axes: [-0.0, -0.0, 0.0, -0.0, -0.0, 0.0, 0.0, 0.0]
buttons: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

axes(8)

Code analysisHandle buttonCar control
axes[0]Left rocker 
axes[1]Left rockeradvance and back
axes[2]L2(press:-1,release:1)Arm clip
axes[3]Right rockerleft and right
axes[4]Right rocker 
axes[5]R2(press:-1,release:1)control switch
axes[6]Left buttonArm-1
axes[7]Left buttonArm-2

buttons(11)

Code analysisHandle buttonCar control
buttons[0]Acamera platform move down
buttons[1]Bcamera platform move right
buttons[2]Xcamera platform move left
buttons[3]Ycamera platform move up
buttons[4]L1Arm clip
buttons[5]R1running water light
buttons[6]SELECTsearch light on high frame rate camera
buttons[7]STARTbuzzer
buttons[8]MODE 
buttons[9]Press left rockerLinear speed [ 0.15 , 0.3 , 0.45 ]
buttons[10]Press right rockerAngular speed [ 0.5 , 1 , 1.5 , 2 ]

 

Keyboard control
Robot state estimation

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