Open source autonomous navigation car MickX4 (1) ROS chassis hardware

In the stage of learning ROS, we use the standard ROS chassis. You can start the car with only one command, and then send data to the cmd_vel topic to control the linear and angular speed of the car. Using the standard ROS chassis allows us to quickly master the knowledge of ROS navigation. In order to deepen the learning of ROS autonomous navigation car, we designed a self-made ROS car chassis and learned the production process of standard chassis.

This series of tutorials is intended to share my notes when learning the ROS autonomous navigation car. The content of the tutorial includes building a four-wheel car model as shown below from scratch. The car’s name is MickX4 . We follow the car’s chassis hardware and then introduce ROS construction. Picture, the sequence of navigation and control introduces the building process of the car. The tutorial is divided into 6 parts:

Open source autonomous navigation car MickX4 (1) ROS chassis hardware
Open source autonomous navigation car MickX4 (2) ROS chassis motion control
Open source autonomous navigation car MickX4 (3) Chassis ROS node
Open source autonomous navigation car MickX4 (4) Cartographer construction of
open source autonomous navigation car MickX4 (5) Outdoor navigation of the car
Open source autonomous navigation car MickX4 (6) Summary and outlook

The following picture is an assembly rendering of a MickX4 car:
Insert picture description here

1 ROS chassis electrical system

In the autonomous navigation framework of ROS, the motion control system is mainly responsible for the precise speed control of the chassis of the car and provides the chassis sensor interface to the industrial computer. This part is encapsulated into the standard interface of ROS. The chassis of the trolley receives the speed command ( v_tar , w_tar ) issued by the host computer, and calculates the speed value of each motor according to the kinematics model. The controller calculates the control quantity in real time according to the current state of the motor, and controls the motor to reach the specified speed. Realize precise control of the vehicle.

Usually the chassis control of the trolley is completed by the single-chip microcomputer. The main reason is that the motor interface is usually not unified. Some motors are driven by the CAN bus. However, some servo motors are controlled by PWM, and the industrial computer usually only provides standard Interface (eg, USB port, serial port, Ethernet port). The single-chip microcomputer is easy to expand the IO interface and can control other vehicle equipment (such as headlights, turn signals, etc.). On the other hand, the advantage of using single-chip microcomputer for control is that the single-chip microcomputer has strong real-time performance, which can be realized by the interrupt of the single-chip microcomputer. Secondly, the motion control of the car chassis belongs to the control of light tasks. Target recognition, construction of environmental maps, etc. In addition, to a certain extent, it also reflects the idea of ​​modularization in the robot, and this structure can also reduce the burden on the industrial computer.

1.1 Chassis mechanical assembly

For the mechanical part of the trolley, we use the motor support to fix the motor on the profile, and use the profile to build a support for the chassis of the trolley. (This kind of structure is very rough, and the load of the vehicle will affect the bearing of the motor, so it is only suitable for the car for algorithm verification)

The whole process of Mickx4 car chassis assembly

This structure is relatively solid. The following is a small video of our outdoor test. In the video, you can see that the power of the M3508 motor is very strong, and it can be walked up by a person. However, during the actual test, it is found that the four-wheel steering is still more laborious. Yes, people can walk forward and backward when standing up, but turning in place will not work.

Mickx4 autonomous navigation car chassis test

We didn't do much research in this part, just shared a construction process, because we assembled it from waste materials found in the laboratory. In practice, you can find a carbon plate or process a chassis bracket to fix the motor according to your actual situation. The following is a list of the equipment we used:

Insert picture description here

Students who need a hardware list can leave an email in the comment area, and send excel to your email after seeing it.

1.2 Chassis hardware block diagram

Here we first build the hardware block diagram of the car as shown in Figure 5-2. The car motor uses 4 DJI M3508 motors. The motors are connected to the processor through the CAN bus. The processor uses the STM32F103 microcontroller as the only processing unit. The onboard IMU of the trolley is connected to the processor using the IIC bus, and the ultrasonic module is installed around the trolley. The ultrasonic waves are collected and packaged by the ultrasonic controller and sent to the controller through the serial port protocol. Finally, the processor provides an Ethernet interface to the industrial computer through the serial port to Ethernet module, and realizes data exchange with the industrial computer through TCP/IP.
Here we first build the hardware block diagram of the car as shown in Figure 5-2, and use STM32F1 microcontroller as the main controller of the chassis (abbreviated as: chassis controller) to achieve remote control data collection, IMU data collection, ultrasonic and speed closed-loop control .
The chassis controller receives the target speed command (v, w) sent by the remote control or the industrial computer, calculates the control value through the PID controller according to the current state data of the motor feedback, and finally sends it to each motor through the CAN bus.

  • The motor uses DJI's M3805 motor. The peak power of the motor is up to 220W and the peak torque is 5Nm; the maximum continuous power is 150W, and it can continuously output 3.5Nm of torque. The M3508 motor uses CAN bus communication to provide real-time feedback of motor current, speed, position.
  • The remote control uses DJI DT7 remote control, and the communication protocol is DBUS protocol. Use an inverter to connect the pins of the remote control, and after setting the baud rate of the serial port to 1M, the data of the remote control can be parsed through the serial port
  • IMU uses MPU6050 to provide three-axis acceleration and three-axis rotation angular velocity, HMC5883 provides three-axis magnetic force, uses quaternion complementary filtering to realize 9-axis attitude fusion algorithm, and calculates and outputs 3 attitude angles (roll, pitch, yaw) for measurement Car attitude.
  • Ultrasonic use is a self-made module. The module also uses STM32 as a processor to read the data of 16 ultrasonic sensors in real time, and package the data to the CAN bus and serial bus, and upload it to the chassis controller.
    Insert picture description here

1.3 Electrical system construction

The electrical system of the chassis is mainly responsible for supplying power to sensors and industrial computers, managing battery charging and discharging, detecting battery power, over-current protection, and controlling the power-on sequence of each module of the car. Usually, the car uses a DC-DC voltage conversion module to provide 12V, 19V, 5V and other DC power supplies, and the power supply (high voltage power supply) of high-power devices such as the car motor should be realized by the main control board through the control of solid state relays or contactors. In addition, the electrical system should also have the function of overload protection. When a certain circuit of the system is overloaded, the main control board can disconnect the circuit through the control relay to ensure the safety of the system.

In fact, the trolley we built used less power, so we did not use high and low voltage to power on sequentially, nor did we use contactors to control the power on of the motor. The battery uses a DJI battery, which has the functions of over-discharge, charging protection and battery power display, which simplifies the electrical system.

The figure below shows the DC-DC module and battery we used.
Insert picture description hereInsert picture description here
note: When choosing a battery, you must choose a battery with overcharge and overdischarge protection and excellent quality, otherwise the battery may swell during use and cause safety hazards.

2 Differential chassis kinematics model

After completing the installation of the chassis sensor of the trolley, we first need to analyze the kinematics model of the trolley to find the relationship between the speed (v, w) of the trolley and the angular velocity of each motor.

The mainstream car chassis is divided into differential steering chassis, omnidirectional wheel chassis, and Akaman steering chassis according to the steering mode. Among them, the differential chassis is usually used by research platforms due to its simple structure, while the Akaman steering chassis is mainly used in the field of autonomous driving.

The four-wheel differential chassis is shown in Figure 5-4. The steering center of the four-wheel differential chassis is on the geometric center of the trolley. The distance from the geometric center to the four wheels of the trolley is equal. Usually, the four-wheel differential model is controlled according to the same speed of the left and right wheels, that is, as a two-wheel model. The four-wheel differential model relies on tire slip to achieve steering when the vehicle is turning,
so it can be assumed that v 1 = v 2 v1=v2v1=v 2 ,v 3 = v 4 v3 = v4v 3=in 4

Insert picture description here

Here we use the differential model in Figure 2 to discuss its kinematics. Usually the cart adopts the right-hand coordinate system (the index finger of the right hand is the x direction, the thumb points to the Z axis direction, and the middle finger points to the Y direction). Here it is assumed that the speed of the left wheel of the cart is vl v_lvl, The speed of the right wheel is vr v_rvr, The left and right wheel spacing is 2 l 2l2 l , the speed of the trolley isVVV , the heading angular velocity iswww (The angular velocity is defined as positive in the counterclockwise direction). The turning radius of the car isRRR , the turning radius R of the
Insert picture description here
trolleysatisfies: thelinear velocity of the left and right wheels of the trolley satisfies:
Insert picture description here

Therefore, there are equations (1) and (2) to get the linear velocity of the left and right wheels as:
Insert picture description here

Solving the two equations in the above formula simultaneously can get the speed VV of the carV and heading angular velocitywww satisfies the following relationship: the
Insert picture description here
above theoretical model is mainly used to control the trolley. When the speed of the entire trolley is set, we need to switch to the target speed of each wheel, and finally realize the transformation control for each wheel. Secondly, when calculating the mileage and position of the trolley, the data we obtain is the speed or the angle of rotation of each wheel of the trolley. At this time, we need to calculate the overall speed and displacement of the trolley from the speed of each wheel according to the above model.

After completing the installation of the chassis sensor of the car, we will find
the relationship between the speed (v, w) of the car and the angular velocity of each motor in the next part according to the kinematics model of the car , and design a speed controller for the car to realize the car’s Remote control movement.

Reference

[1] The code of the current car chassis is located at: https://github.com/RuPingCen/mick-robot-chasiss

Welcome everyone to like and discuss in the comment area ([email protected]) O(∩_∩)O

Or join the group exchange (1149897304)
Insert picture description here

Guess you like

Origin blog.csdn.net/crp997576280/article/details/108290182