PIBOT lower machine development

1 Overview

  • PIBOT lower supports multiple motherboard, Arduino Mega2560, STM32F1 and the like STM32F4
  • PIBOT lower computer support multiple motion model (differential, omnidirectional, Mecanum round), only you need to adjust the parameters to compile
  • PIBOT lower computer support different parameters of the robot, the implementation of the relevant parameters can be set

2. Software framework

3678585-d25655842ed1f8a2.gif
Software framework map

Orange functional module lower machine part

3. The lower computer development environment

  • Arduino Mega 2560As the main control unit, using the Visual studio code+ Platform IOdevelopment, support Windowsand ubuntuenvironment
  • STM32F1As the main control unit, used Keilfor development
  • STM32F4As the main control unit, Ubuntuthe use of Visual studio codedevelopment

3.1 environment to build

Arduino

For details, see Visual Studio Code plug PlatformIO IDE Arduino development

STM32F1

Refer to PIBOT of STM32F1 environment configuration and compilation

STM32F4

Refer to PIBOT of ubuntu under stm32 C / C ++ compiler and configuration templates

3.2 environment configuration

Arduino

Use Visual studio codeopen-bit code included with the folder, the platformio.inimodified model and the use of the corresponding motor controller

apollo

models =
    -D ROBOT_MODEL=ROBOT_MODEL_DIFF
    -D MOTOR_CONTROLLER=COMMON_CONTROLLER

zeus

models =
    -D ROBOT_MODEL=ROBOT_OMNI_3
    -D MOTOR_CONTROLLER=COMMON_CONTROLLER

STM32F1

3678585-377044ca918f1bad.png

withArduino

STM32F4

In param.mkthe modified configuration, four kinds of models representing the FIG can select a

3678585-4013b3e8accc138f.png

4. Analysis Code

Code Case analysis Arduino Refer ROS robot chassis (7) -Firmware code analysis (. 1)
ROS robot chassis (8) -Firmware code analysis (2)
ROS robot chassis (24) - designed embedded portion of the frame and Implementation

The parameters

Motion parameters are built in the factory board EEPROM/FLASHin

5.1 default parameters

The factory will cure the default parameters to the board

apollo

  • Arduino


    3678585-6f77e722733cd6fb.png
  • STM32F1/STM32F4


    3678585-3cb76a3ea548734f.png

zeus

  • STM32F4


    3678585-469f6f364939f6af.png
    image.png

apolloX

  • STM32F4


    3678585-ab412eaca79b02ea.png

hades

  • STM32F4


    3678585-9d1ffe1ef88064a5.png

hera

  • STM32F4


    3678585-267b12d1d5ee604e.png
  • wheel_disameter Wheel diameter

  • wheel_track apollo: Track zeus: where wheel diameter hades: length and width of the rectangle and a wheel heraaround track coefficient *

  • encoder_resolutionWheel rotation encoder changes the absolute value (typically 4 reduction ratio of encoder resolution, such as 11 * 4 * 4 90 done multiplier firmware)

  • do_pi_interval Pid calculation interval, the fixed value 10

  • kp ki kd

  • koIt is a coefficient, the actual P I Dparameterskp/ko ki/ko kd/ko

  • cmd_last_time Incentive command timeout, beyond which time no new command will stop the robot

  • max_v_liner_x max_v_liner_y max_angular_z Underlying speed limit, sent by the remote keypad or navigation is the velocity limiting value

  • imu_type Fixed value 69

5.2 Configuration Parameters

Configuration parameters to be configured via the host computer interface ROS

pibot_bringup
pibot_configure

or

roslaunch pibot_bringup bringup.launch
rosrun rqt_reconfigure rqt_reconfigure

6. The motor direction and the software to adjust the direction of the encoder

Transplanted PIBOT bit machine or due to the encoder motor or wiring problems, resulting in the motor control has been transferred. The reason is that the PWM value of the given direction has been reversed to cause the encoder, it is necessary to adjust the motor or encoder wiring lines, by providing software translation parameters can achieve the same effect reference may be added on the movement direction of the control

Guess you like

Origin blog.csdn.net/weixin_34408717/article/details/90989886