The mobile chassis needs to be driven by a program to achieve the navigation of Limo. The chassis driver of Limo has the C++ version and the Python version. Both two versions can control the movement of the Limo.

3.1 C++ chassis driver

The folder where the C++ version of the driver is located is ~/limo_ros2_ws/src/limo_ros/limo_base, which can be accessed by the following command.

cd limo_ros2_ws/src/limo_ros/limo_base

The following is the file list of the limo_base package:

├── limo_base
    ├── CMakeLists.txt
    ├── include
    │   ├── limo_driver.h
    │   ├── limo_protocol.h
    │   └── serial_port.h
    ├── launch
    │   └── limo_base.launch
    ├── msg
    │   └── LimoStatus.msg
    ├── package.xml
    └── src
        ├── limo_base_node.cpp
        ├── limo_driver.cpp
        └── serial_port.cpp

There are four folders under limo_base, namely include, launch, msg, and src. The include folder stores the library files called by the driver; the launch folder stores the startup files of the driver; the msg folder stores the message files needed by the driver; the src folder stores the driver source code.

Folder Stored files
include Library files called by the driver
launch Startup files of the driver
msg Message files needed by the driver
src Driver source code

You can control the forward movement of limo with a simple command.

Note: Before running the command, please make sure that the programs in other terminals have been terminated. The termination command is: Ctrl+c.

  1. Launch the chassis, open a terminal, and enter the command in the terminal:

    ros2 launch limo_bringup limo_start.launch.py
    
  2. Enter the control command, open a terminal, and enter the command in the terminal:

    ros2 run teleop_twist_keyboard teleop_twist_keyboard
    

Untitled