- 1 Overview
- 2. Software framework
- 3. The lower computer development environment
- 4. Analysis Code
- The parameters
- 6. The motor direction and the software to adjust the direction of the encoder
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
Orange functional module lower machine part
3. The lower computer development environment
-
Arduino Mega 2560
As the main control unit, using theVisual studio code
+Platform IO
development, supportWindows
andubuntu
environment -
STM32F1
As the main control unit, usedKeil
for development -
STM32F4
As the main control unit,Ubuntu
the use ofVisual studio code
development
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 code
open-bit code included with the folder, the platformio.ini
modified model and the use of the corresponding motor controller
models =
-D ROBOT_MODEL=ROBOT_MODEL_DIFF
-D MOTOR_CONTROLLER=COMMON_CONTROLLER
models =
-D ROBOT_MODEL=ROBOT_OMNI_3
-D MOTOR_CONTROLLER=COMMON_CONTROLLER
STM32F1
withArduino
STM32F4
In param.mk
the modified configuration, four kinds of models representing the FIG can select a
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/FLASH
in
5.1 default parameters
The factory will cure the default parameters to the board
apollo
-
Arduino
-
STM32F1/STM32F4
zeus
-
STM32F4
apolloX
-
STM32F4
hades
-
STM32F4
hera
-
STM32F4
wheel_disameter
Wheel diameterwheel_track
apollo
: Trackzeus
: where wheel diameterhades
: length and width of the rectangle and a wheelhera
around track coefficient *encoder_resolution
Wheel 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 10kp
ki
kd
ko
It is a coefficient, the actualP
I
D
parameterskp/ko ki/ko kd/ko
cmd_last_time
Incentive command timeout, beyond which time no new command will stop the robotmax_v_liner_x max_v_liner_y max_angular_z
Underlying speed limit, sent by the remote keypad or navigation is the velocity limiting valueimu_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